Hi, not sure if this should be moved to the bugs area or if there is a patch or trick to making this work. (I really hope there is, I've been pulling my hair out over this..)
EMT_SOLID, no tangents... (Nice and smooth)
createMeshWithTangents(mesh, false, true, false);
(Triangles show! Yuck)
For reference, here are the parameters:
mesh Input mesh
recalculateNormals The normals are recalculated if set, otherwise the original ones are kept.
smooth The normals/tangents are smoothed across the meshbuffer's faces if this flag is set.
angleWeighted Improved smoothing calculation used
In Blender, smoothed the way I want it
In blender with normals shown.
The double vertices are in certain spots in order to make it sharp. I tried it without the double vertices and it made no difference. I also tried it with triangles instead of quads.
I am using IrrBlend to export, although it shouldnt make a difference.
Help? Patch? Trick? Please please please?
[Edit: removed extra images to shorten my post]
[fixed]createMeshWithTangents parameters not working?
[fixed]createMeshWithTangents parameters not working?
Last edited by squisher on Sun Nov 01, 2009 4:50 pm, edited 2 times in total.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
The smoothing does not work if vertices are duplicated. This could only be remedied with a far more complex version of the method. I'll move this thread to bug forum, though, as we keep getting such reports. Maybe you also want to provide a bug ticket on our tracker, which helps us to not forget this issue!
I removed the doubles and it still glitches. Below is with the parameters false,true,false. (TTF, TTT, and FTT all looked even worse.)hybrid wrote:The smoothing does not work if vertices are duplicated. This could only be remedied with a far more complex version of the method. I'll move this thread to bug forum, though, as we keep getting such reports. Maybe you also want to provide a bug ticket on our tracker, which helps us to not forget this issue!
This is what it looks like in blender. Ugly, but you still don't see triangles. Note, no doubles.
And here's the irrmesh file I'm using. So, how can I fix this?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Ok, two things which create the bug here. One is an (obvious) typo, which messes the normals with or without the flag. That's simply because the tangents are partially not recalculated instead of the normals. Don't know how this could happen.
A second problem is with the createXMesh methods. They all duplicate the vertices, which is not really acceptable. We need to rewrite all those methods, which might take somewhat longer than the other fix (which should at least keep the proper normals if the first parameter is false).
A second problem is with the createXMesh methods. They all duplicate the vertices, which is not really acceptable. We need to rewrite all those methods, which might take somewhat longer than the other fix (which should at least keep the proper normals if the first parameter is false).
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
The typo is fixed in the 1.5 branch now:
http://irrlicht.svn.sourceforge.net/vie ... threv=2777
As said, the other fixes will take some time.
http://irrlicht.svn.sourceforge.net/vie ... threv=2777
As said, the other fixes will take some time.