Urban Terror Forums: about shaders - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

about shaders Rate Topic: -----

Some doubts about shaders' usage.

#1 User is offline   IceMan Icon

  • Account: iceman
  • Main tag: bw|
  • Country:
  • Joined: 08-November 10
  • Posts: 63

Posted 17 February 2011 - 03:49 PM

Hi all!!!
I'm trying to create a map and i noticed that i am not completely confident with shaders. so i have few questions that i would like to ask to experts of the forum :)

1) let start from the first one:
i decompiled casa with q3map2 in order to learn and this was the output


2 threads
Q3Map         - v1.0r (c) 1999 Id Software Inc.
Q3Map (ydnar) - v2.5.16
GtkRadiant    - v1.5.0 Oct  8 2004 08:08:27
Voter turnout
VFS Init: ..//q3ut4/
VFS Init: ..//baseq3/

Loading C:\Giochi\urt411mapping\q3ut4\maps\ut4_casa.bsp
--- Convert BSP to MAP ---
writing C:\Giochi\urt411mapping\q3ut4\maps\ut4_casa_converted.map
WARNING: Couldn't find image for shader textures/common/caulk
WARNING: Couldn't find image for shader textures/sweetnutz/ut_stonewall1
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall27
WARNING: Couldn't find image for shader textures/sweetnutz/sn_dirt1_walk
WARNING: Couldn't find image for shader textures/sweetnutz/sn_dirt1
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall25
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall2
WARNING: Couldn't find image for shader textures/sweetnutz/sn_under_stairs
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_brick3_dirt
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_wall29_trim
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_wall29
WARNING: Couldn't find image for shader textures/sweetnutz/sn_grass1
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_wood3
WARNING: Couldn't find image for shader textures/sweetnutz/sn_metal1
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall13
WARNING: Couldn't find image for shader textures/sweetnutz/sn_w2_sw1_trim
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall22
WARNING: Couldn't find image for shader textures/sweetnutz/sn_brick2
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_stonefloor3
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall14
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_brick2_dirt
WARNING: Couldn't find image for shader textures/sweetnutz/grasslm
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wood2
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window2
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window10
WARNING: Couldn't find image for shader textures/sweetnutz/sn_door5
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window9
WARNING: Couldn't find image for shader textures/sweetnutz/ik_sn_wood_roof1
WARNING: Couldn't find image for shader textures/sweetnutz/sn_stair_trim1
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall24
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_wall28_trim
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_wall28
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_wall15_new
WARNING: Couldn't find image for shader textures/sweetnutz/sn_brick4_wall27
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall16
WARNING: Couldn't find image for shader textures/sweetnutz/sn_walltrim7
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_brick4_new
WARNING: Couldn't find image for shader textures/sweetnutz/dd_casa_sky
WARNING: Couldn't find image for shader textures/sweetnutz/sn_brick3
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window8
WARNING: Couldn't find image for shader textures/sweetnutz/miles_sn_rooftile1
WARNING: Couldn't find image for shader textures/sweetnutz/sn_walltrim11
WARNING: Couldn't find image for shader textures/aamjs_misc/detail43b
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window11c
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window11a
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window11b
WARNING: Couldn't find image for shader textures/urban_terror6/ww-window01
WARNING: Couldn't find image for shader textures/wetwired/ww-blinds01
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window1
WARNING: Couldn't find image for shader textures/aamjs_win/12panwindownlm
WARNING: Couldn't find image for shader textures/sweetnutz/sn_concrete3
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_roof3
WARNING: Couldn't find image for shader textures/sweetnutz/sn_poster4
WARNING: Couldn't find image for shader textures/sweetnutz/sn_poster3
WARNING: Couldn't find image for shader textures/sweetnutz/sn_poster1
WARNING: Couldn't find image for shader textures/aamjs_grnd/tile_04_256
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_walltrim10
WARNING: Couldn't find image for shader textures/aamjs_grnd/tile_stone_01_dk_256
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_metal
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_stonefloor3_dirt1trim
WARNING: Couldn't find image for shader textures/aamjs_grnd/tile_02_256
WARNING: Couldn't find image for shader textures/urban_objects/fs_metalbox_b_top
WARNING: Couldn't find image for shader textures/urban_objects/fs_box2_front1
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_stonefloor2_stairs
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_concrete3_stairs
WARNING: Couldn't find image for shader textures/sweetnutz/sn_tilefloor4
WARNING: Couldn't find image for shader textures/sweetnutz/sn_tilefloor3
WARNING: Couldn't find image for shader textures/sweetnutz/sn_dirt1_walk_end
WARNING: Couldn't find image for shader textures/sweetnutz/sn_rooftrim1
WARNING: Couldn't find image for shader textures/sweetnutz/sn_roof_edge
WARNING: Couldn't find image for shader textures/sweetnutz/sn_door4
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall19
WARNING: Couldn't find image for shader textures/sweetnutz/sn_blinds1
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall3
WARNING: Couldn't find image for shader textures/aamjs_wall/wall80b
WARNING: Couldn't find image for shader textures/sweetnutz/sn_pipe1
WARNING: Couldn't find image for shader textures/aamjs_door/door65
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window1int
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_wood3_end
WARNING: Couldn't find image for shader textures/sweetnutz/sn_tag
WARNING: Couldn't find image for shader textures/sweetnutz/sn_door7
WARNING: Couldn't find image for shader textures/sweetnutz/sn_poster2
WARNING: Couldn't find image for shader textures/sweetnutz/sn_coinbird
WARNING: Couldn't find image for shader textures/sweetnutz/sn_wall1
WARNING: Couldn't find image for shader textures/aamjs_misc/wood15l
WARNING: Couldn't find image for shader textures/aamjs_grnd/tile_old_01
WARNING: Couldn't find image for shader textures/aamjs_wall/wallpaper_panel_04
WARNING: Couldn't find image for shader textures/aamjs_grnd/tile_stone_01_256
WARNING: Couldn't find image for shader textures/aamjs_door/door39
WARNING: Couldn't find image for shader textures/sweetnutz3/dickdastardly
WARNING: Couldn't find image for shader textures/sweetnutz/sn_logo
WARNING: Couldn't find image for shader textures/sweetnutz3/yourking
WARNING: Couldn't find image for shader textures/sweetnutz3/thnom
WARNING: Couldn't find image for shader textures/sweetnutz/sn_dirt_doggus
WARNING: Couldn't find image for shader textures/wetwired/coins
WARNING: Couldn't find image for shader textures/sweetnutz/sn_stand2
WARNING: Couldn't find image for shader textures/sweetnutz/sn_stand_crate
WARNING: Couldn't find image for shader textures/sweetnutz/sn_window8int
WARNING: Couldn't find image for shader textures/sweetnutz/sn_door8
WARNING: Couldn't find image for shader textures/common/clip
WARNING: Couldn't find image for shader textures/common/weapclip
WARNING: Couldn't find image for shader textures/common/ladderclip
WARNING: Couldn't find image for shader textures/sweetnutz/sn_fence1
WARNING: Couldn't find image for shader textures/common/nodraw
WARNING: Couldn't find image for shader textures/sweetnutz/sn_tanktop
WARNING: Couldn't find image for shader textures/sweetnutz/sn_jeans
WARNING: Couldn't find image for shader textures/sweetnutz/sn_brazierre
WARNING: Couldn't find image for shader textures/sweetnutz/sn_cinderblock1
WARNING: Couldn't find image for shader textures/cow7/fs_gate2
WARNING: Couldn't find image for shader textures/cow7/fs_gate3c
WARNING: Couldn't find image for shader textures/sweetnutz/sn_railing_support
WARNING: Couldn't find image for shader textures/sweetnutz/sn_railing
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_ivy2
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_ivy3
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_tree1
WARNING: Couldn't find image for shader textures/sweetnutz3/sn_tree3
WARNING: Couldn't find image for shader textures/sweetnutz/watercaulk
WARNING: Couldn't find image for shader textures/sweetnutz3/clear_ripple1
WARNING: Couldn't find image for shader textures/common/botclip
WARNING: Couldn't find image for shader textures/common/nodrop
WARNING: Couldn't find image for shader textures/common/clusterportal
WARNING: Couldn't find image for shader textures/bbq/tank_insides
WARNING: Couldn't find image for shader textures/common/skip
WARNING: Couldn't find image for shader textures/common/hint
WARNING: Couldn't find image for shader textures/liquids/clear_ripple3
        2 seconds elapsed
