New .82 spring is bringing some amazingly powerful tools for mappers. All of this is made possible with Kloot's amazing SSMF shader.
The first is Specular mapping. Specular mapping specifies the shininess of the whole map. The image specified will be streched over the whole map.
The specular map image is an RGBA image (sizes should be power of two) that gets streched over the whole map.
The color component in the RGBA image will specify the color of the specular reflections. Since the specular color gets added to the original map texture color, so you should make it fully black where you dont want specular, and some very dark color where you do want it.
The alpha channel specifies the exponent of the specular reflection. This means 'shininess'. A value of 0 means the exponent is 1, a value of 255 means 16, which is a more polished, smooth surface.
Splat mapping: This is an evolution of the detail texture. Basically, you have 4 detail textures, and you choose where to apply each one with the distribution map.
How do you do this? The complexity of this method arises from performance reasons. All 4 detail textures reside in 1 image, and all 4 distribution maps lie in another.
The detail textures: These must be 8 bit greyscale (sorry, no color ), and you have to place each in a different channel of an RGBA image. The first greyscale detail texture goes into the red channel, the second into green, the third into blue and the fourth into alpha.
The same applies to the distribution maps, all 4 go into one RGBA image, as described above.
Where the corresponding channel of the detail texture map is 255 (full color or alpha) the detail texture will be painted on in full. Where it is 0, that detail texture wont be visible.
SMD parameters:
Code:
[MAP] { Description=Moor_v2 by [teh]Beherith, for up to 16 players. mysterme@gmail.com; TidalStrength=21; Gravity=115; MaxMetal=1; ExtractorRadius=90; MapHardness=185; AutoShowMetal=1; Detailtex=detailtex.bmp; SpecularTex=specularmap.bmp; SplatDistrTex=splatdistribution.tga; splatDetailTex=splattex.tga;
Detailtex The old detail texture, will be used to fall back on in case SSMF isnt available or disabled in your current rendering mode. (SSMF needs shadows on). If unspecified, will use spring default detail texture.
SpecularTex This is your specular texture. An RGBA image with power of two (128, 512, 1024, ...) dimensions. If unspecified, SSMF will not be enabled. So if you want to use splatting but not specular, you still need an empty black image (preferably 1 by 1 pixel size).
SplatDistrTex The detail distribution texture. A power of 2 sized RGBA image, with the areas where you want a specific detail texture applied marked with color for each channel.
SplatDetailTex An RGBA power of 2 sized image where each channel is a greyscale detail texture, whose distribution over the map will be specified by SplatDistrTex SplatTexScales Specifies the resolution at which each detail tex will be tiled on. Defaults to 0.02 0.02 0.02 0.02. Lower values mean lower resolution.
SplatTexMults Specifies the intensity a texture will be overlayed with. Values of 0 means that the corresponding textures wont be painted at all. Defaults to 1 1 1 1.
Example splatdetailtex: Note how the first is a snowy detail, the second is rocky, the third is like frozen ground. Then they get combined into the full splat detail texture.
Example Splatdistrtex: This is the distribution of my map Melt. It shows the snowy areas in red, the rocky bits in green and the frozen ground in blue.
Things possible with this are, but not limited to:
This texture must be the same size as specularTex. If it is defined, then the diffuse color of the map is linearly mixed per-channel with the color of the sky, with skyReflectModTex providing the RGB mixing factors.
The splat distribution image can't be larger than the height map of the map, or else the detail textures outside of the northwest corner get jumbled up. It's not a huge problem, but I'm just putting it out there for everyone's knowledge.
The thing that really irks me is that fact that shadows have to be enabled for SSMF to be enabled. Why does it have to be that way? That just completely crushed my hopes of ever actually seeing this work. And I'm pretty sure I'm not the only one who is not willing to sacrifice performance for graphics.
Using a specular texture of complete black will cause ugly black "shadows." Example of the problem: When I set the specular texture to one with values of 2, the shadows disappeared, while the map remained pleasantly unshiny.
Mmm, though there have been a lot of attempts to get LoS mode 'right' and yet still most mods dont use it for some objection or another: Too dark, too blue, too green, too this or that.
Presumably speed is the most important factor here though, which is why i raise the prospect to consider the plausibility, though perhaps it may be better posing the question in another venue.
also in the above code segment... i'm aware that the first three digits represent each individual channels scale/multiplier, but what does the fourth do? sort of an "overall multiplier" ?
also : i have got it to work, just in an ugly way, but i can see the possibilities and i think SSMF is pretty awesome
edit : oh right... might want to add that the SSMF stuff goes in the /maps/ folder, i discovered it thankfully by trial and error :>
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum