making bright objects like the tribes2 blaster projectile
by Glen Murphy · in Torque Game Engine · 05/01/2003 (5:55 am) · 15 replies
I can use the DTS and textures from the Tribes2 .vl2, but since that's exceedingly naughty, does anyone know how I could create a bright object like it? I've tried having 3 planes with a blaster-shaped texture with opacity, but it comes out looking a little naff.
I have a screenshot of mine vs the tribes2 one here
The T2 one seems to reference some weird tiny (1 or 2 pixel textures with names like blaster_aura), and the PNGs it uses is based on white-opacity. Using the T2 PNGs on my model results in non-translucent ugliness.
Any clues? I searched the documentation, but couldn't find any reference to brightness like this.
I have a screenshot of mine vs the tribes2 one here
The T2 one seems to reference some weird tiny (1 or 2 pixel textures with names like blaster_aura), and the PNGs it uses is based on white-opacity. Using the T2 PNGs on my model results in non-translucent ugliness.
Any clues? I searched the documentation, but couldn't find any reference to brightness like this.
#2
glBlendFunc(GL_ONE,GL_ONE);
05/01/2003 (2:18 pm)
This may be obvious but...have you tried additive blending?glBlendFunc(GL_ONE,GL_ONE);
#3
05/01/2003 (3:12 pm)
Luigi - I had figured that the effect came from additive blending, but (I'm guessing) the glBlendFunc is part of the C++ code, whereas the tribes2 blaster is just a straight DTS file. I'm wondering if there's an additive blending flag in the DTS format that Max2DTS doesn't cover?
#4
I hadn't expected max2dts to use any of the material properties beyond maps, but I found that if you clicked the 'additive' radio button under extended parameters - advanced transparancy - type, it does the obvious.
Ooo .. I wonder what other material properties are supported.
05/01/2003 (3:29 pm)
Solved it :)I hadn't expected max2dts to use any of the material properties beyond maps, but I found that if you clicked the 'additive' radio button under extended parameters - advanced transparancy - type, it does the obvious.
Ooo .. I wonder what other material properties are supported.
#5
The first quad formed the length of the projectile and is essentially what you see from the side and is what was posted above. It was rendered such that it always faces the camera. This works great until it is seen on-end in which case it becomes obvious that it's just a quad. So when the projectile is seen on-end within 5 degrees or so (controlled from datablock), the length quad starts to fade out and a cross-section quad fades in (blasterBoltCross.png). This makes the projectile look like a circle when it's coming directly at you, or traveling away.
Doing it as a .dts should work fine too; the way I did it would give a little more of a consistent look and it's drawing at most 2 quads, but usually only one.
Hope this didn't bore all of you to death, I didn't think the post would be so long ;)
05/01/2003 (5:41 pm)
Just thought I'd comment on this since I did the Tribes 2 blaster effect. I didn't use a .dts for the projectile. I created the projectile from 2 quads that were additively blended onto the scene. A datablock controlled the size of the two quads.The first quad formed the length of the projectile and is essentially what you see from the side and is what was posted above. It was rendered such that it always faces the camera. This works great until it is seen on-end in which case it becomes obvious that it's just a quad. So when the projectile is seen on-end within 5 degrees or so (controlled from datablock), the length quad starts to fade out and a cross-section quad fades in (blasterBoltCross.png). This makes the projectile look like a circle when it's coming directly at you, or traveling away.
Doing it as a .dts should work fine too; the way I did it would give a little more of a consistent look and it's drawing at most 2 quads, but usually only one.
Hope this didn't bore all of you to death, I didn't think the post would be so long ;)
#6
Shadows are affecting my shape when I do not want them to.
10/04/2003 (12:11 am)
Additive is not working for me, Subtractive makes it black but Additive looks the same as Filter. Any ideas?Shadows are affecting my shape when I do not want them to.
#7
Matt
10/04/2003 (4:15 am)
You can add a FX light data block in your script. You might try self illumination and see if it works. Add your texture to the slot.Matt
#8
10/04/2003 (6:47 am)
I could do that, except that I know it is possible to use self-illuminated models and I think there may be some tricks I am missing.
#9
Thanks, Sam.
10/04/2003 (11:01 am)
Matthew, you mentioned self illumination. I've looked all over for a way to do this but have had no luck. Are you refering to self lighting in max or in the engine? If you are talking about the engine I would like to know the functions involved so I can apply it to my lightning code.Thanks, Sam.
#10
Give me a day or 2 i'll try to get going. I remember I made it work some kinda way.
Matt
A little later on
I think I got it but I can'r figure out how start the fps section of the game. -mod fps behind my shortcut doesn't seem to work. Help me help you please.
10/04/2003 (3:05 pm)
I am trying to get my TGE stuff set back up. Hopefully I'll have it by tommorrow. With new demo and stuff I am having a little trouble setting up a project to test stuff out of. I got a little behind on the "How Too's"Give me a day or 2 i'll try to get going. I remember I made it work some kinda way.
Matt
A little later on
I think I got it but I can'r figure out how start the fps section of the game. -mod fps behind my shortcut doesn't seem to work. Help me help you please.
#11
10/06/2003 (6:07 am)
-game fps
#12
Diffuse and Ambient textures need to be unlocked (little lock icon), no matter what else you do that little lock will prevent the self-lighting from working.
10/09/2003 (5:45 pm)
After many days of trying material combos I worked out my problem.Diffuse and Ambient textures need to be unlocked (little lock icon), no matter what else you do that little lock will prevent the self-lighting from working.
#13
10/09/2003 (5:49 pm)
And you have to copy your image to the ambient slot so it is in both diffuse and ambient, both ticked.
#14
Matt
10/09/2003 (6:51 pm)
I tried that but I didn't really see a difference. I think the reason the muzzle flash is affected by shadows is because the Flash itself is a part of the gun and the gun is mounted the player. The player is affected by the shadows dynamicaly or somthing (not sure what they call it) I have been trying to use the projectile as the flash and scaling the projectile down but I haven't got it perfect yet but it works. The DTS projectile is not effected by the shadows. Matt
#15
10/10/2003 (12:06 am)
I dont think my bullet projectile is affect by shadows, but the textures are the key here and I think you need mult-res on the object too. AND it has to start at detail2 because it seems that at a distance the alpha is not used and you get the object becoming dim with opaque edges.
Torque Owner Matthew Jones
The lights might not have a great effect on a DTS shape but you could always add lights to your image. It would turn out like this:
Depnends on what your looking for. I did the above image with PaintShop Pro. Adobe has the same effect I think.
Matt