Disconnecting



i can open the map file with radiant and this is the result
http://img412.images.../i/gtkcasa.jpg/

as you can see i can open the map but i cannot see many shaders and i do not understand why because i have decompressed all the pk3 files and so i should have all the necessary files.
what's the problem here?? why i cannot see many shaders?


2) i have a more basic doubt about the shader nature. in the script folder there are many shader files, for instance if i open cave.shader i can read the code


textures/terrain/rock_moss3_512
{
	{
	  map	textures/terrain/rock_moss3_512.tga

	}	
	{
	  map	$lightmap
	  blendfunc gl_dst_color gl_src_color
	}	
}

textures/terrain/rock_moss4_512
{
	{
	  map	textures/terrain/rock_moss4_512.tga

	}	
	{
	  map	$lightmap
	  blendfunc gl_dst_color gl_src_color
	}	
}

textures/terrain/rock_moss2_512
{
	q3map_surfacelight 100
	q3map_lightRGB .4 .8 0

	{
	  map	textures/terrain/rc_rock3_lichen1024.tga	 

	}

	{
		map textures/terrain/rock_moss2_512.tga
		tcmod scale 2 2
 
	  blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA 
	  alphagen vertex
	}
	
	{
	  map	$lightmap
	  blendfunc gl_dst_color gl_src_color
	}	
}
...



