Page 1 of 1

Shininess

Posted: Sun Aug 22, 2004 5:12 pm
by melon
hi.
I already have found that:

scene::ISceneNode node->getMaterial(0).Shininess = 255.0f;

will not work, as it was said in thread: http://irrlicht.sourceforge.net/phpBB2/ ... iness#2541

Date of this information is 22 Aug 2003 and I'm not sure about what version of Irrlicht it is.

So maybe I just can't find way to make Shininess work but it WORKS?

There's no information about it in API documentation saying that it is NOT implemented.

Please help - how to make node shine? (few lines of code would be shortest and most helpful)

thanks

Posted: Mon Aug 23, 2004 2:23 pm
by melon2004
well, I even have registered on that forum ;) but no help about shining objects:(
I just forgot to mention, that I use OpenGL (on Linux platform), so maybe that's problem? Has DirectX driver more features implemented?

Posted: Mon Aug 23, 2004 2:44 pm
by Guest
i guess there is no big difference between directx and openGL. but if you use opengl you could use nvidia CG and use a "shininess" effect ?

btw: hello irrlicht forum! iam just new here ^^ to be honest iam a total irrlicht noob, but iam trying to become as smart as you guys :roll: we will meet again...

Posted: Mon Aug 23, 2004 5:25 pm
by bal
If you look at the API's themselves there are no big differences between OpenGL and DirectX, but niko just likes DirectX more and that's why it is more supported by Irrlicht. But IrrlichtNX is working on that :).

Posted: Mon Aug 23, 2004 5:52 pm
by melon2004
well, I've tried once to download NX from CVS, but had problem compiling it :( I will give it another chance ;) when I finish this project (time is running, and I have problems with wchat_t in gui!).

I worked around shining problem setting nice "pseudo" shining bitmap as texture with EMT_REFLECTION_2_LAYER. It works great for "golden" type of materials. If anyone is interested with that, I can post some code (but it's rather simple, nothing special)

Please post code!

Posted: Mon Aug 23, 2004 10:01 pm
by Guest
melon2004, Please post code, I've tried to do it before but couldn't get it working right.

Posted: Tue Aug 24, 2004 6:43 pm
by melon2004
node->setMaterialTexture(0, texture); //some bmp with light spots on it
node->getMaterial(0).AmbientColor = video::SColor(0,0,0,0);
node->getMaterial(0).Shininess = 255.0;
node->getMaterial(0).SpecularColor = video::SColor(255,255,255,255);
node->getMaterial(0).DiffuseColor = video::SColor(255,255,100,50);//this gives a little bit of red in shadows
node->getMaterial(0).EmissiveColor = video::SColor(255,10,10,10);
node->getMaterial(0).GouraudShading = true;//this is true by default;)
node->getMaterial(0).MaterialType = video::EMT_REFLECTION_2_LAYER;

I've just put all settings from some of my sources, some of them probably do nothing ;) (like Shininess I guess). Well, as you see, nothing special, but I'm glad if that will help.

Posted: Wed Sep 29, 2004 2:57 pm
by etcaptor
I 've not got Shininess to work. Someone?