virtual agent stuff

1.ใช้โปรแกรม makehuman สร้าง humanoid model แล้วเอาเข้าไป animate posture ใน unity

http://nw.tsuda.ac.jp/lec/unity5/index-en.html

 

makehuman มันก็มี free model data ให้เลือกโหลดมาใส่ได้อยู่

http://www.makehumancommunity.org/clothesgallery.html

แต่เจอปัญหารองเท้าส้นสูงกับเท้ามันใส่ไม่เข้า เห็นว่าต้องไปดัดเท้าเองใน blender …

 

2. ใช้โปรแกรม mixamo สร้าง animation posture

https://www.mixamo.com/

คือมันจะมี character กับ animation ให้เราเลือก จะ upload character ของตัวเองขึ้นไปแล้วใส่ animationที่มีอยู่ก็ได้

แต่ลอง upload unitychan ไม่ได้อ่า…

แล้วก็ animation มัน fix ท่าทางมาละ ถ้าจะให้ชี้นู่นนี่ได้อิสระ น่าจะต้องเขียนโค๊ด ให้มันหมุนไหล่หมุนแขนเองแฮะ

 

3.โปรแกรม smartbody http://smartbody.ict.usc.edu/

โปรแกรมนี้มี example character มาให้ละ ใช้ python เขียนสั่ง bml ให้character ทำท่าทางอะไร มองไปทางไหน พูด lipsyn ได้

ฟังก์ชัน pointing นั่นจะ คำนวณตำแหน่งสิ่งที่ชี้ กับ animationที่จะให้ตำแหน่งของนิ้วอยู่ใกล้วัตถุมากที่สุด

animation ในการยกแขนชี้นู่นนี่มีอยู่ 39 ไฟล์ ถ้าของอยู่ใกล้จะสั่งให้หยิบแตะของนั้นก็ได้ ถ้าของอยู่ไกลตัวเหมือนจะคำนวณพังกลายเป็นชี้มั่วเลย

4.โปรแกรม vitual human toolkit https://confluence.ict.usc.edu/display/VHTK/vhtoolkitUnity

อันนี้เป็น โปรแกรมที่รวม smartbody + npc editor + gui +etc เข้าไปให้ใช้งานง่ายขึ้น เหมือนเป็นโปรแกรมทำ animation ตัวนึง…แต่ยังใช้ยากอยู่ดี…

ข้อดีคือ มันมี unity plugin ว่าจะลองใช้ดู

ก็ download ตัว indow installer 3.9Gb มา(ข้างในมี 3rd party installerให้แล้ว)

พอ installเสร็จ ให้ import

  • vhAssetsPackage
  • vhAssetsTestScenePackage

จากโฟลเดอร์ C:\vhtoolkit\bin\VHAssets  เข้าไปไว้ใน unity 2017.1.0f3 project…ก็จะใช้ vhtoolkitใน unity ได้ละ

Duality

Transportation problem is defind as (Primal model)

  • we have muktiple factory and multiple customer
  • each factory has a capacity amount of items
  • each customer place an order amount of items
  • there are a different cost of sending 1 item from factoryABC to customerABCD
  • To minimize transportation cost,
    • which factory should send item to each customer
    • and how many items do that factory send.

In another view of problem (Duality model – provide vital economic interpretations)

  • If we want to expand a factory (to increase a capacity per factory), How much cost will be reduced.
  • If customers order more items, How much profit we will get.

shadow price  :the optimal values of dual variables associate with each constraint

  • is a price that paid for 1 unit of resource.

reduced cost : associate with each decision variable. defined as the change in objective function value

  • is also called opportunity cost.

Mathematical Optimization

Mathematical Optimization = finding the best solution base on a given ojective function

Objective function = maximize or minimize

 

https://ampl.com/resources/the-ampl-book/chapter-downloads/

https://media.readthedocs.org/pdf/scipbook/latest/scipbook.pdf

 

Linear optimization (a1x1+a2x2+…+anxn) : most basic

– Integeroptimization: more complicate (NP-class)
Ex. find maximum number of chicken and rabbit, while theare are 5 heads and 16 feet.