but what exactly is a shader?? is the whole file a shader itself?? is the single code in brackets a shader itself (and so in this case i posted as an example 3 shaders??)??

3) the third question is simple as well. While I am using gtkradiant, how can i know the name of an object's shader? for instance if I select an object how can i know the name of the shader applied to that object?

thank you very much for your kindness. i like to read material and discover solutions by myself but i have not been able to solve these problems by myself, and this is slowing down my work! :)

Marco

#2 User is offline   DagF Icon

  • Account: dagf
  • Main tag: |TNC|
  • Country:
  • Joined: 28-February 10
  • Posts: 270

Posted 17 February 2011 - 04:04 PM

1. You are missing textures. Shaders is applyed to textures to get shiny objects, nodamage, laders and so on. So you apparently dosent have all the textures used in the map.

2. You posted 3 shaders. You make shaders for your textures and put them in a .shader file in your script folder.
This is one single shader:
textures/terrain/rock_moss4_512
{
        {
          map   textures/terrain/rock_moss4_512.tga

        }       
        {
          map   $lightmap
          blendfunc gl_dst_color gl_src_color
        }       
}




3. As i sayed shaders point to a texture. To aply the shader to a object(brush) you will have to apply your texture to it.
An example from the shaders you posted.

This is the location and name of the texture the shader is applyed to -> textures/terrain/rock_moss4_512 <- the last part after the last /is tha name of the texture(image) file itselfe.



There are better and more correct ways to explane this but this are the main points.

#3 User is offline   IceMan Icon

  • Account: iceman
  • Main tag: bw|
  • Country:
  • Joined: 08-November 10
  • Posts: 63

Posted 17 February 2011 - 06:20 PM

View PostDagF, on 17 February 2011 - 04:04 PM, said:

1. You are missing textures. Shaders is applyed to textures to get shiny objects, nodamage, laders and so on. So you apparently dosent have all the textures used in the map.

2. You posted 3 shaders. You make shaders for your textures and put them in a .shader file in your script folder.
This is one single shader:
textures/terrain/rock_moss4_512
{
        {
          map   textures/terrain/rock_moss4_512.tga

        }       
        {
          map   $lightmap
          blendfunc gl_dst_color gl_src_color
        }       
}




3. As i sayed shaders point to a texture. To aply the shader to a object(brush) you will have to apply your texture to it.
An example from the shaders you posted.

This is the location and name of the texture the shader is applyed to -> textures/terrain/rock_moss4_512 <- the last part after the last /is tha name of the texture(image) file itselfe.



There are better and more correct ways to explane this but this are the main points.


