Shininess and Specular-Light

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
2mad

Shininess and Specular-Light

Post by 2mad »

Hi!

First of all: IRRLICHT IS GREAT!!!
Stable, easy to implement and loox good, too....good work Niko!

But of course i (still a irrlicht-newbie;)) got some questions:

1. How do i make my Objects have white specular highlights?! I tried it all the night.... and i'm tired now ;)

2. I have a 3Ds-File containing some objects. How can i set a Texture to
ONE of these? When i do a node->getTexture it puts this texture to all
the object of my 3Ds-file.

3. I have a roating object (a cube) and a light which should be attached
to my camera's position. Works fine width DirectX but in OpenGl the
light only points to one side of the cube (it even rotates with the cube!?!?)

Would be great if anyone of you could help me with that.

See ya
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Re: Shininess and Specular-Light

Post by niko »

2mad wrote: First of all: IRRLICHT IS GREAT!!!
Stable, easy to implement and loox good, too....good work Niko!
Thanx, nice to hear that you like it. :)

I tried out specular highlights out after I read your posting and I came to the conclusion that they don't work yet, I am very sorry. But its on my todo list now. :)

For changing just one texture, just get the number of the material and change this. For example:

node->getMaterial(0).Shininess = 10.0f;
node->getMaterial(0).SpecularColor.set(100,255,0,0);

The amount of materials in the node is getMaterialCount().

I don't know a solution to the problem with the spinning cube. Strange that it doesn't work in OpenGL. Could you post some code please?
Post Reply