Game Development Community

How to create "texture projector effect"?

by Proaholic · in Torque Game Engine · 04/29/2008 (3:03 pm) · 6 replies

Is it possible to create "texture projector effect" for TGEA interior like www.ozone3d.net/tutorials/glsl_texturing_p08.php ?

www.ozone3d.net/tutorials/images/glsl_texturing/reverse_projection_problem.jpg

Actually i am trying to use LightMaskCubeMap ...
------------------------------------------------------
datablock sgLightObjectData(myLight) {
...
LightMaskCubeMap = "mycube";
...
}
------------------------------------------------------
But it work only with terrains and does not work with interiors :'(


Thanks!

#1
05/16/2008 (7:25 pm)
Have you tried decal projectors?

Quote:Decals can be configured to glow by setting their datablock property SelfIlluminated to true.

Decal projectors allow decals to be aimed and projected onto the first interior or terrain surface encountered. Decal projectors are found in Torque's Object Creator under Mission Objects -> environment -> sgDecalProjector.

From TDN. Just play around with them and I'm sure you'll figure out how they work. :]

EDIT: And if that isn't what you're looking for, I believe AFX can do exactly what's in your pic.
#2
05/16/2008 (7:58 pm)
If you look in starter.fps/server/scripts/sgExamples

datablock DecalData(GlowDecal)
{
   sizeX       = 2;
   sizeY       = 2;
   textureName = "starter.fps/data/shapes/lightingPack/Arrow";
   SelfIlluminated = true;
   LifeSpan = 1000000000;
};
This is what you are looking for. It's added thru the mission editor.
#3
05/17/2008 (11:36 am)
Cool, it's work!
Thanks!

But as you can see, it will work only with one plane only.
www.imageshare.web.id/images/kdcybkgv8j1l0fgipj7q.jpg
Anyway, thanks for good advice.
#4
05/18/2008 (9:00 pm)
Well, if that's not to your liking then I believe AFX has something that will work with multiple surfaces. Do some research on it first though.
#5
05/19/2008 (5:58 am)
FYI - Current AFX decals are only done with a vertical projection, which keeps some of the math quite simple, but does not do the kind of projections shown in the first pic.
#6
05/22/2008 (6:27 am)
IMHO the best solution for this task is a shaders.

It will allow me to use standard sgLightObjectData with LightMaskCubeMap.
As I told sgLightObjectData work fine with terrains and does not work with interiors.
Probably I must to modify some shaders, correct?

For example: "baseInterior" shader.
(Stronghold\game\shaders\baseInteriorV.hlsl and Stronghold\game\shaders\baseInteriorP.hlsl)

Thanks.