CCloudSceneNode - clouds with levels of detail
If I turn on the light for clouds then there is no green colour but It hasn't the rain day effect (gray).
Why do you have the light off? I don't understand that commentary about the normal, I'don't see anythin ungly with light on (at least using cloud4.jpg).
So what could it be that without light I have some green coluour in some clouds?.
Thanks in advance.
Why do you have the light off? I don't understand that commentary about the normal, I'don't see anythin ungly with light on (at least using cloud4.jpg).
So what could it be that without light I have some green coluour in some clouds?.
Thanks in advance.
reply
i have some problems with this cloud scene node in irrlicht 1.4.1.
here goes: the clouds are rendered..but the textures no, the program is loading all the textures though, but the clouds appear like black sqares on the sky
any suggestions ?
here goes: the clouds are rendered..but the textures no, the program is loading all the textures though, but the clouds appear like black sqares on the sky
any suggestions ?
reply
no success
something is wrong in the code..cuz the cloud can't display the texture...though the texture is successfully loaded.
i've tried not to use alpha channels... just solid... and again..the texture doesn't show... there are only black squares on the sky
something is wrong in the code..cuz the cloud can't display the texture...though the texture is successfully loaded.
i've tried not to use alpha channels... just solid... and again..the texture doesn't show... there are only black squares on the sky
Yes, but you have the code, for both the node and the engine.
Split the task into tasklets. Test subsections of the code, parts of the nodes, etc. Make sure that the functions the node calls haven't had major changes. Then test that they do what they are supposed properly. Then go through the code, logging what must be and testing it all. Debugging is so often more programming than coding itself.
Split the task into tasklets. Test subsections of the code, parts of the nodes, etc. Make sure that the functions the node calls haven't had major changes. Then test that they do what they are supposed properly. Then go through the code, logging what must be and testing it all. Debugging is so often more programming than coding itself.
-
- Posts: 208
- Joined: Sun Apr 02, 2006 9:20 pm
I was having the same problem, I rebuilt the class using 1.4.2 and all of the clouds appeared as black squares.
I found that for some reason the material properties were not being set, if after the line: -
you put the lines: -
The program will work. Strangely the setMaterialFlag, setMaterialType and setMaterialTexture calls were not working on material properly. Altering ISceneNode.h to print pointer values showed that the Material and texture addresses were not the same inside the call as they were when set using the code above and compiling with gcc 3.4.5 mingw special.
This is just a work around its certainly not a fix and its also a bit worrying. However that aside once working the clouds do look pretty cool
I found that for some reason the material properties were not being set, if after the line: -
Code: Select all
clouds->setMaterialTexture( 0, txture );
Code: Select all
clouds->getMaterial(0).TextureLayer[0].Texture = txture;
clouds->getMaterial(0).Lighting = false;
clouds->getMaterial(0).MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
This is just a work around its certainly not a fix and its also a bit worrying. However that aside once working the clouds do look pretty cool
-
- Posts: 208
- Joined: Sun Apr 02, 2006 9:20 pm
I just had to update some custom scene nodes to 1.4.2 that had similar problems to the cloud node. After looking into it again it became obvious that the interface on the class has changed at some point: -
must have been something like: -
Correcting the interface so that it matches the updated ISceneNode corrects the problem in the other nodes.
Code: Select all
virtual video::SMaterial& getMaterial(u32 i) = 0;
virtual u32 getMaterialCount() const = 0;
Code: Select all
virtual video::SMaterial& getMaterial(s32 i) = 0;
virtual u32 getMaterialCount() = 0;
The demo works fine, however after compilation with Irrlicht 1.5, clouds are here but totally black, any idea why?
From this code : http://irrlicht-plugins.googlecode.com/ ... ode/media/
From this code : http://irrlicht-plugins.googlecode.com/ ... ode/media/
cloud scene node for 1.5
screenshot
code
http://www.geocities.com/zaros64/CCloudSceneNode015.zip
enjoy downloading.
screenshot
code
http://www.geocities.com/zaros64/CCloudSceneNode015.zip
enjoy downloading.