Iv already asked about this in the beginner forum, but as time passes I'm beginning to believe that this might be a bug!
Old topic
What it comes down to is that the dynamic lighting doesn't get updated with imported animations.
To understand this better, just imagine a scene with a dynamic light node and a cube. The light and the cube aren't moving, but the cube has an imported animation the makes it rotate. Logically, as the cube rotates, the side that faces the light is brighter than the other sides of the cube. Up to this point everything is as it should be.
But in my case, as the cube rotates, only one side of it is bright and the rest are dark no mater which direction the light is coming from. Its almost as if I'm using a lightmap, but I'm not!
The weird thing is that if I use a built in animation or manually rotate the cube (cube->setRotation(core::vector3df(0,speed,0));) the lightning is correctly updated.
This issue happens both in OpenGL and DirectX, and with .X or .MS3D meshes.
Any help on this matter is highly apreciated...
Dynamic light problem! [SOLVED]
Dynamic light problem! [SOLVED]
Last edited by Lovehina on Fri Jun 02, 2006 12:05 pm, edited 1 time in total.
This patching thing is a bit complicated, but I'm more concerned with compiling the engine... Iv read somewhere that I might need DirectX SDK + some other files. I'm just so afraid that I might include some bad files or exclude some important ones, and then maybe the engine will crash or wont run as well...
By the way, this is my first time doing this and I feel really scared, so I'm wondering if there is a tutorial on how to correctly apply a patch and then correctly rebuild the engine...?
PS: I'm using Visual Studio 2003
By the way, this is my first time doing this and I feel really scared, so I'm wondering if there is a tutorial on how to correctly apply a patch and then correctly rebuild the engine...?
PS: I'm using Visual Studio 2003
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
A short introduction to patches is found on my webpage (see 'What's a patch'). It's basically as follows: Change into the source/Irrlicht directory, call 'patch --binary -p1 </path/to/patchfile.patch' and recompile (unless there's an error). Recompiling should work by just opening the project file and pressing the compile button. You do need the DirectX SDK (even not the most recent one), but you'll find lots of information on this in the forums.
OMG!!! It works perfectly...! Thank you so much Hybrid, this thing has been bugging me for some time now.
Anyways I managed to patch and compile it without any problems...!
By the way, here is a screenshot. In this scene I have a rotating 5000+ poly model and 3 dynamic lights, and all the lights are updating correctly!
Anyways I managed to patch and compile it without any problems...!
By the way, here is a screenshot. In this scene I have a rotating 5000+ poly model and 3 dynamic lights, and all the lights are updating correctly!
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
hey hybrid, I opened irrlicht 1.0 source and I find this commented out
might it be why irrlicht 1.0 still mess up X files animations normals? I heard you implemented your patch with new 1.0 version, maybe you forgot to uncoment them and we got it compiled like this
by the way, I can't compile with DX sdk because I use VS6.0 (the company I work for has originals, but I have been working there for 2 days only)
Code: Select all
// transform vertices and normals
/*core::matrix4 mat = frame->LocalMatrix;
mat.makeInverse();
vcnt = buf->Vertices.size();
for (s32 u=0; u<vcnt; ++u)
{
mat.transformVect(buf->Vertices[u].Pos);
mat.inverseRotateVect(buf->Vertices[u].Normal);
}*/
by the way, I can't compile with DX sdk because I use VS6.0 (the company I work for has originals, but I have been working there for 2 days only)
what is this thing...
Sorry to go offtopic, but WOW does that model look smooth! nice job with the lighting, too!
New RF2 website at: http://realityfactory2.sourceforge.net/