Bad Scaling - resulting in no lighting and missing polygons
Bad Scaling - resulting in no lighting and missing polygons
In attempting to scale an OctTreeSceneNode (textured 3ds) using setScale(core::vector3df(40,40,40)), the result is that many of the polygons are not rendered until the camera is very close and all previous lighting effects are mysteriously disabled. Is this a comon problem? If so, how is it fixed (I would rather scale the level on load as oposed to in my model editor or having to scale everthing else down)?
WarZone - A 2D Action Wargame
http://warzone2d.zapto.org
http://warzone2d.zapto.org
I think the lighting problem is there, because normals are not normalized after scaling.
Try using IMeshManipulator::scaleMesh() (http://irrlicht.sourceforge.net/docu/cl ... or.html#a4). But beware: In the current version, it has a bug, causing bounding boxes ot the mesh not to be recalculated. I'll be fixed in next release.
Try using IMeshManipulator::scaleMesh() (http://irrlicht.sourceforge.net/docu/cl ... or.html#a4). But beware: In the current version, it has a bug, causing bounding boxes ot the mesh not to be recalculated. I'll be fixed in next release.
setScale...
Well the problem is that you are scaling the mesh after you generate the Octree..but this will not work properly as you see..
it would be nice to if we have IAnimatedMesh->setScale(core::vector3df(10,10,10)); , IMesh->setScale(core::vector3df(10,10,10)); or something to scale a mesh before we actually create a scene node from it..
it would be nice to if we have IAnimatedMesh->setScale(core::vector3df(10,10,10)); , IMesh->setScale(core::vector3df(10,10,10)); or something to scale a mesh before we actually create a scene node from it..
There also seems to be a problem when using setPosition() to move the level into the correct place - the entire mesh dissapears, but the collisions still read. Is there a way to recalculate the normals with a function call ,or will I need to add this myself? It is slightly difficult when dealing with a mesh that you cannot move or scale. When do you expect the next version to arrive (Niko)?
WarZone - A 2D Action Wargame
http://warzone2d.zapto.org
http://warzone2d.zapto.org
When do you expect the next version to be released (or is this information which you do not wish to expose so as that you are not facing deadlines?)?
WarZone - A 2D Action Wargame
http://warzone2d.zapto.org
http://warzone2d.zapto.org