export X from Blender 2.6 problem 3 normals on vertex

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

export X from Blender 2.6 problem 3 normals on vertex

Post by pera »

when i export x file from Blender 2.6.x, each vertex has 3 normals, these are face normals and make mesh sharp under light... I need mesh to be smooth, so each vertex to have one normal .
In older version of Blender (2.49) there were options in exporter to smooth the normals or not, and this I can't find in latest exporter. How to export x file smooth?
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: export X from Blender 2.6 problem 3 normals on vertex

Post by ACE247 »

I just tested this to check what the normals are like. And I just found a complete mess of normals when I openend the file in Irrlicht. Will look into it. But I believe there was something mentioned on the forums about .x with irrlicht that causes this.

Edit: Here's what I found.
Setting 'Rotate X 90 Degrees' on in Blender X export messes the normals.
Blender anyhow exports far too many normals for just the center of a face(like 9?)

doing recalculate Normals, doesn't help much either, here the result:
No recalculateNormals
Image

recalculateNormals
Image

It just got further messed up.

Edit2: On even further inspection, recalculate Normals only creates double/tripple Normals for a vertex point when there are two/three supposedly unconnected vertices at the same point. This is also visible in the dwarf model.
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Re: export X from Blender 2.6 problem 3 normals on vertex

Post by pera »

yes, there are more problems to normals, but i solved them all but the last one :)

1. first in blender you need to remove double vertices. there are often much duplicates if you import model to blender. If you start with simple cube in blender, this should be fine.
2. you need to apply transformations to blender model before exporting. apply rotate, scale, translate, and save model.
3. when you export to direct x format, you must NOT choose any fliping axes or rotating 90 degrees, recalculations, nothing. They will modify model, but not normals, so normals end up flying beside model.

these are just for normals, if you want to have good lighting and textures, you have to fiddle with the materials also..

edit: btw thats one messy model, what is that? :)
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: export X from Blender 2.6 problem 3 normals on vertex

Post by ACE247 »

That model was a park bench! :D
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Re: export X from Blender 2.6 problem 3 normals on vertex

Post by pera »

ouch! spiky :)
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Re: export X from Blender 2.6 problem 3 normals on vertex

Post by pera »

Finally!!!

I managed to get good (smooth) normals on mesh. In Blender 2.6 there is Smooth/Flat option, in tools panel. You have to set it to Smooth while in object mode, save the file and then export to X format - it will create 1 normal per vertex! My terrain looks great now.

Maybe it could work in edit mode, if you select some vertices to be smooth and some to be flat - I will test this just to see if its working like that.
Post Reply