I have created a fairly simple model in blender which looks fine there but when I convert it to j3o in jme it seems all faces are turning the wrong way! I did run the smooth function in blender before as I wanted the normals to point so it smoothed the edges. The importer seems to have inverted these for some reason. Here are some pictures:
Blender model:
Imported in JME:
I also tried Shading Flat option in Blender but the faces are still the wrong way when imported. I created the model by extruding a simple mesh. Perhaps it can be related to the direction I extruded it? Very odd though as it renders just find in Blender and surely flipped normals would have turned up the same problem there?
Recalculate the faces’ normal outside “ctrl+N”. or via Object---->Faces
>Recalculate the Normals Outside. Make sure you have selected all faces before doing that.
Thanks for the tip! It works brilliantly! Although I cant find the Faces->Recalculate the Normals Outside I was able to select Recalculate and then I get a small checkbox at the bottom left panel called “Inside” that I can de-check.
Here is the result now:
Will ofc work some more on the model to get more round fingers, better thumb and the overall shape as well as a UV texture map with nails and skin wrinkles and all that stuff. Hopefully I can create my first bone model also and learn how to animate it too. - I really want the players hands visible in front of him when he holds an object.
Put this into your browser’s favorites : http://wiki.blender.org/index.php/Doc:Tutorials/Modeling/Meshes/Fill_Faces#Cleanup_after_creation
Thanks, will do. Its been a while since I have been dabbling with vector math so I have a question that will sound silly. How do I find a point to the right in my cameras viewpoint? (I need to put my hand there). I was able to use the camera position and movement vector to place the hand directly in front at all times as well as using the rotation to get the hand always rotated in the same direction. But I need to offset it a bit to the right and down in my camera viewpoint. I guess I need some sort of up vector in order to find a perpendicular vector that forms the plane for the camera vector and this up vector and use that to offset it to the right or left. Haha… I have forgotten all the math I knew so well 15 years ago!
Is it the cross product of the camera vector and an up vector? (0,1,0)
Ok I answered my own question there btw. Cross product worked fine.
Do you mean an unit?
Vector3f right = cam.getWorldCoordinates(Vector3f.UNIT_Y, 0.0f);
Also, sorry for the thumbs down, miss clicked
@glaucomardano said:
Also, sorry for the thumbs down, miss clicked :(
Fixed ^^
@glaucomardano said:
Do you mean an unit?
Vector3f right = cam.getWorldCoordinates(Vector3f.UNIT_Y, 0.0f);
Hm, ok so this gets me a point in the world coordinate system that is offset from its center? If so that is brilliant and definitely much easier than the cross product thing I was doing to find perpendicular vector and normalising multiplied with a scalar (which also works btw).
Thanks for fixing the -1 btw. :)
i dont know what exacly is problem but set obData in blender like:
select object → ctrl-a → Scale and rotation to ObData
then it should be imported correctly with exporting to obj or ogre. i dont have any problems
@johncl said:
Hm, ok so this gets me a point in the world coordinate system that is offset from its center?
yes