All about splatting specular SMF - SSMF tutorial - Page 2

All about splatting specular SMF - SSMF tutorial

Tutorials & Resources For Mappers

Moderator: Moderators

User avatar
Nixa
Posts: 350
Joined: 05 Oct 2006, 04:32

Re: All about splatting specular SMF - SSMF tutorial

Postby Nixa » 29 Aug 2010, 01:38

Hurmph hurmph maybe its time to start mapping again
0 x

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38
x 1

Re: All about splatting specular SMF - SSMF tutorial

Postby Argh » 30 Sep 2010, 21:35

Tried it out.

So... er...

No offense meant, but why is it doing specular stuff when I've set specular to all zeroes? Didn't I send you that version that didn't have these issues?

<reads shader>

Oh, so basically you didn't get it at all, all the problems are still there. Oh well, not my problem :mrgreen:
0 x

Kloot
Spring Developer
Posts: 1811
Joined: 08 Oct 2006, 16:58
x 83

Re: All about splatting specular SMF - SSMF tutorial

Postby Kloot » 19 Feb 2011, 00:45

Addendum #2: as of Spring 0.83, SSMF maps can be given more apparent detail through the use of an additive-overlay normal texture. The alpha-channel of this texture serves as the blending factor between the terrain and texture normals. Your map's SMD should contain

Code: Select all

[MAP] {
    ...
    detailNormalTex=detailNormalTex.png;
}


which produces

SSMFDetailNormals.png
(1.73 MiB) Downloaded 4 times
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30
x 2

Re: All about splatting specular SMF - SSMF tutorial

Postby jK » 19 Feb 2011, 01:06

Splatting the _detail_map across the whole map is a really bad idea.
It would be much better if you merged it into behe's algo.
Also you shouldn't blend the normalmap, instead you should multiply-add (and use the alpha as multiply-scale) and renormalize it, so the ground normal isn't lost.
0 x

Kloot
Spring Developer
Posts: 1811
Joined: 08 Oct 2006, 16:58
x 83

Re: All about splatting specular SMF - SSMF tutorial

Postby Kloot » 19 Feb 2011, 11:18

Read before you comment, nothing gets lost:

Code: Select all

// blend between original and rotated TS detail normal
normal = normalize((groundN * (1 - a)) + ((TBN * detailN) * a))


It's done with a non-tiling TS normal texture since those are much easier to generate, but I'll add the repeat-distribute variant as well.
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21
x 17

Re: All about splatting specular SMF - SSMF tutorial

Postby Beherith » 19 Feb 2011, 12:02

Nice stuff kloot, I think I'll give it a whirl. 1k by 1k should nearly match terrain anyway, and not give too much of a file size increase. My current SSMF additions usually result in 5 megs extra sd7 size.
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30
x 2

Re: All about splatting specular SMF - SSMF tutorial

Postby jK » 19 Feb 2011, 14:03

Kloot wrote:Read before you comment, nothing gets lost:

Code: Select all

// blend between original and rotated TS detail normal
normal = normalize((groundN * (1 - a)) + ((TBN * detailN) * a))
I read it very well and the ground normal is lost with alpha = 1.
The standard approach for merging normals is this:

Code: Select all

normal = normalize(normal1 + normal2 * a);

PS: there is also a blend function in GLSL.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14339
Joined: 17 Nov 2005, 02:43
x 81

Re: All about splatting specular SMF - SSMF tutorial

Postby Forboding Angel » 11 Jul 2011, 01:03

What setting controls the aggressiveness of the splatting?

I'd like to be able to avoid this: Image

NM, found it. Splattex alpha channel.
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30
x 2

Re: All about splatting specular SMF - SSMF tutorial

Postby jK » 11 Jul 2011, 05:11

erm no?

there are 4 splattex channels (RGBA) and each channel controls a separate splattex.
So you have 2 textures: one with 4 separate channels for the distribution (:= `aggressiveness`) and one detailtex with 4 separate detailmaps (each channel = one intensity-only detailmap).

So the `aggressiveness` is controlled via EACH channel. So if you want to reduce the effect of splattexB then you reduce the value in channelB.
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21
x 17

Re: All about splatting specular SMF - SSMF tutorial

Postby Beherith » 11 Jul 2011, 09:31

You can reduce the aggressiveness by making the channel closer to 0.5. But there is a method built in for this, its called:
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.

Code: Select all

[SPLATS] {
    SplatTexScales =0.006 .006 0.006 0.006;
    SplatTexMults = 0.3 .3 0.2 0.5;
  }
0 x


Return to “Map Tutorials & Resources”