Thanks for your answer.
regarding (1) I have no idea of why those textures are missing :(

#4 User is offline   DagF Icon

  • Account: dagf
  • Main tag: |TNC|
  • Country:
  • Joined: 28-February 10
  • Posts: 270

Posted 17 February 2011 - 06:35 PM

i think the easyest way to fix this is to copy your "zpak000_assets.pk3" file from your urt and put it in you "q3ut4" -mapping folder. All the textures should be in there.
Some of the textures might be streched as you coverted the map withouht them.

#5 User is offline   IceMan Icon

  • Account: iceman
  • Main tag: bw|
  • Country:
  • Joined: 08-November 10
  • Posts: 63

Posted 17 February 2011 - 08:20 PM

tried many times, but it does not work...
for instance if i select and object i see that it has a shader, let's say for instance common/clusterportal. but then if i look for that shader in the orginal script folder i cannot find it!!
why??

This post has been edited by iceman: 17 February 2011 - 08:30 PM


bullet_loaderAdvertisement

#6 User is offline   DagF Icon

  • Account: dagf
  • Main tag: |TNC|
  • Country:
  • Joined: 28-February 10
  • Posts: 270

Posted 17 February 2011 - 08:33 PM

You have to split "texture" from "shader".
The texture are the image that you see ingame and in the editor.

There can be an texture withouth a shader to it.

Shaders are only used on objects/brushes/surfaces that is supost to have a spechal effect.

So most textures does not have a shader, that is why you cant find them.

The reason you cant see some of the textures/images in the editor is becouse they are not in the textures folder.

#7 User is offline   Rayne Icon

  • Account: rayne
  • Joined: 28-February 10
  • Posts: 1,653

Posted 17 February 2011 - 08:36 PM

Easiest way to see if a texture has a shader applied is by a green or white rectangle around it.

#8 User is offline   IceMan Icon

  • Account: iceman
  • Main tag: bw|
  • Country:
  • Joined: 08-November 10
  • Posts: 63

Posted 18 February 2011 - 12:50 AM

ok, let me try to explain my problem better (of course i ask sorry because my english is not perfect :p )

i select the water of the fountain in casa map ( http://img442.images.../fountaint.jpg/ ). the surface inspector tells me that the texture applied is sweetnutz/watercaulk, that in this case it is not normal texture but it is a shader.
so i go and verify that the file q3ut4/textures/sweetnutz/watercaulk.*** does not exist. then i go in the q3ut4/scripts directory and search for the shader and i find that the shader is in the file sweetnutz3.shader

I open it and i find the code

textures/sweetnutz/watercaulk
{
qer_trans 0.40
qer_editorimage textures/urban_terror/watercaulk.tga
surfaceparm nodraw
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
surfaceparm nomarks
surfaceparm water

}



of course in this case, since everything is ok i see the texture in gtkradiant.

let's try with another shader.
this one ( http://img844.images...i/fountain.jpg/ ): it says common/botclip
i look for this path in the texture and i dont find anything. i search for it in the script directory and i dont find it. so what is it??? where is this common/botclip??
i do not understand :(

#9 User is offline   Rayne Icon

  • Account: rayne
  • Joined: 28-February 10
  • Posts: 1,653

Posted 18 February 2011 - 01:04 AM

View Posticeman, on 18 February 2011 - 12:50 AM, said:

ok, let me try to explain my problem better (of course i ask sorry because my english is not perfect :p )

i select the water of the fountain in casa map ( http://img442.images.../fountaint.jpg/ ). the surface inspector tells me that the texture applied is sweetnutz/watercaulk, that in this case it is not normal texture but it is a shader.
so i go and verify that the file q3ut4/textures/sweetnutz/watercaulk.*** does not exist. then i go in the q3ut4/scripts directory and search for the shader and i find that the shader is in the file sweetnutz3.shader

I open it and i find the code

textures/sweetnutz/watercaulk
{
qer_trans 0.40
qer_editorimage textures/urban_terror/watercaulk.tga
surfaceparm nodraw
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
surfaceparm nomarks
surfaceparm water

}



of course in this case, since everything is ok i see the texture in gtkradiant.

let's try with another shader.
this one ( http://img844.images...i/fountain.jpg/ ): it says common/botclip
i look for this path in the texture and i dont find anything. i search for it in the script directory and i dont find it. so what is it??? where is this common/botclip??
i do not understand :(


COMMON/botclip, it's in common shaders, if i remember right botclip is used to stop bots from going any further.

Some textures, like origin, botclip, missilepclip, caulk....don't have images to represent them.
At least not in forms of photos we use as textures, if you look at sky shaders you will notice that the shader when you look at it in radiant ha no actual sky photo attached to it (it can but most often it doesn't).
It's because it's not needed, the shader uses images that are defined in the shader itself, so when you look at it in radiant it looks like a red box that says "image not found" or something like that.

Some shaders like caulk, nodraw, watercaulk....are never attached to a picture. Some shaders change brushes "physical" aspect, like common/nodrop shader, it wont change how a brush looks like but it when a player dies on a brush covered with nodrop his weapons wont stay on it like on a ordinary brush.

This post has been edited by Rav3n: 18 February 2011 - 01:06 AM


#10 User is offline   IceMan Icon

  • Account: iceman
  • Main tag: bw|
  • Country:
  • Joined: 08-November 10
  • Posts: 63

Posted 18 February 2011 - 11:48 AM

View PostRav3n, on 18 February 2011 - 01:04 AM, said:

COMMON/botclip, it's in common shaders, if i remember right botclip is used to stop bots from going any further.

Some textures, like origin, botclip, missilepclip, caulk....don't have images to represent them.
At least not in forms of photos we use as textures, if you look at sky shaders you will notice that the shader when you look at it in radiant ha no actual sky photo attached to it (it can but most often it doesn't).
It's because it's not needed, the shader uses images that are defined in the shader itself, so when you look at it in radiant it looks like a red box that says "image not found" or something like that.

Some shaders like caulk, nodraw, watercaulk....are never attached to a picture. Some shaders change brushes "physical" aspect, like common/nodrop shader, it wont change how a brush looks like but it when a player dies on a brush covered with nodrop his weapons wont stay on it like on a ordinary brush.

Ok, i think i'm starting to understand the isssue.

Anyway i just need a last piece of information in order to solve this puzzle :)
I do not understand why i cannot find some shaders' code. Where is it? The map compiler cannot find it as well, because when i compile those objects just look like a solid blue red and white object :(
Do u know why? Can you find those shaders (for instance caulk or botclip in your scrpts folder?

Thank you.

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Sponsored link
https://www.frozensand.com/


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942