Page 2 of 2
Re: All about splatting specular SMF - SSMF tutorial
Posted: 29 Aug 2010, 01:38
by Nixa
Hurmph hurmph maybe its time to start mapping again
Re: All about splatting specular SMF - SSMF tutorial
Posted: 30 Sep 2010, 21:35
by Argh
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
Re: All about splatting specular SMF - SSMF tutorial
Posted: 19 Feb 2011, 00:45
by Kloot
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
Re: All about splatting specular SMF - SSMF tutorial
Posted: 19 Feb 2011, 01:06
by jK
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.
Re: All about splatting specular SMF - SSMF tutorial
Posted: 19 Feb 2011, 11:18
by Kloot
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.
Re: All about splatting specular SMF - SSMF tutorial
Posted: 19 Feb 2011, 12:02
by Beherith
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.
Re: All about splatting specular SMF - SSMF tutorial
Posted: 19 Feb 2011, 14:03
by jK
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.
Re: All about splatting specular SMF - SSMF tutorial
Posted: 11 Jul 2011, 01:03
by Forboding Angel
What setting controls the aggressiveness of the splatting?
I'd like to be able to avoid this:
NM, found it. Splattex alpha channel.
Re: All about splatting specular SMF - SSMF tutorial
Posted: 11 Jul 2011, 05:11
by jK
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.
Re: All about splatting specular SMF - SSMF tutorial
Posted: 11 Jul 2011, 09:31
by Beherith
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;
}