Page 2 of 4

Re: Make Your Maps Shiny(er) With SSMF

Posted: 04 Feb 2010, 23:38
by Kloot
Oops, that should be fixed now with commit 9d3f1c7c9.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 06 Feb 2010, 13:25
by Beherith
Ok getting there :)
Now it seems to try to tile the specmap wrong, as well as there being splits where there shouldn't be, and the edges of maps seem to become fuzzy.

Also, it doesn't obey 0 specularity on alpha channel 0 (unless I'm mistaken in my interpretation and this is desired behavior.

Image

Image

Image

Re: Make Your Maps Shiny(er) With SSMF

Posted: 06 Feb 2010, 15:36
by Kloot
Now it seems to try to tile the specmap wrong, as well as there being splits where there shouldn't be
The stripe on blackalphachannel.jpg is a bug I'm working on now; what are the dimensions of your spectex image? [edit: resolved]
and the edges of maps seem to become fuzzy.
That was a bit of intentional laziness on my part, gone in git.
Also, it doesn't obey 0 specularity on alpha channel 0 (unless I'm mistaken in my interpretation and this is desired behavior.
You have to set the RGB values to 0 if you want zero specular contribution, not the alpha channel.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 06 Feb 2010, 16:29
by Beherith
Currently its 2k*2k for an 8k*8k texture map. Seems to be high enough rez.

Ah, so alpha only defines how "polished" the surface looks, and and the color is the amount of light that gets reflected for each color channel ?(added on the the pixels color values?)

Ill test latest git again, thanks!

Re: Make Your Maps Shiny(er) With SSMF

Posted: 06 Feb 2010, 18:01
by PicassoCT
neddies map would look great with that, if he evar released it..
buyitnowbeforeheleavestheci.jpg
(618.54 KiB) Downloaded 2 times

Re: Make Your Maps Shiny(er) With SSMF

Posted: 06 Feb 2010, 19:27
by Tribulex
PicassoCT wrote:neddies map would look great with that, if he evar released it..
[img]http://springrts.com/phpbb/download/file.php?id=3819[/img]
lmao i love u man

Re: Make Your Maps Shiny(er) With SSMF

Posted: 06 Feb 2010, 22:11
by Das Bruce
Appropriate use looks great.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 07 Feb 2010, 04:40
by Beherith
Which of the thus far posted screens do you count as appropriate?

Re: Make Your Maps Shiny(er) With SSMF

Posted: 07 Feb 2010, 05:34
by Argh
Question (since I've been a bit busy with some other things lately): how does this differ from pre-lighting the map? Do the specular highlights change as the camera moves? Still thinking that tiled normalmaps for detailmaps would produce a really superior effect, myself, if the specular factor was controllable (to prevent the "crinkly plastic" effect) but I am curious as to how the big-rez maps are working- I'd have thought at one-quarter resolution to diffuse rez, it'd be too blocky to really work well, but the screenshots certainly look promising :-)

Re: Make Your Maps Shiny(er) With SSMF

Posted: 07 Feb 2010, 05:43
by Das Bruce
Beherith wrote:Which of the thus far posted screens do you count as appropriate?
Your iceberg map. Although I'd have to see it live to be sure that it looks as good as it appears to, static images have the ability to create false contours.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 07 Feb 2010, 14:48
by Beherith
Kloot, I LOVE you!
Thanks for plugging in the shader, Im going to go nuts with it, since now its finally time to learn GLSL!

Re: Make Your Maps Shiny(er) With SSMF

Posted: 07 Feb 2010, 22:54
by Kloot
Argh wrote:how does this differ from pre-lighting the map?
It differs because you can't precompute highlights for every viewing position + angle. Lightmaps also don't play nice with terrain deformation.
Do the specular highlights change as the camera moves?
Yes, that's kind of the definition of specular lighting.
Still thinking that tiled normalmaps for detailmaps would produce a really superior effect, myself, if the specular factor was controllable
all in good time ;)
(to prevent the "crinkly plastic" effect)
The ubiquitous plastic look mostly comes from the lighting model itself. There exist better, physically-based models, but none that are as cheap to evaluate as good old (Blinn-)Phong.

Beherith wrote:Now it seems to try to tile the specmap wrong
Fixed locally; I'll commit the patch tomorrow.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 08 Feb 2010, 11:35
by Beherith
So, after a few more rounds of testing:
The tiliing screws up in different ways depending on the size of the speculartex. The spectex says
This
is an
SSMF
test

512
Image

4096
Image

2048
Image

Also, the features get all red.

And there are these odd brown spots on the east slopes of hills (where there are shadows and are pre shaded to be quite dark)

Re: Make Your Maps Shiny(er) With SSMF

Posted: 08 Feb 2010, 13:46
by Kloot
I've pushed the spectex tiling patch upstream; you'll need to update engine and base content.

About those red features, do they render normally if you turn shadows off? If so, can you check your infolog for any shader errors?

Re: Make Your Maps Shiny(er) With SSMF

Posted: 08 Feb 2010, 14:11
by Beherith
Damn, my main systems hdd gave up, it will be a while till I get it up and running again. No data loss though :)

Re: Make Your Maps Shiny(er) With SSMF

Posted: 08 Feb 2010, 22:10
by Argh
@Kloot: Thanks for answering my questions, this looks like it's going to be pretty damn awesome, will check it out as soon as I'm not buried under some other things.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 09 Feb 2010, 19:35
by Beherith
Woot, now it works with spectexes under 1k in size, for a 2k sized spectex it does this:

THIS IS
AN
SSMF

Image

Also, on a related note, i got the epicness to work:
Image

Re: Make Your Maps Shiny(er) With SSMF

Posted: 09 Feb 2010, 21:42
by Kloot
No luck reproducing that one so far I'm afraid, see http://img94.imageshack.us/img94/8915/ssbv2ssmf.png. There is no tiling with any of the attached three textures (2048x2048, 4096x4096, and 8192x8192 RGBA PNG's respectively). May be a driver bug or texture size limitation (although modern GPU's should handle even 8K textures just fine), but I'm not sure.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 09 Feb 2010, 22:00
by Beherith
Dunno, drivers are garden fresh, gpu isnt all that old (8800gt), ill try more to reproduce it. Nothing in the shader logs either.

Re: Make Your Maps Shiny(er) With SSMF

Posted: 09 Feb 2010, 22:18
by Das Bruce
Beherith wrote:Also, on a related note, i got the epicness to work:
http://beherith.eat-peet.net/stuff/screen00002.jpg
What do you mean, "epicness"?