![]() |
|
#10
|
|||
|
|||
|
blender OSG animation workflow
I figured out how to use Blender to create animation paths. This seems much easier than tweaking control points forever in Vizard.
Steps: 1. Install Blender. 2. Install osg export plugin. Download plugin. Copy the osgexport-2.42.py file into <Program Files>\Blender Foundation\Blender\.blender\scripts directory. 3. Learn how to animate a box in blender. This video provides a simple introduction: http://www.youtube.com/watch?v=FAZFfLmbD2k 4. Checkout the attached Vizard script that moves a car around with an animated box made in blender. The zip includes the .blend file. Code:
import viz
viz.go()
path = viz.add('output.osg')
vizact.onkeydown(' ', path.hint, viz.RESET_ANIMATION_HINT)
path.disable(viz.RENDERING)
car = viz.add('mini.osgx')
linky = viz.link(path.getChild('Cube_geode'), car, srcFlag=viz.LINK_ABSOLUTE)
linky.preEuler([0, -90, 0]) #rotate car upright
viz.MainView.setPosition([0,1,-5])
viz.MainView.getHeadLight().disable()
light = viz.add(viz.LIGHT)
light.position(.5,1,-.5,0)
light.intensity(3)
viz.clearcolor(viz.SKYBLUE)
viz.add('tut_ground.wrl')
__________________
Paul Elliott WorldViz LLC |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problems with interaction of vizact.turn and animation path | Enlil | Vizard | 3 | 11-24-2008 05:23 PM |
| speed on animation path | whj | Vizard | 8 | 11-17-2008 08:41 PM |
| Cubic Bezier Curve | whj | Vizard | 0 | 11-10-2008 02:52 PM |
| another bezier animation problem | masaki | Vizard | 1 | 01-24-2008 03:29 PM |
| Smooth transition from Linear to Bezier in animation | masaki | Vizard | 2 | 01-13-2008 12:22 PM |