Easygen Textures Problems


(oS!Digital) #1

Hi, i have got probs with textures, i made a terrain, but textures are too small for the terrain! one friend said to me i must modify anything on the shader but he dont remember what :bored: can u help me? :bump: here’s a ss :disgust: (Lol i like the smileys :cool: )

Digital (Connecting people lol that’s nokia :s)
:moo:


(DAbell) #2

When your creating the terrain in easygen you can adjust the scale of the texture on the terrain by pressing the + and - keys on your num pad this increases and decreases
scale of the texture.

I would suggest you do that and re-export you terrain.

D


(MindLink) #3

And don’t forget to add the easygen generated .shader file to your shaderlist.txt


(oS!Digital) #4

Thx, erroneus answers :banana:

Answer was:

U must change ur tcmod scale <number> <number> to other for example 0.250
tcmod scale 0.250 0.250

Now my terrain looks good :slight_smile:


(=DaRk=CrAzY-NuTTeR) #5

give us a screenie plz :banana:


(oS!Digital) #6

of the terrain?

compiled with bsp single -meta

:clap:


(capslock trojan) #7

hmmm who helpt :drink:


(oS!Digital) #8

U :clap:


(NOP) #9

@oS!Digital you should not use tcmod scale in your terrain shader because they’re completely unnecessary. If you absolutely need to scale your textures use q3map_tcMod scale which is much more efficient since it “bakes” the texture coordinates in the bsp instead of scaling them at run time.
Your problem was most likely caused because you didn’t add your shader file name to your shaderlist.txt file.
Post your shader file here because it seems that you’re using an outdated version of the easygen templates.

P.S. If you press Alt + PrintScreen you get a screenshot of the current active window only instead of the whole desktop.


(oS!Digital) #10

I added m8 ^^ and in the first ss i used wolfet template, my shaderlist:

// this file lists all the separate shader files

_unsorted
alpha
alpha_sd
assault
assault_rock
awf_props
battery
battery_wall
bbmodels_mapobjects
blimp
bunker_sd
castle_door
castle_floor
castle_window
castle_wood
chat
chat_window
chat_wood
chateau
common
decals
doors
eerie
egypt_door_sd
egypt_floor_sd
egypt_props_sd
egypt_rock_sd
egypt_trim_sd
egypt_walls_sd
egypt_windows_sd
egypt_wood_sd
factory_sd
fueldump
gfx_2d
gfx_clipboard
gfx_damage
gfx_hud
gfx_limbo
gfx_misc
goldrush
icons
levelshots
lights
liquids
liquids_sd
mapfx
metal_misc
metals_sd
miltary_door
miltary_trim
miltary_wall
models_ammo
models_foliage
models_furniture
models_mapobjects
models_multiplayer
models_players
models_shards
models_weapons2
mp_goldrush
mp_guns
mp_railgun
mp_rocket
mp_seawall
mp_siwa
mp_wurzburg
props
props_sd
radar
railgun_props
railway_sd
rock
rubble
seawall_wall
sfx
shadows
siwa_fx_sd
siwa_props_sd
siwa_skyboxes_sd
skies
skies_sd
snow
snow_sd
sprites
stone
swf
temperate_sd
terrain
textures
tobruk_wall_sd
tobruk_windows_sd
town_props
town_roof
town_wall
town_window
town_wood
tree
ui_assets
ui_assets2
villa_sd
village
wood
xlab_door
xlab_props
xlab_wall
TheHighCastle
TheHighCastle2

My map is called TheHighCastle2


(NOP) #11

I said shader file not shaderlist.txt.
The reason why I said your easygen templates may be outdated is because the newer ET templates don’t have any tcmod scale commands.
If your q3map_tcGen ivector command is working, then you don’t really need to scale the textures any further, because you can just modify the parameters on this command.
That’s why I said you should post your shader here because it looks like some parts of it are not working.


(oS!Digital) #12

yah, in the last screen i used standard template, my shader list is:

textures/TheHighCastle2/terrain_0
{
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/TheHighCastle2/s_dirt_m03i_alpha.tga
rgbGen vertex
tcmod scale 0.250 0.250
}
}

textures/TheHighCastle2/terrain_1
{
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/TheHighCastle2/rock_ugly_brown.tga
rgbGen vertex
tcmod scale 0.250 0.250

}

}

textures/TheHighCastle2/terrain_0to1
{
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/TheHighCastle2/s_dirt_m03i_alpha.tga
rgbGen vertex
alphaGen vertex
tcmod scale 0.250 0.250
}
{
map textures/TheHighCastle2/rock_ugly_brown.tga
rgbGen vertex
alphaGen vertex
tcmod scale 0.250 0.250
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
}

