IsraelAbebe / blender2ogre

Automatically exported from code.google.com/p/blender2ogre
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Shape Animation should export animated normals for OGRE 1.8 #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Ogre 1.8 adds the ability to send updated normals along with vertex positions 
during shape animation.

It would be great if the Blender exporter supported this feature, as the 
usefulness of shape-key animation is substantially decreaed by the lack of 
normal updates.

The relevant commit in OGRE code is here:

http://permalink.gmane.org/gmane.comp.multimedia.ogre.cvs/20448

Obviously this would only be useful for users of OGRE 1.8, as current stable 
versions do not support this feature

Original issue reported on code.google.com by pete.mar...@gmail.com on 18 Jul 2011 at 1:02

GoogleCodeExporter commented 8 years ago
OgreMeshy uses Ogre1.8, so this should be added.

Original comment by goatman.py@gmail.com on 18 Jul 2011 at 3:55

GoogleCodeExporter commented 8 years ago
I'm working through getting normals exported in one of my projects, and it 
seems that the pose indices written by the exporter are off-by-one.  i.e. in 
the xml output, the poses are tagged with indices 0 and 1, but the keyframed 
poserefs indicate index 1 and 2. 

It is possible this is because of some wierdness in the way my shape animations 
are keyed (2.5 support for this seems a little undercooked).

Once i have normal-enabled animations correctly playing back in my code i will 
submit a patch.

Original comment by pete.mar...@gmail.com on 19 Jul 2011 at 2:07

GoogleCodeExporter commented 8 years ago
Small update - Apparently updated normals are not made available through python 
for animated meshes - apparently normal calculation is deferred until 
display-time, so the normals will have to be recalculated for each frame by the 
exporter. 

It would probably be possible to create a temporary proxy object with the 
displaced vertices, get blender to update it and then read back the normals but 
this is likely to be slower than just manually calculating face and vertex 
normals directly.

Original comment by pete.mar...@gmail.com on 22 Jul 2011 at 11:54

GoogleCodeExporter commented 8 years ago

Original comment by goatman.py@gmail.com on 18 Aug 2011 at 1:25