www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: JavaMan on November 25, 2007, 02:09:02 am

Title: Glass or shine on objects?
Post by: JavaMan on November 25, 2007, 02:09:02 am
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
Title: Re: Glass or shine on objects?
Post by: EgonOlsen on November 25, 2007, 02:23:06 pm
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 (http://www.jpct.net/download/tmp/viper.zip). Hope this helps.
Title: Re: Glass or shine on objects?
Post by: JavaMan on November 27, 2007, 04:10:47 am
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
Title: Re: Glass or shine on objects?
Post by: EgonOlsen on November 27, 2007, 08:42:32 am
No, order doesn't matter. Is this the software or the hardware renderer?
Title: Re: Glass or shine on objects?
Post by: JavaMan on November 30, 2007, 04:08:37 am
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