UT-style poly light rays for QuArK/WC: A mini-tutorial.
by Eric Forhan · in Torque Game Engine · 09/21/2002 (10:10 pm) · 3 replies
If you've ever played Unreal Tournament, you've seen them. Box-like rays of light shining from lights above;fading as they reach toward the ground. Max Robinson has a great version which is likely better suited, and hopefully he will be adding it as a resource. However, this version can be done completely in QuArK or WorldCraft Hammer--something many have requested.
It's uncanny how alike these lights are to the UT originals. Like UT, if the player is under the light, looking straight up, it disappears. If looking fron an angle, only two of the sides show--just as in UT. With this little tutorial, we can take that a step further and use round rays.
There are limitations, though, and it would take some changes in map2dif or Torque itself to get them working properly. Perhaps someone can offer some simpler solutions.
First issue is that alpha mapped transparencies need to be enabled. Desmond Fletcher shows us howhere.
Realize that this has issues of it's own, the major that I've run into is all alpha mapped EMBMs turn transparent, and it may or may not mess with textured fog.
The next issue is that these rays will be like a solid, so that nothing can pass through them. If there is a way to do this, I don't know it. So, you may have to limit these to places the player will never need to walk or shoot through.
The final issue is lighting. You will need to get creative with light entities to make the sides look correct. Perhaps it would only take two well placed lights (on the corner/edges) to do the job.
To make the light polgon:
*create an alpha-mapped texture that goes from full light yellow (your choice) to full transparency. I highly recommend making a copy that has an arrow pointing from top to bottom for use only in QuArK/WC so it is easy to be sure the rays are facing in the proper direction.
...*Create a cube in QuArK/WC
...*Lengthen cube
...*Adjust one end of the cube so it is wider than the other end
...*Texture the long sides of the brush. Adjust it so the texture scales to fit each side. Make sure texture runs the right way so the fade is toward the larger end.
...*texture the short sides (top and bottom) with the null texture.
...*place light entities as needed.
...*copy-n-paste to save time for other lights.
There's no reason this couldn't be applied to a cylinder for a round light effect.
I'd love to see more done with this. It could make life easier for mappers, as well as a richer game environment. Please feel free to experiment, adjust, and make comments. Most of all, have fun! ;-)
Eric
www.midnightryder.com
It's uncanny how alike these lights are to the UT originals. Like UT, if the player is under the light, looking straight up, it disappears. If looking fron an angle, only two of the sides show--just as in UT. With this little tutorial, we can take that a step further and use round rays.
There are limitations, though, and it would take some changes in map2dif or Torque itself to get them working properly. Perhaps someone can offer some simpler solutions.
First issue is that alpha mapped transparencies need to be enabled. Desmond Fletcher shows us howhere.
Realize that this has issues of it's own, the major that I've run into is all alpha mapped EMBMs turn transparent, and it may or may not mess with textured fog.
The next issue is that these rays will be like a solid, so that nothing can pass through them. If there is a way to do this, I don't know it. So, you may have to limit these to places the player will never need to walk or shoot through.
The final issue is lighting. You will need to get creative with light entities to make the sides look correct. Perhaps it would only take two well placed lights (on the corner/edges) to do the job.
To make the light polgon:
*create an alpha-mapped texture that goes from full light yellow (your choice) to full transparency. I highly recommend making a copy that has an arrow pointing from top to bottom for use only in QuArK/WC so it is easy to be sure the rays are facing in the proper direction.
...*Create a cube in QuArK/WC
...*Lengthen cube
...*Adjust one end of the cube so it is wider than the other end
...*Texture the long sides of the brush. Adjust it so the texture scales to fit each side. Make sure texture runs the right way so the fade is toward the larger end.
...*texture the short sides (top and bottom) with the null texture.
...*place light entities as needed.
...*copy-n-paste to save time for other lights.
There's no reason this couldn't be applied to a cylinder for a round light effect.
I'd love to see more done with this. It could make life easier for mappers, as well as a richer game environment. Please feel free to experiment, adjust, and make comments. Most of all, have fun! ;-)
Eric
www.midnightryder.com
About the author
#2
09/24/2002 (7:26 pm)
its really better to just use a dts object for the light ray.. there are too many issues with transparent dif objects
#3
As far as I know, there's no Torque entity to remove the collision detection for a brush. =/
09/24/2002 (7:52 pm)
I'm sure there's a solution for the issues. We can use transparent objects with .dts. I imagine there's a similar way for .dif.As far as I know, there's no Torque entity to remove the collision detection for a brush. =/
Torque Owner Bryan Robertson