Make Your Maps Shiny(er) With SSMF - Page 3

Make Your Maps Shiny(er) With SSMF

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

Note how close the camera is zoomed in, and yet the map does not look like shit. Achieved by splatting 4 different detail textures on.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Make Your Maps Shiny(er) With SSMF

Post by Argh »

...which means when normalmaps arrive, the epicness will be complete :-)
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Make Your Maps Shiny(er) With SSMF

Post by PicassoCT »

this wont turn into another sm3 debugdebakel?
i mean, will it be easy to use, just two additional black&white textures for mapconverter, one telling how strong the effect is, the other which detailtex is applied were?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

PicassoCT wrote:this wont turn into another sm3 debugdebakel?
i mean, will it be easy to use, just two additional black&white textures for mapconverter, one telling how strong the effect is, the other which detailtex is applied were?
Currently that is exactly how its done.
Im not sure about normal maps, to be honest, we seem to be doing a pretty good job of burning them on, and Im not sure that low resolution normal maps would even have a point, and resolutions on par with the smf textures might be a big load
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Make Your Maps Shiny(er) With SSMF

Post by Argh »

If the normalmap tiles were tiled like a detail tex, then they'd be plenty high in resolution, and add a terrific amount of apparent detail. Combine with a big spectex to determine the scale / color of said specularity, and there you go- map-wide control, lots of small details up close.

I guess you misunderstood where I was going with that, basically- I don't want normalmaps at the spectex resolution, that would look like ass.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Make Your Maps Shiny(er) With SSMF

Post by Das Bruce »

Beherith wrote:Note how close the camera is zoomed in, and yet the map does not look like shit. Achieved by splatting 4 different detail textures on.
Ahh, looks good man.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

Kloot, where do I have to dig around to add a tdf parameter to a map? I got it all in the engine, but the path string is hard coded atm cause I dont know what part of the code parses the tdf files. Just like the specularTex=... bit.

I know this sounds really noobish, but I did a ctrl+f on the codebase for speculartex and couldnt find any part relating to tdf loading :(
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Make Your Maps Shiny(er) With SSMF

Post by very_bad_soldier »

Beherith wrote: Currently that is exactly how its done.
Im not sure about normal maps, to be honest, we seem to be doing a pretty good job of burning them on
Wait, you mean baked-in normal maps? I thought normal maps were impossible to bake since they simulate real geometry and change appearance correctly when camera moves?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

Let me rephrase that; we use normal maps to bake lighting into the terrain knowing that the suns direction is fixed. And the results are quite decent.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Make Your Maps Shiny(er) With SSMF

Post by Kloot »

Beherith wrote:ill try more to reproduce it.
Do any of the textures that I uploaded get tiled if you assign them to your SSB map? One solution I have lined up would be to split the spectex into 1K chunks, but I'd rather not go there yet (unless this is a problem for more people too).

Also, can you verify that it always happens when sizeof(spectex) > 1024, or only when sizeof(spectex) > [sizeof(diffusetex) / 8]?
I dont know what part of the code parses the tdf files.
SMD parsing is the domain of the maphelper Lua scripts.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

Texture split bug is still there, but im ignoring it for now, as I have run into this:

Im passing a detailtexture distribution map to your shader, its a uniform sampler2D

If I use your code:

Code: Select all

vec4 detailCol = normalize((texture2D(detailTex, gl_TexCoord[4].st) * 2.0) - 1.0);
Then fps is 400 in my benchamrk case, and cpu use is 50%

If I use my code in the fragment shader (vertex shader unchanged, notice I use the speculartex coords for the detailtex distribution, fragment shader also the same with only these parts changing)

Code: Select all

	vec4 dc = (texture2D(detailTex, gl_TexCoord[4].st) * 2.0) - 1.0;
	vec4 dtd = texture2D(detailTexDist, tc2);
	float delta= dc.x*dtd.x + dc.y*dtd.y + dc.z*dtd.z+ dc.a*dtd.a;
	vec4 	detailCol = vec4( delta,delta,delta,0.5);
Then I get 380 fps, but 100% cpu use. I get this cpu use difference consistently every time I try this.

I also did

Code: Select all

float delta= dot(dc,dtd);
instead of

Code: Select all

float delta= dc.x*dtd.x + dc.y*dtd.y + dc.z*dtd.z+ dc.a*dtd.a;
In my solution, but that kept the 100% cpu use, and resulted in 2% less frame rate.
Im using a widget to set up pre defined camera states for benchmarks, and am using low terrain detail to make sure the gpu is doing alot of texture filling work.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

Been working on this.
What it still needs: water absorbtion - though that can be done without, if the perf cost is too high.
And map base fog - i wouldnt mind this going at all.

CPU use issue is unrelated.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

More of what it can do:

Image


Image

At the moment it can do a common, adjustable resulution based splatting of 4 different grayscale detail textures and and adjustable intensities for each detail texture. No performance loss on my hardware.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

Kloot rocks! http://github.com/spring/spring/commit/ ... 4059a33c2a

I have a few questions though:
Spring seems to use manhattan distance for fog. Doesnt length(vec3) use sqrt? Is this a performance hit?
Also, is this shader using the compatibility profile? Because if so, why not use the built in in float gl_FogFragCoord ?
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Make Your Maps Shiny(er) With SSMF

Post by Kloot »

Euclidean distance actually (standard for linear fog), so there was always a sqrt involved.

I think you mean gl_FogCoord (gl_FogFragCoord is an out-parameter for vertex shaders), which needs to be initialized via the FFP to be usable.

Water absorption will be cheap enough; I've got it almost-done locally.

Is your patch in a releasable state yet? ;)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Make Your Maps Shiny(er) With SSMF

Post by Argh »

OK... so...

1. Is this in current master yet?

2. If so, how do we test it out?

3. It still won't respond to light angles?

Really impressed with that beach, btw.
Last edited by Argh on 01 Mar 2010, 20:14, edited 1 time in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Make Your Maps Shiny(er) With SSMF

Post by Beherith »

I am very close to release, just need a smart way to handle fallback to the case where there is glsl map rendering but no detail tex splatting (fallback to old dtex)

Also, is there any reason we are not defining alot of the stuff as const?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Make Your Maps Shiny(er) With SSMF

Post by Argh »

If we want it to look correct for the lighting angle, we have to do that manually though, I take it?

And yes, there have been reports suggesting issues with const and ATi, although I really have my doubts that's the real problem.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Make Your Maps Shiny(er) With SSMF

Post by Kloot »

Argh wrote:OK... so...

1. Is this in current master yet?
Yes (as you could have inferred from the rest of this thread).
2. If so, how do we test it out?
Read the first post.
3. It still won't respond to light angles?
What?

Beherith wrote: Also, is there any reason we are not defining alot of the stuff as const?
ATI's tend not to like it.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Make Your Maps Shiny(er) With SSMF

Post by Argh »

What?
IOW, it's just a color overlay with alpha, not a bumpmap? I know it creates a specular highlight, but I'm trying to understand how that interacts with the camera angle, that's all.
Post Reply

Return to “Map Creation”