View topic - Make Your Maps Shiny(er) With SSMF


All times are UTC + 1 hour


Post new topic Reply to topic  [ 74 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: 01 Feb 2010, 18:40 
Spring Developer

Joined: 08 Oct 2006, 15:58
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:
...
[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.


Last edited by Kloot on 02 Feb 2010, 01:32, edited 1 time in total.
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 18:59 
Map Creator
User avatar

Joined: 23 Jan 2008, 18:29
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... :)
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 19:02 
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
1. What is the size specification for the specular texture?

2.
Quote:
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.
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 19:25 
Engines Of War Developer

Joined: 09 Jun 2005, 22:39
Location: Germany, the EU
Sounds interesting - blinding snow map, away!
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 19:46 
Spring Developer

Joined: 08 Oct 2006, 15:58
Quote:
What is the size specification for the specular texture?


There is none, it can have any size. However, if ...

Quote:
specular texture size < diffuse


... then you won't get true per-pixel control, of course.

Quote:
IOW, does it stretch, or does it just tile?


Stretch.

Quote:
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.


Last edited by Kloot on 08 Feb 2010, 19:03, edited 1 time in total.
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 21:40 
Supreme Annihilation Maintainer
User avatar

Joined: 11 Jan 2008, 16:55
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.
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 22:03 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
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.
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 22:06 
Community Representative
User avatar

Joined: 08 Sep 2008, 21:59
Location: small cars
hells yes.

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

what can we expect in terms of performance impact?
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 22:09 
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Quote:
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.
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 22:39 
Map Creator
User avatar

Joined: 10 Mar 2006, 10:24
Location: waiting in line for The Expendables 2
awesome :-)

neddies ice is finally possible?
Top
 Offline Profile  
 
PostPosted: 01 Feb 2010, 22:50 
Community Lead
User avatar

Joined: 10 Apr 2006, 04:05
Location: Finland, 1944
I guess it is a good thing I haven't finished the map Picasso and I are working on.
Top
 Offline Profile  
 
PostPosted: 02 Feb 2010, 13:13 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
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?
Top
 Offline Profile  
 
PostPosted: 02 Feb 2010, 20:51 
Map Creator
User avatar

Joined: 14 May 2006, 11:22
Location: san antonio, tx
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.
Top
 Offline Profile  
 
PostPosted: 03 Feb 2010, 06:59 
Supreme Annihilation Maintainer
User avatar

Joined: 11 Jan 2008, 16:55
*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.
Top
 Offline Profile  
 
PostPosted: 03 Feb 2010, 07:37 
Moderator
User avatar

Joined: 23 Nov 2005, 06:16
Location: Dunedin, New Zealand
Is there a practical application for this? because currently it looks like shiny shit.
Top
 Offline Profile  
 
PostPosted: 03 Feb 2010, 12:17 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
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 :)
Top
 Offline Profile  
 
PostPosted: 03 Feb 2010, 19:40 
Map Creator
User avatar

Joined: 14 May 2006, 11:22
Location: san antonio, tx
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
Top
 Offline Profile  
 
PostPosted: 03 Feb 2010, 19:47 
Lobby Developer

Joined: 16 Mar 2007, 18:27
Das Bruce wrote:
Is there a practical application for this? because currently it looks like shiny shit.

Image
Top
 Offline Profile  
 
PostPosted: 03 Feb 2010, 19:49 
User avatar

Joined: 23 Oct 2004, 00:43
Kernel Panic needs an Apple-themed map.
Top
 Offline Profile  
 
PostPosted: 04 Feb 2010, 22:53 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Kloot, it doesnt work :(
I tried with git build from feb 3. and did it like you posted :(
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 74 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.