Flashlight
by University of Pisa (#0006) · in Torque Game Engine · 05/04/2006 (3:34 am) · 2 replies
Hi,
Flashlight resource have a different behavior on character and staticshape, I think something
as vertex lighting , respect to interiors and terrain.
I would like that on character and staticshape flashlight rendered as interiors.
It's possible?
Thanks in advance.
Flashlight resource have a different behavior on character and staticshape, I think something
as vertex lighting , respect to interiors and terrain.
I would like that on character and staticshape flashlight rendered as interiors.
It's possible?
Thanks in advance.
About the author
#2
Where are vertex array and triangle array in TSShape?
Where are process lights in TSShape?
Have you a suggest to make this?
05/05/2006 (7:20 am)
It's possible subdivide TSShape with octree or similar hierarchic structure and then looping on triangles belong to octree cell hit by light?Where are vertex array and triangle array in TSShape?
Where are process lights in TSShape?
Have you a suggest to make this?
Associate Manoel Neto
Default Studio Name
The light on terrain and interiors is drawn more or less by creating geometry based on the lit surfaces. A texture is plastered on those surfaces with additive blending.
Both the interior and terrain are structured in ways which make it possible to fetch specific surfaces without much CPU cost, so it's possible to locate exactly which surfaces the light will be applied on, and use those to build the light geometry. Doing such thing for TSShapes would be very expensive, so those are lit using vertex lighting.
To get a light to render the same on a TSShape, you'll need to modify the rendering code to allow projective texturing. It's not straightforward, but it's possible if you're familiar with the rendering code. I remember someone was working on projecting textures on DTS shapes, for shadowing, but I haven't heard anything since.