Page 1 of 4

Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 18:40
by Kloot
The next (probably non-minor) Spring release will support specular lighting for the SMF map format. You can enable this by adding one line to your map's SMD:

Code: Select all

...
[MAP] {
	...
	specularTex=myspeculartex.bmp;
	detailTex=mydetailtex.bmp;
	...
}
(BIG FAT NOTE: requires clients to have GLSL-spec hardware)

If specularTex points to a file that does not exist, you will get full unmoderated specularity based on whatever your map's lighting settings are:

http://img716.imageshack.us/img716/6774/ssmf0.png
http://img689.imageshack.us/img689/8/ssmf1.png
http://img707.imageshack.us/img707/4459/ssmf2.png
http://img13.imageshack.us/img13/1346/ssmf3.png
http://img693.imageshack.us/img693/7195/ssmf4.png
http://img693.imageshack.us/img693/6553/ssmf5.png
http://img697.imageshack.us/img697/7475/ssmf6.png
http://img69.imageshack.us/img69/7330/ssmf7.png
http://img713.imageshack.us/img713/1983/ssmf8.png
http://img695.imageshack.us/img695/6136/ssmf9.png

Otherwise, your specular texture's RGB channels will control the red, green, and blue contribution per highlight, and the A channel (multiplied by 16) becomes the specular exponent. This gives you per-pixel control over the color and intensity anywhere on the map. You could eg. make all highlights red, or have them depend on the type of material that a pixel represents, or something more exotic:

http://img714.imageshack.us/img714/5518/ssmf10.png
http://img707.imageshack.us/img707/2489/ssmf11.png

Have fun.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 18:59
by SirArtturi
Hmm.. nice... Pretty cool thing to play around. Maybe try out for "metallic" maps, however, according the screenshots, may need some delicate tweaking and adjustment to get it look properly for "natural" surfaces...

You got what you wanted Basic. Now we are waiting for your result... :)

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 19:02
by Argh
1. What is the size specification for the specular texture?

2.
This gives you per-pixel control over the color and intensity anywhere on the map.
Uh... how? If specular texture size < diffuse, how are we supposed to have that level of control? Say, for example, I want strong specular highlights on a "wet" area of a map, but very dull ones in the "dry" zones. How can I use this to get that done? IOW, does it stretch, or does it just tile?

3. Does this cause the detailtex to be treated as a normalmap, or just the heightmap? If both, then I could see this adding a huge amount of detail, albeit a bit generic.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 19:25
by SeanHeron
Sounds interesting - blinding snow map, away!

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 19:46
by Kloot
What is the size specification for the specular texture?
There is none, it can have any size. However, if ...
specular texture size < diffuse
... then you won't get true per-pixel control, of course.
IOW, does it stretch, or does it just tile?
Stretch.
Does this cause the detailtex to be treated as a normalmap, or just the heightmap?
Just the heightmap. I could throw in a "detailnormaltex", but that would probably look like noise.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 21:40
by Gota
SirArtturi wrote:Hmm.. nice... Pretty cool thing to play around. Maybe try out for "metallic" maps, however, according the screenshots, may need some delicate tweaking and adjustment to get it look properly for "natural" surfaces...

You got what you wanted Basic. Now we are waiting for your result... :)
HAHA
first I need to redo some of my old maps.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 22:03
by smoth
so we have 2 textures, one setting spec and one setting the diffuse? or is this something that is blanketed on the map. Sorry, I am unsure how this stuff works.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 22:06
by KaiserJ
hells yes.

i, more than many, can put this to good use. thanks sir.

what can we expect in terms of performance impact?

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 22:09
by Argh
I could throw in a "detailnormaltex", but that would probably look like noise.
That depends on the scale of the detail texture in tiles, really.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 22:39
by 1v0ry_k1ng
awesome :-)

neddies ice is finally possible?

Re: Make Your Maps Shiny(er) With SSMF

Posted: 01 Feb 2010, 22:50
by Neddie
I guess it is a good thing I haven't finished the map Picasso and I are working on.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 02 Feb 2010, 13:13
by Beherith
Woohoo! now I can finish that map...

Just a small tip to anyone planning to use this: Use 16 bit heightmaps! Or you will get banding. If you didnt draw/generate the heightmap at 16 bits, then upconvert it in photoshop/whatever and do a series of small radius gaussian blurs on it, and maybe even use the -l mapconv option.

Whats the performance cost on this?

Is there any reason this is engine side and not just a luashader gadget? Does that allow it to be faster?

Is this committed to git so i can test it?

Re: Make Your Maps Shiny(er) With SSMF

Posted: 02 Feb 2010, 20:51
by hunterw
Well done! This has been desired for a long time by a lot of people, including myself. Metal, crystal, and ice maps will be a lot more convincing now.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 03 Feb 2010, 06:59
by Gota
*Poor Trademark,having to redo like 100 metal maps he made.
Is it possible to add custom decals of explosions?
The default ones would probably look silly on crystal or ice maps.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 03 Feb 2010, 07:37
by Das Bruce
Is there a practical application for this? because currently it looks like shiny shit.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 03 Feb 2010, 12:17
by Beherith
Because all those test shots were made with specularity applied to the entire map. Otherwise it will look fine when used sparingly where needed.
Would rock if current git release would compile and I could actually test it :)

Re: Make Your Maps Shiny(er) With SSMF

Posted: 03 Feb 2010, 19:40
by hunterw
Das Bruce wrote:Is there a practical application for this? because currently it looks like shiny shit.
it'd look great on tundra if it was applied only to the glaciers

Re: Make Your Maps Shiny(er) With SSMF

Posted: 03 Feb 2010, 19:47
by Satirik
Das Bruce wrote:Is there a practical application for this? because currently it looks like shiny shit.
Image

Re: Make Your Maps Shiny(er) With SSMF

Posted: 03 Feb 2010, 19:49
by Pxtl
Kernel Panic needs an Apple-themed map.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 04 Feb 2010, 22:53
by Beherith
Kloot, it doesnt work :(
I tried with git build from feb 3. and did it like you posted :(