Glass or shine on objects?

Started by JavaMan, November 25, 2007, 02:09:02 AM

Previous topic - Next topic

JavaMan

Quick question:
Can I make objects shiny? Like how light sometimes shines on an object( in the real world) and it creates a glare or shine on the object. I can't see how to do this.
THx
V

EgonOlsen

I think you talking about environment mapping? If so, here's a little example that shows the effect: http://www.jpct.net/download/tmp/viper.zip. Hope this helps.

JavaMan

HI I checked back and looked at the example. Yes that is want I want: that glare that is on the viper as it rotates. I am messing around with my test code to try to get it to work for me. Oh, does it matter if the call to setEnvmapMode(Object3D.ENVMAP_WORLDSPACE) happens after or before the object is added to the world? I can't get that glare effect just yet (my rotating sphere with a light placed to the top left of it looks the same with or without envmapping enabled); so are there any special restrictions or requirments for the envmapping to work?
Thanks for helping me out! ;D
V

EgonOlsen

No, order doesn't matter. Is this the software or the hardware renderer?

JavaMan

HI,
I got the envmapping working. I was using some different textures to try out different effects. Thanks for the sample program that is what showed me how to do the envmapping.
THanks!!
V