Author Topic: Glass or shine on objects?  (Read 4981 times)

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Glass or shine on objects?
« 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Glass or shine on objects?
« Reply #1 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. Hope this helps.

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Glass or shine on objects?
« Reply #2 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Glass or shine on objects?
« Reply #3 on: November 27, 2007, 08:42:32 am »
No, order doesn't matter. Is this the software or the hardware renderer?

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Glass or shine on objects?
« Reply #4 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