R_speeds mistery


(Thej) #1

Ok i have a mistery that the devteam might solve, cause im at a loss quiete honestly.

i made 2 different versions of the map, one with vertext lit terrain, and one with lightmapped terrain.

for the lightmapped terrain i used the global _fog command and i refer to the following shader:

textures/eagle/fog
{
qer_editorimage textures/sfx/fog_grey1.tga

surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
surfaceparm fog

fogparms ( 0.2 0.2 0.2 ) 2400

}

i have my _farplanedist set at 600
same as the fogclip

my terrain has the following shader:

textures/snowrocket/terrain_base
{
q3map_lightmapMergable
q3map_lightmapaxis z
q3map_lightmapsize 512 512
q3map_normalimage textures/sd_bumpmaps/normalmap_terrain.tga
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
q3map_tcMod rotate 37
q3map_tcMod scale 1 1
surfaceparm landmine
surfaceparm snowsteps
}

textures/snowrocket/terrain_0
{
qer_editorimage textures/stone/mxsnow2.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/stone/mxsnow2.tga
rgbgen identity
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_1
{
qer_editorimage textures/snow_sd/mxrock4b_snow.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/snow_sd/mxrock4b_snow.tga
rgbgen identity
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_2
{
qer_editorimage textures/stone/mxsnow3.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/stone/mxsnow3.tga
rgbgen identity
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_3
{
qer_editorimage textures/stone/mxrock3h_snow.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/stone/mxrock3h_snow.tga
rgbgen identity
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_0to1
{
qer_editorimage textures/stone/mxsnow2.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/stone/mxsnow2.tga
rgbgen identity
}
{
map textures/snow_sd/mxrock4b_snow.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
alphaGen vertex
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_0to2
{
qer_editorimage textures/stone/mxsnow2.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/stone/mxsnow2.tga
rgbgen identity
}
{
map textures/stone/mxsnow3.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
alphaGen vertex
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_0to3
{
qer_editorimage textures/stone/mxsnow2.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/stone/mxsnow2.tga
rgbgen identity
}
{
map textures/stone/mxrock3h_snow.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
alphaGen vertex
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_1to2
{
qer_editorimage textures/snow_sd/mxrock4b_snow.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/snow_sd/mxrock4b_snow.tga
rgbgen identity
}
{
map textures/stone/mxsnow3.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
alphaGen vertex
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_1to3
{
qer_editorimage textures/snow_sd/mxrock4b_snow.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/snow_sd/mxrock4b_snow.tga
rgbgen identity
}
{
map textures/stone/mxrock3h_snow.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
alphaGen vertex
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

textures/snowrocket/terrain_2to3
{
qer_editorimage textures/stone/mxsnow3.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/stone/mxsnow3.tga
rgbgen identity
}
{
map textures/stone/mxrock3h_snow.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
alphaGen vertex
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}

and my r_speeds are like this:

now comes the vertex lit map with the same _farplanedist and fogclip as lightmapped terrain

shader for sky:

textures/eagle/Sky
{
qer_editorimage textures/eagle/sky_m01dmcmp
q3map_globaltexture
q3map_lightsubdivide 1024
q3map_sun 0.55 0.55 0.55 90 220 60
q3map_surfacelight 90
skyparms - 200 -
surfaceparm nodlight
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm sky
fogvars ( 0.2 0.2 0.2 ) 2300
}
shader for terrain:

textures/rocketbase/terrain.vertex
{
surfaceparm landmine
surfaceparm snowsteps
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/snow_sd/snow_var01.tga
rgbgen identity
rgbGen vertex
tcmod scale 0.04 0.04
}
}

textures/rocketbase/terrain_0
{
surfaceparm landmine
surfaceparm snowsteps
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/snow_sd/snow_var01.tga
rgbGen vertex
rgbgen identity
tcmod scale 0.04 0.04
}
}

textures/rocketbase/terrain_1
{
surfaceparm landmine
surfaceparm snowsteps
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/snow_sd/snow_var02.tga
rgbGen vertex
rgbgen identity
tcmod scale 0.04 0.04
}
}

textures/rocketbase/terrain_2
{
surfaceparm landmine
surfaceparm snowsteps
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/snow_sd/mxrock4b_snow.tga
rgbGen vertex
rgbgen identity
tcmod scale 0.04 0.04
}
}

textures/rocketbase/terrain_0to1
{
surfaceparm landmine
surfaceparm snowsteps
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/snow_sd/snow_var01.tga
rgbGen vertex
rgbgen identity
alphaGen vertex
tcmod scale 0.04 0.04
}
{
map textures/snow_sd/snow_var02.tga
rgbgen identity
rgbGen vertex
alphaGen vertex
tcmod scale 0.04 0.04
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
}

textures/rocketbase/terrain_0to2
{
surfaceparm landmine
surfaceparm snowsteps
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/snow_sd/snow_var01.tga
rgbGen vertex
rgbgen identity
alphaGen vertex
tcmod scale 0.04 0.04
}
{
map textures/snow_sd/mxrock4b_snow.tga
rgbgen identity
rgbGen vertex
alphaGen vertex
tcmod scale 0.04 0.04
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
}

textures/rocketbase/terrain_1to2
{
surfaceparm landmine
surfaceparm snowsteps
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/snow_sd/snow_var02.tga
rgbgen identity
rgbGen vertex
alphaGen vertex
tcmod scale 0.04 0.04
}
{
map textures/snow_sd/mxrock4b_snow.tga
rgbgen identity
rgbGen vertex
alphaGen vertex
tcmod scale 0.04 0.04
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
}

and the r_speeds piccie:

so u see there is a HUGE difference in r_speeds.
btw for some reason i cant place landmines on the vertex lit terrain or there doesnt flock up snow when u fire on the terrain.

Hope someone can solve the mistery

Grts Thej


(SCDS_reyalP) #2

Do you see any difference with
/r_showtris 2

In the lightmap version, you don’t seem to be using the base shader you created:

textures/snowrocket/terrain_base


textures/snowrocket/terrain_1
{
qer_editorimage textures/snow_sd/mxrock4b_snow.tga
q3map_baseshader textures/fueldump/terrain_base

which could explain the lack of landmines and snow effects.

I also assume that

q3map_normalimage textures/sd_bumpmaps/normalmap_terrain.tga

should refer to something that you created.

BTW, if your farplanedist is 600, and you fog distance is 2400, it seems to me you will get ‘popping’ as stuff comes into view. Depending on your map, this may not be obvious.

For triangles to be completely culled, not only do they have to be beyond the far distance, but their entire leaf volume (? terminology) has to be beyond that distance. So how much actually gets culled depends on your blocksize and other structure. Looking at your map with the portal viewer plugin may help you see what is going on in that respect.

I assume you did a full vis (not a vis -fast) in both cases ?

FWIW I would also avoid using tcmod scale in your vertex lit shader. You can use a base shader and q3map_tcGen just like in the lightmapped version. Removing all the differences except the lighting stuff should also help you isolate the r_speeds issue.


(Thej) #3

Well i did look with r_showtris 2 and i could see alot more with the lightmapped terrain then with the vertex terrain.

And it is the vertex terrain where the landmines dont work, u copied a bit from the lightmap terrain :slight_smile:
i copied the lightmapped terrain from fueldump, so it should work properly i think, but missing that one thing (q3map_baseshader textures/fueldump/terrain_base )might cause the problem, so i will look into that. thx for spotting that btw :smiley:

and the farplanedist is just enough for things not to pop into view.

for compiling i did single bsp-meta
and then single-vis on both cases.


(Thej) #4

ok, i changed that bit in the terrain shader(q3map_baseshader textures/fueldump/terrain_base), but still no luck :< didnt change the r_speeds at all.


(Thej) #5

well it seems i solved the problem by reducing the lightmapsize.
Original:q3map_lightmapsize 512 512
new:q3map_lightmapsize 128 128

teh r_speeds went from 30000 to 19000 at gate

But im afraid this will fuck up my lighting very bad :<

Any comments??


(SCDS_reyalP) #6

Does it look bad ? you might notice seams where the lightmaps meet. If not, then don’t worry about it.

I suspect what you are seeing might be related to this:
http://www.splashdamage.com/forums/viewtopic.php?t=877

If it is related to the above, breaking your terrain up into a few sections could be a viable workaround. I think there is a way to tell each one to use a subset of the alphamap, so you would not have to split that up. Perhaps there is a better way…