Non-linear optimization : difficult to solve

-Quadric optimization (x^2+xy) polinomial up to 2 : able to solve by using SCIP (especially if convex function)

 

To solve

1. define mathematical fomular

  • variables :
    • x1
    • x2
  • objective function :
    • maximize 25×1+30×2
  • contraints :
    • 0<=x1<=6000
    • 0<=x2<=4000
    • x1/200+x2/140<=40

2. write  AMPL code from mathematical formular

var XB;
var XC;
maximize Profit: 25 * XB + 30 * XC;
subject to Time: (1/200) * XB + (1/140) * XC <= 40;
subject to B_limit: 0 <= XB <= 6000;
subject to C_limit: 0 <= XC <= 4000;

 

 

using Apache ActiveMQ

Apache ActiveMQ is a queue management software.

1. install jre environment
http://www.oracle.com/technetwork/java/javase/downloads/jre10-downloads-4417026.html

2. download Apache ActiveMQ
http://activemq.apache.org/download.html
extract at C:\apache-activemq-5.15.4

3. check java version
runcmd as administrator type : java -version

4. install ActiveMQ service
change directory in cmd to C:\apache-activemq-5.15.4\bin\win64
or C:\apache-activemq-5.15.4\bin\win32

type: InstallService.bat

5. type “services” in windows search box, then open services window

6. right click at ActiveMQ > Start

7. open web browser to see queue
goto http://127.0.0.1:8161
click Manage ActiveMQ broker
Login: admin
Password: admin

Python notebook + amplpy

1. download anaconda python 3.6 version (python 2.7 version also work!)

Downloads

2. cmd at c:\Anaconda3
install amplpy by typing : python -m pip install amplpy –pre –upgrade
we need to install the lastest amplpy 0.6

install pandas : python -m pip pandas bokeh

3. download ampl
https://ampl.com/try-ampl/download-a-free-demo/
then extract file at C:\ampl_mswin64

4.calls ampl in python with specify path:
from amplpy import AMPL, Environment, DataFrame
ampl = AMPL(Environment(r’C:\ampl_mswin64′))
ampl.setOption(‘solver’, r’C:\ampl_mswin64\gurobi’)
ampl.read(r’C:\ampl_mswin64\kcenter.mod’)

lecture

Empirical Research Methods in Information Science
https://course.ccs.neu.edu/is4800sp15/schedule.htm

Human-Computer Interaction
https://course.ccs.neu.edu/is4300f15/schedule.htm

Posted in web

my 2d game

http://mionzlab.bumbleplay.com/WebglGame/

internal ก็คือ public แค่ว่าไม่สามารถเรียกฟังก์ชันนี้จากข้างนอกโปรแกรมได้

Animation rigging unity

http://nw.tsuda.ac.jp/lec/unity5/index-en.html

https://medium.com/unity3danimation/create-your-own-ik-in-unity3d-989debd86770

https://www.udemy.com/mastering-3d-animation-in-unity/

 

 

stuff for making game

https://freesound.org/

https://opengameart.org/content/platform-pack

https://opengameart.org/content/platformer-art-complete-pack-often-updated

http://www.cadnav.com/3d-models/animal/

https://dova-s.jp/bgm/play2558.html

Posted in web

Unity free asset

https://assetstore.unity.com/packages/essentials/cinemachine-79898

https://unity3d.com/learn/tutorials/topics/animation/using-cinemachine-getting-started


https://assetstore.unity.com/packages/2d/environments/free-platform-game-assets-85838


https://assetstore.unity.com/packages/essentials/beta-projects/textmesh-pro-84126


https://assetstore.unity.com/packages/tools/utilities/size-utilities-13534

เอาไว้วัด Global size ของ object


https://assetstore.unity.com/packages/tools/modeling/probuilder-111418

https://unity3d.com/unity/features/worldbuilding/probuilder

เอาไว้สร้างฉาก


https://assetstore.unity.com/packages/vfx/particles/cartoon-fx-free-109565

เอาไว้ทำ particle effect เวลา monster โดนเรา attack