Tracks for vehicles
Moderator: Moderators
Tracks for vehicles
Ehhh, heh, got a slight problem. I don't know what the different colors do.
Anybody know how I should use the colors here? I would greatly appreciate help.
Anybody know how I should use the colors here? I would greatly appreciate help.
You mean alpha transparency? Simply put, the alpha channel on your secondary texture is how you do transparency, which is useful for tracks. The white areas of the alpha channel are drawn; the black areas won't be.
Keep in mind, if you use this, that Spring does not draw S3Os double-sided, so avoid situations where it's going to be obvious that you can see through the "back" of things. With tracks, that's not a big problem, obviously.
Keep in mind, if you use this, that Spring does not draw S3Os double-sided, so avoid situations where it's going to be obvious that you can see through the "back" of things. With tracks, that's not a big problem, obviously.
Ok, IIRC (not at home, no Photoshop, so this answer is probably missing something important):
If you look at the image in Photoshop split out to the RGB channels (this can be done in GIMP, too), then you'll see that it's essentially a grayscale where real change is only on the RG channels, never B- B's value should always be 255. R's value default is 180- IIRC, you wanna leave it there, and just raise the value of G to make that part less-transparent.
So, for example, you want completely dark, no fuzz, areas of a track, the RGB value is 180, 255, 255. If you want it to be halfway-faded, the value is 180, 124, 255.
Making sense? In addition, I figured out that if I painted a grayscale, then (Photoshop, dunno how to with GIMP) did a fill of RGB 180, 0, 255 and the "overlay" setting, then it worked just fine- the black areas became 180, 0, 255, and everything else faded upwards properly. I think it was "overlay"... I'd have to try it again to be sure, though. At any rate, for simple tracks, you can just put in the values manually, and it'll work just fine.
Now, for the "fun" part! Because this part of Spring is... erm... I have no nice way of putting it... so let's move on...
Because Spring's handling of this is different from just about every other area, aside from Groundscars, which also use bizarre color formulae (I'm guessing that the weird colors are because this is really a normalmap, but I really don't know anything about the code side), and has some very big static assumptions, you're going to need to play around with things a lot, for anything that isn't just a simple treadmark. When I set up tracks for the Strider unit in NanoBlobs, I spent quite a few tries adjusting the positions of the dots, so they'd roughly match up with the stride-lengths and not look totally shabby. I've been thinking about whether or not I want units that aren't wheeled in PURE to use this, and thanks for reminding me how much I hated dealing with this
If you look at the image in Photoshop split out to the RGB channels (this can be done in GIMP, too), then you'll see that it's essentially a grayscale where real change is only on the RG channels, never B- B's value should always be 255. R's value default is 180- IIRC, you wanna leave it there, and just raise the value of G to make that part less-transparent.
So, for example, you want completely dark, no fuzz, areas of a track, the RGB value is 180, 255, 255. If you want it to be halfway-faded, the value is 180, 124, 255.
Making sense? In addition, I figured out that if I painted a grayscale, then (Photoshop, dunno how to with GIMP) did a fill of RGB 180, 0, 255 and the "overlay" setting, then it worked just fine- the black areas became 180, 0, 255, and everything else faded upwards properly. I think it was "overlay"... I'd have to try it again to be sure, though. At any rate, for simple tracks, you can just put in the values manually, and it'll work just fine.
Now, for the "fun" part! Because this part of Spring is... erm... I have no nice way of putting it... so let's move on...
Because Spring's handling of this is different from just about every other area, aside from Groundscars, which also use bizarre color formulae (I'm guessing that the weird colors are because this is really a normalmap, but I really don't know anything about the code side), and has some very big static assumptions, you're going to need to play around with things a lot, for anything that isn't just a simple treadmark. When I set up tracks for the Strider unit in NanoBlobs, I spent quite a few tries adjusting the positions of the dots, so they'd roughly match up with the stride-lengths and not look totally shabby. I've been thinking about whether or not I want units that aren't wheeled in PURE to use this, and thanks for reminding me how much I hated dealing with this

It's not that it's not a good idea. It's just that it will take some patience, and probably more than one try, before you end up with something that doesn't suck.
Also, keep in mind that one fairly-generic set of tracks can be used in a very wide variety of situations. You could take my Strider texture from NB, move the dots closer to the center, and probably make an OK infantry-footstep texture pretty fast. I never heard a single complaint from players that the footsteps of my walking units, which all use that same Strider texture and different scales, weren't doing what they needed to- so long as players can see a visual trail behind the unit, showing where it's been, that makes some sense- alternating footsteps for most walkers, lines with little fuzzy bits for tracked and wheeled things, and amazingly-cool cracked-ground spots for PURE's Nuclear Pogo Stick (kidding!), you're not likely to hear a lot of complaints.
I can imagine units where the trail might really "make" things. However, most of my imaginings on that topic involve being able to use trails that can have color values that aren't arbitrarily defined by Spring, and / or more control. You could fake a pretty fancy trail using timed COB stuff and CEGs, though, among other things...
Also, keep in mind that one fairly-generic set of tracks can be used in a very wide variety of situations. You could take my Strider texture from NB, move the dots closer to the center, and probably make an OK infantry-footstep texture pretty fast. I never heard a single complaint from players that the footsteps of my walking units, which all use that same Strider texture and different scales, weren't doing what they needed to- so long as players can see a visual trail behind the unit, showing where it's been, that makes some sense- alternating footsteps for most walkers, lines with little fuzzy bits for tracked and wheeled things, and amazingly-cool cracked-ground spots for PURE's Nuclear Pogo Stick (kidding!), you're not likely to hear a lot of complaints.
I can imagine units where the trail might really "make" things. However, most of my imaginings on that topic involve being able to use trails that can have color values that aren't arbitrarily defined by Spring, and / or more control. You could fake a pretty fancy trail using timed COB stuff and CEGs, though, among other things...
If you make your tracks into PNGS, and put .png after the track name for the unit.
You can divide your size by ONE FUCKING HUNDRED!
I changed my Lavtrack to a png from a bmp, wanna guess how small it is!?
It went from 48 KILOBYTES to 396 BYTES!
48,000 to 396. How is that for saving space...
My other one went from 48 kb to 352 BYTES, also.
Code: Select all
TrackType=LavTrack.png;
I changed my Lavtrack to a png from a bmp, wanna guess how small it is!?
It went from 48 KILOBYTES to 396 BYTES!
48,000 to 396. How is that for saving space...
My other one went from 48 kb to 352 BYTES, also.