textures/TheHighCastle2/terrain.vertex
{
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/TheHighCastle2/s_dirt_m03i_alpha.tga
rgbGen vertex
tcmod scale 0.250 0.250
}
}


(DAbell) #13

I think I must reply, you say my answer to your problems was erroneous i.e. WRONG.

This is misleading for anybody reading this thread with a similar problem the method i have suggested is a perfectly legitamate method of adjusting the scale of textures on Easygen
created terrain, also it gives you the distinct advantage of being able to see the effect of your scaling without having to compile and test your map.

I suggest in future you either check your facts or don’t put down peoples advice to you.

ps With your terrain don’t you think if there is snow lying on the ground it would most likely be covering the surrounding hills, just a suggestion you might wanna think about.

Thanks

D


(NOP) #14

You are using the wrong shader template. That template will give you vertex lit terrain which means your terrain will have no shadows. Download these templates
http://www4.ncsu.edu/~rlcordes/unzip_to_templates_dir.zip
and replace the wolfet templates with them.
Also both textures you are using are SD textures, so you don’t have to make a copy of them in your texture folder because they’re already included in pak0.pk3. Unless of course if you have modified the textures.
If you haven’t modified the texures just use this shader


textures/TheHighCastle2/terrain_base
{
	q3map_nonplanar
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	surfaceparm landmine
}


textures/TheHighCastle2/terrain_0
{
	q3map_baseshader textures/TheHighCastle2/terrain_base
	qer_editorimage textures/snow/s_dirt_m03i_alpha.tga 
	surfaceparm snowsteps
	{
		map textures/snow/s_dirt_m03i_alpha.tga 
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}


textures/TheHighCastle2/terrain_1 
{
	q3map_baseshader textures/TheHighCastle2/terrain_base
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga 
	surfaceparm grasssteps
	{
		map textures/temperate_sd/rock_ugly_brown.tga 
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}


textures/TheHighCastle2/terrain_0to1
{
	q3map_baseshader textures/TheHighCastle2/terrain_base
	surfaceparm snowsteps
	{
		map textures/snow/s_dirt_m03i_alpha.tga
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}


(oS!Digital) #15

DABell , i posted it before caplocks trojan say me what’s the answer on msn, he asked drakir, yes, ur solution is good and all these things but it dont works 4 me :blah:


(Drakir) #16

This stuff is kinda confusing too me.

This is from the shaderlab.com manual:

q3map_tcGen
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 ) will project the texture every 256 units in x, and every 256 units in y, along the z-axis. Ivector means inverse vector, and this means you don't have to do the divide with windows calc. :)

ivector ( 256 0 0 ) ( 0 256 0 ) == vector ( 1/256 0 0 ) ( 0 1/256 0 )

inverse = 1.0 / n, unless the value is 0. If the value is 0, then the matrix value is set to 0. A bit of dodgy math, but it works.

The wolf_et template in EasyGen adds this line to the terrain shader:
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )

This line should repeat the texture every 512 units. But somewhere along the line it gets screwed. Ydnar states that u shouldnt use tcmod scale as is slows performance, but i havent found any other way around the scaling problem.

I always have to use “tcmod scale 0.250 0.250” to get the proper texture size.

They way i figured this is:

Default scale of texture: 0.5
Default Terrain Scale: 0.5
Ending up with: 0.5*0.5=0.25

So getting a 0.25 scaling makes it very repeating.

So after reading a bit more on this i understood that the tcgen doesnt only set the repeat factor its also a scaling factor.

Or am i totally wrong here? As i said…very confusing stuff!


(NOP) #17

I’ve never really had a problem with q3map_tcGen ivector. It always does what it’s supposed to do. That is if you say q3map_tcGen ivector ( 1024 0 0 ) ( 0 1024 0 ) and you use a 128x256 texture… it will scale the texture 8 times in the x and 4 times in the y and project it on the z axis(not sure how the starting coordinates for the tiling are decided).

I think many people however encounter a problem with it when exporting easygen terrain. The reason most of the time is because the easygen template exports the terrain_base shader as the last shader on the file, and for some reason this causes the _base shader to not work, which means the q3map_tcGen ivector command in that shader doesn’t work either. If you move the _base shader at the top of the file the problem is solved.

Anyway…like I said in my previous post, if you absolutely need to scale your textures a more efficient alternative would be q3map_tcMod scale since it’s done at compile time instead of run time.(unless of course you want to scale each pass diferently).


(dark-tim) #18

ehhm, what file??


(The Wanderer) #19

he’s talking about the shader file exported by easygen