Jump to content

Enviroment map too small


Recommended Posts

textures/sp_terrain/ter_waterfull
{
	qer_editorimage	textures/sp_terrain/ter_waterfull
	qer_trans 0.75
	sort banner
	surfaceparm water
	surfaceparm nonsolid
	surfaceparm nomarks
	surfaceparm trans
	q3map_material water
	q3map_tessSize 1024
	deformvertexes normal 0.1 0.1
	deformvertexes wave 64 sin 0 0.5 0.2 1 
    {
        map textures/sp_terrain/ter_water1
        blendFunc GL_SRC_ALPHA GL_ONE
        rgbGen identity
        alphaGen vertex
        tcMod scroll 0.01 0.025
    }
	{
		map textures/sp_terrain/thesky_env1
		tcGen environment
        blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/sp_terrain/thesky_env2
		tcGen environment
        rgbGen const ( 1.00 0.95 0.79 )
        blendFunc GL_ONE GL_ONE
        glow
	}
}

 

So i been playing with my water shader and adding environment maps to it to create a nice reflection in my water. Up noted my shader for my water (weird indentation btw).

uuf4Xhv.jpg

 

This looks more like what i am seeking for, the glow actually works great on giving the illusion of bouncing light.  However (and i did remove the glow stage for the next screenshot, since i first though that was the issue) is that when i move further, my image get distorted and a black area appears (probably because the texture ended, the sun is more on the right side of my environment texture)

 

NrJhE3d.jpg

i am not sure how to force my image on that spot so you ll never see the black area cause when you look from oposite the sun, it now looks very (mr) wonk(o)y.

Anybody an idea?

mrwonko and mjt like this
Link to comment

There are a few things to take into account to make for decent water reflections - first you would want to use a bit lower q3map_tessSize

For example 128 or 256

That aside - I take it you're trying to achieve this for SinglePlayer in which case you're lucky - since SP projects the tcGen environment shader stage for horizontal surfaces while in MP it get's projected onto one of the main vertical axis.

 

I'll look up the exact steps I used to replicate this - here you can see roughly how the halfsphere mirrored on the surface you want to have this effect is projected onto the texture used in the tcGen environment shader stage:

SP:

spacer.png

MP - although tbh I should have made the horizon show up horizontally on this texture too:

spacer.png

 

You can use photoshop with the flexify plugin or bake things out in blender - baking out a halfsphere from the view the reflecting surface has into the world. For SP you'd have to cut it up into 4 sections and shift / rotate / mirror accordingly to get the proper result:

tcGen environment SP projection (links to youtube)

Lazarus likes this
Link to comment
  • Circa changed the title to Enviroment map too small

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...