Project Rembrandt: Difference between revisions

Line 188: Line 188:
=== Adding lights to a model ===
=== Adding lights to a model ===


Only spotlights are implemented for the moment. The light volume must be part of the geometry of the model and be referenced in the animation file. No need to add a color or an effect to this volume. Light calculation is only done on the fragments covered by the light volume, but has no influence on the color or the attenuation of the light. Typical light volume for a spot light is a cone.
There are two things to consider: the appearance of the light source and the illuminated area. For the appearance of the light source (what you see when you look at the bulb), you need a model with an emissive material that will produce the glow effect and that is visible at night.
 
For the effect of the source on its environment (the lit area), we must have in the 3D model (the .ac file) a volume that includes the effect (Light Volume). It can be a large cone for spotlights or a sphere for point light. It's important that the light volume is closed, convex and it's normals are oriented outward.
 
Only spotlights are implemented for the moment. The light volume must be part of the geometry of the model and be referenced in the animation file. No need to add a color or an effect to this volume. Light calculation is only done on the fragments covered by the light volume, but has no influence on the color or the attenuation of the light.


All available animations are possible on the light volume. Axis and position are in object space and are transformed by the subsequent animations.
All available animations are possible on the light volume. Axis and position are in object space and are transformed by the subsequent animations.
269

edits