Search found 17 matches
- Thu Nov 19, 2009 6:01 am
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
Just 2 notes - sometimes things get unfortunately forgotten, especially if they are not on the bugtracker. Adding a bugtracker entry always makes problems more visible to us than forum messages. Hmm... I was under the impression that this forum was the preferred channel for bug reports. Perhaps it ...
- Thu Nov 19, 2009 3:51 am
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
BUMP: nothing done about the problem in 1.6
1.6 still has the same bug. It appears nothing has been done about it. I want to load terrain with non-1.0f vertical scaling and expect the resulting meshes' normals to reflect the actual scaled geometry which I am going to render , NOT!!! the original unscaled geometry as stored in the height map f...
- Wed Nov 18, 2009 7:50 am
- Forum: Beginners Help
- Topic: Challenge: "cube scene node" properly colored
- Replies: 9
- Views: 562
I just checked and I think in your case it might be possible to avoid the boilerplate code. All vertex types are derived from S3DVertex and you can get the size of the vertex-type with getVertexPitchFromType. Like this? S3DVertex* v = (S3DVertex*)(buf->getVertices()); E_VERTEX_TYPE vtype = buf->get...
- Wed Nov 18, 2009 7:25 am
- Forum: Beginners Help
- Topic: Challenge: "cube scene node" properly colored
- Replies: 9
- Views: 562
- Wed Nov 18, 2009 6:25 am
- Forum: Beginners Help
- Topic: Challenge: "cube scene node" properly colored
- Replies: 9
- Views: 562
Checkout S3DVertex - you can get that from the Meshbuffer, I'm sure you figure it out somehow :-) No, I cannot get S3DVertex from meshbuffer because no documented method of IMeshBuffer returns S3DVertex or array thereof. What do I do with the void* returned by getVertices()? Static_cast it to S3DVe...
- Wed Nov 18, 2009 5:09 am
- Forum: Beginners Help
- Topic: Challenge: "cube scene node" properly colored
- Replies: 9
- Views: 562
Challenge: "cube scene node" properly colored
How do I assign solid red color to node returned by addCubeSceneNode? Here is what surprisingly fails : node->setMaterialFlag(EMF_LIGHTING, false); node->getMaterial(0).DiffuseColor.set(255,255,0,0); node->getMaterial(0).AmbientColor.set(255,255,0,0); node->getMaterial(0).SpecularColor.set(255,255,0...
- Mon Sep 08, 2008 7:44 pm
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
Can you suggest an example of its usefulness? Special effects on a game character - they go through a teleporter and shrink along the width and depth, but not along their height. If you modified the normals to match the model, it would look dark. Precisely: special effects . It is reasonable to exp...
- Sun Sep 07, 2008 8:53 pm
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
Yes this function in the CTerrainSceneNode.cpp file in the Irrlicht Source code and rebuilding it to produce your own DLL. Unfortunately modifying Irrlicht is not an option in my case. I must live with what there is, and so I must keep appealing to the developers' common sense in the hope that they...
- Thu Sep 04, 2008 11:28 pm
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
- Wed Sep 03, 2008 11:04 am
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
IMeshManipulator *meshManip = sceneManager->getMeshManipulator(); meshManip->scaleMesh(terrainSceneNode->getMesh(), vector3df(1.0f, 0.00001f, 1.0f)); meshManip->recalculateNormals(terrainSceneNode->getMesh()); Tried it. It has no effect whatsoever, neither on the normals nor even on the geometry. W...
- Wed Sep 03, 2008 10:37 am
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
This isn't a bug. Perhaps it isn't the behavior you want, but it is consistent behavior and it can be very useful. Can you suggest an example of its usefulness? If normals follow any transformations, the logical extension would be to recalculate the normals after each transformation (translation, r...
- Wed Aug 27, 2008 4:35 pm
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
I think that it would be useful to change the behaviour; I'm just concerned that there may be users currently depending on the existing normal calculation. Why not a choice defaulting to old behavior? The solution below is a hack but that's the penalty for implementing an incorrect formula in the f...
- Wed Aug 27, 2008 3:14 pm
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
- Wed Aug 27, 2008 1:13 pm
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
I don't have a 1.4 / 1.4.1 checkout, but I think this might do what you want for the SVN trunk. It will change the normals for all (non identity scaled) terrains, so I'm not proposing it as a candidate, just as something that you might try to see if it fixes your problem. Just by looking at your co...
- Wed Aug 27, 2008 10:41 am
- Forum: Bug reports
- Topic: Normals calculation for terrain ignores scaling
- Replies: 23
- Views: 2783
Re: Normals calculation for terrain ignores scaling
Test case: #include <irrlicht.h> #include <iostream> #include <GL/gl.h> using namespace irr; using namespace core; using namespace scene; using namespace video; using namespace io; using namespace gui; //press space to toggle EMF_NORMALIZE_NORMALS for terrain class MyEventReceiver : public IEventRec...