A method for moving trees realistically in wind.
Posted: Wed Sep 02, 2009 4:24 pm
Hi.
I have been writing an implementation of the method described in Habel, Kusternig and Wimmer's "Physically Guided Animation of Trees" to animate trees in 'wind' in real time. It is not finished but the basics are in place and it works. I'm posting here in case anyone wants to use it as it is, or improve it, and so if there are any problems I don't know about I can find them and fix them. I will continue to work on it but my graphics card limits what I can do at the moment. It takes a 4 step approach to getting trees in Ogre and swaying realistically in the wind.
1. Create a tree in Blender using Gen4 python script ( modified from Sergey Prokhorchuk (Stager)'s Gen3 python script. [ This exports an xml file ]
2. Export tree mesh using Ogre's BlenderExporter.
3. Run the Gen4_TreeData_Convertor on the xml file exported from Gen4 Blender python script.
4. Use a vertex shader to move every vertex based on a vertex texture fetch (you need a card that can do vtf) of the data and motion textures produced by Gen4_TreeData_Convertor.
Requirements:
-Blender
-Ogre + Exporter for Blender
-to build Gen4_TreeData_Convertor:
fftw3
OpenEXR
boost
TinyXml
I need to add support for leaves in the python script and the Gen4_TreeData_Convertor, and clean up the code a bit,
but if anyone wants to use it or improve it download at:http://zeroplusequals.net/downloads/Gen4.zip
This includes: -Gen4 python scripts for Blender
-source code for Gen4_TreeData_Convertor and simple SConstruct for building with scons
-glsl shaders ( obviously needs to be re written in cg or hlsl if that's what you use)
-basic Gen4.material
--------------------------------------------------
The tutorials for Gen3 are hard to find so I put them up here:http://zeroplusequals.net/downloads/Gen3_tuts.zip
epha
I have been writing an implementation of the method described in Habel, Kusternig and Wimmer's "Physically Guided Animation of Trees" to animate trees in 'wind' in real time. It is not finished but the basics are in place and it works. I'm posting here in case anyone wants to use it as it is, or improve it, and so if there are any problems I don't know about I can find them and fix them. I will continue to work on it but my graphics card limits what I can do at the moment. It takes a 4 step approach to getting trees in Ogre and swaying realistically in the wind.
1. Create a tree in Blender using Gen4 python script ( modified from Sergey Prokhorchuk (Stager)'s Gen3 python script. [ This exports an xml file ]
2. Export tree mesh using Ogre's BlenderExporter.
3. Run the Gen4_TreeData_Convertor on the xml file exported from Gen4 Blender python script.
4. Use a vertex shader to move every vertex based on a vertex texture fetch (you need a card that can do vtf) of the data and motion textures produced by Gen4_TreeData_Convertor.
Requirements:
-Blender
-Ogre + Exporter for Blender
-to build Gen4_TreeData_Convertor:
fftw3
OpenEXR
boost
TinyXml
I need to add support for leaves in the python script and the Gen4_TreeData_Convertor, and clean up the code a bit,
but if anyone wants to use it or improve it download at:http://zeroplusequals.net/downloads/Gen4.zip
This includes: -Gen4 python scripts for Blender
-source code for Gen4_TreeData_Convertor and simple SConstruct for building with scons
-glsl shaders ( obviously needs to be re written in cg or hlsl if that's what you use)
-basic Gen4.material
--------------------------------------------------
The tutorials for Gen3 are hard to find so I put them up here:http://zeroplusequals.net/downloads/Gen3_tuts.zip
epha