I'm having a wierd problem. When i export 3ds models, and load them with the engine, not all of the polygons are rendered. This is a bit frustrating, as you might imagine, and i'd like some help
also use yourmeshnamehere->setMaterialFlag(EMT_NORMALIZE NORMALS,true);
and smgr->getMeshManipulator->flipsurfaces i think look in the irrlicht folder and look under doc open the irrlicht help and search mesh manipulaor in the index and it will explain. thats good help too!
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
I have been working on a 3ds file conversion tool at work. I did some testing with the Irrlicht mesh viewer sample, and had some problems.
I hade downloaded sample cone, box and sphere 3ds files for testing. All opened fine in gmax/max and eventually my conversion tool. Only the box opened correctly when using the mesh viewer. For some reason the cone and the sphere were missing lots of vertex data. Turning on the debug boxes showed that the engine didn't believe the vertex data to be there.
I haven't had a chance to look at it, but I'm hoping to sometime this week.
I am getting the same problem with polygons missing from 3ds models. Looking at the engine source, I think the 3ds mesh file loader may not be calculating the correct number of faces, and changing the following line of code seems to have fixed the problem (for me, at least )
Yup. That is very likely the problem causing the missing faces/polys. The other issue that I ran into was that child meshes were being placed incorrectly relative to the parent/pivot.
The # of indices shouldn't necessarily be equal to the number of faces. If it uses triangle lists, then CountIndices / 3 should be correct. Also, you want to call setMaterialFlag on the mesh's node, not the mesh class.
I agree, but when the loader encounters a C3DS_TRIFACE chunk it reads the next 2 bytes, which I understand is the count of how many triangles there are in the mesh, into CountIndices. This is also how I got the face count in the 3DS loader that I wrote a while ago.
I am getting the same problem with polygons missing from 3ds models. Looking at the engine source, I think the 3ds mesh file loader may not be calculating the correct number of faces, and changing the following line of code seems to have fixed the problem (for me, at least )
It is part of the Irrlicht source code. It would be in the source zip if you haven't extracted it.
If you make the change, you will need to recompile the Irrlicht library and put the .lib and .dll files in the correct places so that when you rebuild your application you'll get the changes and be able to debug them.
It's in the file source/source.zip, so if you haven't already done so unzip this and C3DSMeshFileLoader.cpp will be in the root folder of all the source files.
And I must remember to check for other replies before posting