Currently smoketrails are really annoying because of their lack of customization, especially how you can't remove it from some weapons while leaving it on others.
The following were mostly taken from Descent Freespace's trail tags:
TrailTexture: Self-explainatory. Theoretically it's already changeable but the Texture tag only affects the segment that's currently being emitted by the projectile, not the parts that are already there (those use the default texture).
TrailColor/TrailColorMap: Obviously the same old color tags we get everywhere, colormap would fade through all these colors as the trail fades out.
TrailTTL: Time to live. How long a given piece of the trail exists after being emitted.
TrailAlpha/TrailAlphaMap: Same as Color/ColorMap except for the alpha.
TrailWidth/TrailWidthMap: The width, either constant or going through a number of variables again.
TrailRate: How often a new segment is drawn. For weapons that perform quick turns this would need to be much lower than for slow missiles or unguided ones.
Preferrably, again, all weapontypes except beamlaser and lightning would be able to emit a trail with the right tags.
Trail customization
Moderator: Moderators
It's funny you just created that thread, because, just yesterday, I was fiddling precisely with custom missile trails! It bothered me that the pointer had a dull grey trail unfitting with the rest, so I took upon myself to redo, giving it more vivid color:

You asked for:
- Choosing your own texture for the trail.
- Using alpha on that texture.
Well, both are already possible, in 74b3. Have a closer look at that resources.tdf of yours.
But, like pointed out, or more precisely, exactly opposite of what you pointed out, indeed it wouldn't use that texture for the first segment that's currently being emitted, only for older segments.
However, currently I have only one kind of smoke trail texture per mod, and maybe some mod will wants to use different kind of trail within the same mod.
TrailTexture: Already here. Just's it's per mod, and is bugged for the first segment.
TrailColor: No. The color is in the texture already.
TrailTTL: Ok
TrailAlpha: No. The alpha is already in the alpha channel of the texture .TGA.
TrailWidth: Ok.
TrailRate: I must point out that old TA had a tag, called "smokedelay", which, as indicated on Maestro excellent list of TA weapons tags, is the smoke dispersal interval expressed in seconds.
Why did you double every tag with an *Map ?

You asked for:
- Choosing your own texture for the trail.
- Using alpha on that texture.
Well, both are already possible, in 74b3. Have a closer look at that resources.tdf of yours.
But, like pointed out, or more precisely, exactly opposite of what you pointed out, indeed it wouldn't use that texture for the first segment that's currently being emitted, only for older segments.
However, currently I have only one kind of smoke trail texture per mod, and maybe some mod will wants to use different kind of trail within the same mod.
TrailTexture: Already here. Just's it's per mod, and is bugged for the first segment.
TrailColor: No. The color is in the texture already.
TrailTTL: Ok
TrailAlpha: No. The alpha is already in the alpha channel of the texture .TGA.
TrailWidth: Ok.
TrailRate: I must point out that old TA had a tag, called "smokedelay", which, as indicated on Maestro excellent list of TA weapons tags, is the smoke dispersal interval expressed in seconds.
Why did you double every tag with an *Map ?
The first segment texture is defined by the Texture2 tag in the weapon def, IIRC. Theoretically Texture2 should be valid for the ENTIRE trail but in practice it's not.
A *Map tag would work like the ColorMap tag in the explo gen, cycling through the listed values throughout the lifetime of the trail. So if you have ColorMap= 1 0 0 1, 0 1 0 1, 0 0 1 1; (ignore the colons, they're for readability and I think I just remembered that AlphaMap would be unnecessary) the trail would be red when emitted, green half way through its TTL and blue just before disappearing. Freespace had a startalpha and endalpha tag, I figured the maps Spring uses these days would be more useful. BTW, ColorMap will work for some projectile types in 75b1 AFAIK. RAVE GUN!!
A *Map tag would work like the ColorMap tag in the explo gen, cycling through the listed values throughout the lifetime of the trail. So if you have ColorMap= 1 0 0 1, 0 1 0 1, 0 0 1 1; (ignore the colons, they're for readability and I think I just remembered that AlphaMap would be unnecessary) the trail would be red when emitted, green half way through its TTL and blue just before disappearing. Freespace had a startalpha and endalpha tag, I figured the maps Spring uses these days would be more useful. BTW, ColorMap will work for some projectile types in 75b1 AFAIK. RAVE GUN!!
Thanks for the clarification. Well, I still think textured smoke trail is more awesome that color shifting trail.A *Map tag would work like the ColorMap tag in the explo gen, cycling through the listed values throughout the lifetime of the trail. So if you have ColorMap= 1 0 0 1, 0 1 0 1, 0 0 1 1; (ignore the colons, they're for readability and I think I just remembered that AlphaMap would be unnecessary) the trail would be red when emitted, green half way through its TTL and blue just before disappearing.
You know how to change the texture for the first segment, but not any other. I know how to change the texture for all segments but the first. By the power of our combined knowneldge, tada, we can texture the whole trail!KDR_11k wrote:The first segment texture is defined by the Texture2 tag in the weapon def, IIRC.
As an added benefit, we can use a special "start smoke" texture.
Just tested: Works!
Make two textures:
- smoketrail.tga
- startsmoketrail.tga
On these textures, you can have any color, lots of details, and alpha channel for semi transparency.
In the gamedata/resources.tdf, use:
.....
[projectiletextures]
{
smoketrail=dozerz/smoketrail.tga;
firsttrailtex=dozerz/startsmoketrail.tga;
...
}
Please note that the name firsttrailtex is an arbitrary name made up on the spot.
In the weapons TDF, use:
[Geometric]
{
.....
Texture2=firsttrailtex;
.....
}
And this is how I did:

It starts with a purple trail, then it becomes a red trail. Both using semi transparent textures.
Yes, it's not perfect, since:
- You can only have two trail textures: 1st bit, all other bit.
- All smoke trails must use the same "other bit" texture.
Also, it still lacks, or I don't know how to:
- Make the trail larger
- Control how long the trail last
- Control how long are each segment. I tried smokedelay, didn't seem to work.
But still, much of what you asked was already possible in Spring 74b3.
I knew how to texture the whole trail (as evident by the fact that I changed it in the resources.tdf) but what I want is multiple different trails since there are many weapons that would benefit from a nonstandard trail (e.g. railgun) but leave you with no missile weapons if you change the trail.zwzsg wrote:You know how to change the texture for the first segment, but not any other. I know how to change the texture for all segments but the first. By the power of our combined knowneldge, tada, we can texture the whole trail!
Also you can only have your color change on the first segment of the trail, not over the whole thing.