-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior of VRML SpotLicht #176
Comments
There are two angles that determine how SpotLight lights up, cutOffAngle and beamWidth. The cutOffAngle is the outer cone angle, from which there is no more light. Within beamWidth the light is maximised, and there is a transition between beamWidth and cutOffAngle. cutOffAngle should always be larger than beamWidth. Tip: For your scene it is probably fine if you use a local light for each photo (set global to false), and group the light to the photo, then you can have as many lights as photos. |
Thanks. I understand the concept of the SpotLight and the angles. Imagine I shone a spotlight with cutOffAngle = 150 degrees and beamWidth = 50 degrees ( I know it must be in radians :-) The small spheres are the 3 narrow spotlights in Red, Green, and Blue. The point to -x (to the big square) See how the nearest squares are NOT illuminated. Olaf. |
I think I know what's causing the problems in your scene. Since you are probably using VRML 2.0 scenes, 'only' the Gouraud shader is used, which has a limited light fidelity. Only when you use the Phong shader, lights will cast nice gradients. However, this is only active by default for materials as of X3Dv4. You have two options: Either you change the header to |
Thanks, I will try this for sure. Glad it is not a bug... Olaf |
Also notices you still import |
I read about the .css no longer required... Most projects are copy-paste code. I will change it later. Thanks for you help, Olaf |
When working on a 3D photo gallery ( under construction at https://satadorus.eu/gallery/ ) I noticed some, I feel, strange behavior of the SpotLight mode.
I liked to place a SpotLight in front and above each image. The idea behind it was that if you are near a photo the spotlight turns on and is visible on the wall and the passe-partout.
I use a narrow beam and only a little falloff.
It looks like the spotlight only affects shapes that are COMPLETELY IN the beam. A shape close to the spotlight is not lighted at all.
The VRML documentation for version 2.0 says the spotlights affect shapes that INTERSECT with the beam.
Not sure this is a bug.
Note: there is NO spotlight in the code example above.
I do have a sample scene, but need to clean it up a bit.
Thanks,
Olaf
The text was updated successfully, but these errors were encountered: