Ok, now I got better what you have in mind. For example, you can have one single light for all the nodes that you can attach either to the top-most branch group of your scene graph or to the viewing platform, it's up to you. Then you can explicitly "scope" the light to the models that you want to highlight. The Light object has quite a good API for adding, inserting, removing, getting the scopes of a light. So when you want to light-up a model, just add it to the light scope. Hope that helps.
 
For the shading, maybe an ideea is to calculate the projection of your objects onto the surface where you want the shade to be visible, make a shape out of it and apply it as a decal. I've never tryied it anyway. Maybe others have better ideeas.
 
Cheers,
 
Florin
-----Urspr�ngliche Nachricht-----
Von: Alex [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 18. Oktober 2002 13:36
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] AW: [JAVA3D] Lighting

Hi All,
 
Thanks Florin for the quick reply. What if I only want the particular model to light up? I have more than 1 model in my branchgroup. And I do not intend to light up other models besides the one that my mouse is directly over. How do I set the InfluencingBound for the Light such that it only lights up that particular model?
 
Another question is how do I actually do shadow effect in Java3D? I know there aren't any ready made API for shadows, I just need to know the best way to deal with it.
 
Any help is appreciated.
 
- Alex -
----- Original Message -----
Sent: Friday, October 18, 2002 5:49 PM
Subject: [JAVA3D] AW: [JAVA3D] Lighting

Hi,
 
Each group that you want to be "highlighted" should have it's own light. The you simply switch the light on when the mouse is over your group or off when it's not. The light should be simply added directly to your group as any other normel scene graph object: group.addChild(<your light>)
 
Florin
-----Urspr�ngliche Nachricht-----
Von: Alex [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 18. Oktober 2002 11:15
An: [EMAIL PROTECTED]
Betreff: [JAVA3D] Lighting

Hi All,
 
I am facing a problem trying to shine a SpotLight onto a 3D model in my project. I need the lights to shine only when the user moves the mouse over the model. I manage to retrieve the location of the model when my mouse move over it but have very little idea how to attach the lights to the branchgroup where the model resides in. Any help is appreciated.
 
- Alex -

Reply via email to