Long Compile times


(shazmax) #1

Well I’m moving from mountain to mountain. I’ve finally worked over the lockups, and some of the other issues I’ve been having (mostly user issues). But now I’m having extremely long compiles times using q3map2 with radiants -fast -light stage while testing my sky shader. Here’s the link of the compile - http://shaz.ionclan.net/issues/long_compile.txt

And the sky shader I’m trying to use:

textures/shaz_sky/old_shaz
{
qer_editorimage textures/shaz_sky/old_shaz.jpg
q3map_lightimage textures/shaz_sky/lightmap_01.tga

surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nodlight
q3map_globaltexture
q3map_skylight 1024 150

q3map_sun 1.0 0.8 0.6 130 220 50

fogvars ( .3 .3 .38 ) .000065

skyparms - 512 -

{
	map textures/shaz_sky/shaz_cloud_alpha.tga
	tcMod scale 6 6
	tcMod scroll -0.001 -0.003
}

{
	map textures/shaz_sky/shaz_cloud01.tga
	blendfunc blend
	tcMod scale 2 1
	tcMod scroll 0.0005 0.00
}

}


(The Wanderer) #2

your q3map_skylight parameters are WAYYYY to high. Especially your iterations value. Take a look here for what values to use.
Also i would recomend upgrading to the latest version of q3map2 as Ydnar has made some changes which could give you better lighting and better compile times.


(ratty redemption) #3

definitely agree, you only need about 3 iterations for the new skylight, 5 at most, and your intensity (brightness) shouldn`t be above 200, if you have a q3map_sunext as well… their total brightness should be no more then about 300.

if after using those settings, your map outside is still very dark, then it could be your monitor settings are wrong.


(ratty redemption) #4

also I might be wrong, but I think the skylight line should be after the sunext line.


(shazmax) #5

Man that solves both my problems…my compiles are quick as lightning now. Lol no wonder. I was trying to port some old rctw shader to the parameters of the new settings: http://www.nibsworld.com/rtcw/the_mappers_diary_05.shtml


(shazmax) #6

Oh yea…and my map doesn’t look like its glowing.


(ratty redemption) #7

cool, plus if you want to speed up test compiles even more, try adding _lightmapscale 2 and gridsize 512 512 512 to worldspawn, which although less quality, is fine unless your testing the player brightness moving in or out of shadows (the light grid) or testing how some ents like misc models are lit, but for worldspawn brushes where high res shadows aren`t important, they both save time.

also if you haven`t already, learn how to use region compiles.


(shazmax) #8

Thnx ratty - I shoulda tested your shader first. I was trying to figure out how to do it on my own…but thnx for being there while I stumbled through this.


(shazmax) #9

Just for that I’ll post up the recent image. She’s not beautiful yet…but I’m getting the colors down and such. I have the temple facing east and my sun is pointing directly at the face. I might offset the direction of the sun and try to hit it just a bit off angle to give it some drama.


(ratty redemption) #10

your welcome, and I find a good way of learning what shader values to use, is to either ref to the new shader manual, which Im linking to in my sig from now on, or to do a windows search in the main\scripts folder for files containing the commands were looking for… then if several shaders have similar values or you recognize where in the maps there used, it can be a good start, before we tweak the values ourselves.

also it may seem obvious but when you get a good result, back up your shader file, incase the following tweaking you do messes up your values and you forget, like I sometimes do, what the good values were.

hope that makes sense?


(ratty redemption) #11

nice pic there and your definitely improving the lighting, but I just noticed your using the old q3map_sun and not the new q3map_sunext which uses penumbra (half) shadows, it`s also faster at compiling iirc.

and I wouldnt have the sun along the axis, as it often looks more natural if its a few degrees off.


(shazmax) #12

In the new pict I looked up the stuff you guyz were talking about with the changes to the code (enough changes already - j/k) - and this is what I’m using for the shader currently (still gotta change the sun angle) -

textures/shaz_sky/old_shaz
{
q3map_lightimage textures/shaz_sky/lightmap_01.tga
qer_editorimage textures/shaz_sky/old_shaz.jpg

q3map_sunext 1.0 0.8 0.6 130 0 50	
q3map_skylight 50 3

q3map_globaltexture	
q3map_nolightmap
q3map_backsplash -1 -1

fogvars ( .3 .3 .38 ) .000065
surfaceparm noimpact
surfaceparm nodlight
skyparms - 192 -

{
	map textures/shaz_sky/shaz_cloud_alpha.tga
	tcMod scroll -0.001 -0.003
	tcMod scale 6 6
	depthwrite
}

{
	map textures/shaz_sky/shaz_cloud01.tga
	tcMod scroll 0.0005 0.00
	tcMod scale 2 1
	blendfunc blend
}

}


(shazmax) #13

Oh and a thnx to you also wanderer for pointing the code changes needed. I knew there were changes and was trying to compensate for the changes to the:

q3map_lightsubdivide 1024
q3map_surfacelight 100

and just added the values of those two to the new

q3map_skylight 1024 100

  • thinking the changes it made were the values of the previous code.

(ratty redemption) #14

and just added the values of those two to the new

q3map_skylight 1024 100

easy enough mistake to make.

and your q3map2_sunext needs two additional values on the end, these are…

from Obsidian`s shader manual

[deviance] The number of degrees for the half-shadow. General values up to 2 or 3 are acceptable. The real sun has a solid angle of about half a degree.

[samples] The number of random jitters distributed over the solid arc (~16)


(shazmax) #15

When you get a chance let me know what your talking about for region compiles. I’m assuming using some batch form…but I haven’t heard too much about that. I know someone was going to post up his batch stuff, but I never saw him post it up.


(MadJack) #16

Region compile is when you take a bit of a whole map and work on that… Instead of having 20 000 brushes around in your views, you only have the area you want to work in.

Simply: Use a brush and make it over and around the area you’re working on. Make sure you’re around/over it on ALL axis. Then use the Region->Set Brush menu in Radiant and you’ll end up having only what was inside the brush. Very nice to work with.

Once you’re done, you can choose Region->Off. You can save region too and compile it. It’ll place the necessary spawns so you can walk around too.


(ratty redemption) #17

MadJack is right, but a quicker way I find is to zoom in out in the xy window so to shows all the brushes we want to work on, then use region menu\set xy.

when compiling this will also create a temporally skybox around the region painted with the radiant
otex.tga, which I changed mine to black so it looks better in game.

also note, if you compile your region with the camera high in the air the player will spawn and fall to their death, well this happen in rtcw, so probably still does in et.

and although no good for compiling, but excellent for working on just a few brushes at a time, is the region menu\set selected brushes, which I have bound to a key in my radiant\shortcuts.ini …you can change the path to that file in the prefs windows or the .pref file …the prefs used to be stored in a radiant.ini file in older versions of radiant.