Resetting texture coordinates on individual shaders?


(G0-Gerbil) #1

I’ve done my caves by using template brushes and copying and pasting.
Each brush is caulk apart from one face (the inside) which has a phong rock shader.
Trouble is, because I copied and pasted, each brush has texture coordinates that don’t line up.

If I was only doing a few brushes, I’d select all the rock faces manually and simply set them to have the rock texture - thereby making them all go back to default box mapping, and so they’d phong / be seamless as much as possible.

However, I’m not talking about a few brushes, but hundreds possibly thousands.
Selecting each by hand sounds like a nightmare to me, so I was wondering if anyone knew of a quicker way of taking a bunch of brushes, and selecting all faces that use only a specific shader, or resetting each face to use default mapping of whatever shading it’s got (don’t mind if the other faces change UVs, they are only caulk after all).


(Detoeni) #2

radiant/find and replace/ dont test against find (i think, test first to be sure)


(MadMaximus) #3

well, after i make my cave brushes i apply the texture to all that is seen, but you know gerbil, i don’t think it really matters much but to the map maker… here is an example,

as you can see even after applying them they don’t line up cause of the skewing brushes and all… but it’s minor when u think of the overall look of the tunnel…

but in-game,

they seem to flow ok, the only one who should be bothered that they don’t meld much is me… and some nitpicker… whose name i cannot name yet cause he hasn’t nitpicked it yet =P

but you see what i mean?

i say just make your tunnels and let them line up where they do… no one has the time to rotate and strech those types of things… and if they did, then they have to much time on thier hands to begin with.

in case your wondering why it’s like that in the editor view, the rock wall’s say ‘rock phong’ and the cave floor is ‘cave floor phonged LANDMINES’ just so i know what texture im using.


(G0-Gerbil) #4

well, after i make my cave brushes i apply the texture to all that is seen, but you know gerbil, i don’t think it really matters much but to the map maker… here is an example,

Erm that’s kind of what I want a shortcut to do - I just want the default box mapping to be applied, but it isn’t because of the moving / rotating I did with the template brushes when I built them.
Selecting all the faces by hand would take ages - it’s this I’m looking for a shortcut for.

radiant/find and replace/ dont test against find (i think, test first to be sure)

No, all that does is cover every face of the brush with the selected replacement :frowning:
I only want the 1 face of each brush that’s not caulked to be selected / retextured.

Oh well, by hand it is :confused:


(MadMaximus) #5

selecting all the faces woiuld take ages? i can’t see why… but i don’t know what your doing so… my map has more faces than the caves in fueldump and it took me less that 1 minute to select em all…


(G0-Gerbil) #6

I’m just being a drama queen - it’ll probably take no longer than 5 minutes or so, but still would have been nice if there was a shortcut :slight_smile:


(MadMaximus) #7

lol… well yeah… i know what you mean, and that would be a good idea to have a shortcut like that… man there have been times where i wished there was a shortcut for a few things… and for all i know there might have or probably is.


(Chruker) #8

It maybe because I haven’t got my breakfast yet, but I does seem that Detoeni had the answer.

Use Texture > Find & Replace then select the texture that has already been applied to the faces and click the Find button, that would select all those faces having that texture.


(G0-Gerbil) #9

I must have missed something - there’s no ‘find’ button in the find and replace palette I have - I’m using radiant 1.3.12 if that helps - perhaps this is a new option I haven’t got in mine?


(ydnar) #10

Disable texture shift/rotate lock before moving your brushes.

Also, can you post your shader?

y


(G0-Gerbil) #11

Disable texture shift/rotate lock before moving your brushes.

Well, that’s something for me to think of in the future, but doesn’t help me now :slight_smile:
Not sure why the shader will help, but here it is:


textures/mml_helmsdeep/terrain_rock
{
	qer_editorimage textures/mml_helmsdeep_terrain/terrain2.tga

	q3map_nonplanar
	q3map_shadeAngle 60

	implicitMap textures/mml_helmsdeep_terrain/terrain2.tga
}

It’s just a normal phong shaded solid texture.
I’m just looking really for a way to select faces with a given texture from a bunch of brushes - if I select one face and ctrl+a it selects all brushes that have a face using it, not what I want really :frowning:

As far as shaders go, I’m much more pleased with my glittering effect (they are the glittering caves after all!):


textures/mml_helmsdeep/glittering
{
	qer_editorimage textures/mml_helmsdeep/glitter.tga

	nopicmip
	nomipmaps

	// Q3map2 properties
	surfaceparm nonsolid
	surfaceparm nolightmap
	surfaceparm trans
	polygonoffset

	// Alpha write
	{
		depthwrite
		alphafunc ge128
		blendfunc add
		map textures/mml_helmsdeep/glitteralpha.tga		
	}

	// Sparkle effect
	{
		tcmod scroll 0.003 0.01
		depthfunc equal
		blendfunc add
		map textures/mml_helmsdeep/glitter.tga
	}
}


(Chruker) #12

I’m using 1.4.0 - I can’t remember wether it was in my 1.3.12 when I used it.

I can see its actually called ‘Find / Replace’ in version 1.4.0 so perhaps they have expanded its functionality if its called ‘Find & Replace’ in version 1.3.12


(G0-Gerbil) #13

OK, well, maybe time to upgrade and thebn I’ll get back to you and let you know what the deal is :slight_smile:


(G0-Gerbil) #14

OK 1.4 had the option in :slight_smile:


(G0-Gerbil) #15

Hmmm, it selects them ok, but if I then try to texture all the selected faces (simply clicking on a texture in the textures palette) then Radiant crashes :confused:
It works with just 1 face, so presumably there’s some middle ground - just hope it’s enough to make this feature worthwhile :frowning:


(Chruker) #16

I haven’t personally experienced that function to cause Radiant to crash. However after running radiant and ET for a long period radiant begins to crash. But a reboot solves that for a while.

I could also be a duplicate plane on one of your brushes thats causing it. Perhaps try a brush cleanup.


(G0-Gerbil) #17

Brush cleanup is my life, since I’m doing vertex manipulation - IE I do brush cleanup constantly (to avoid other crashes!).
I’ll have to see what the middle ground is, IE whether it’s too many brushes, or too many faces, or just radiant not liking me :slight_smile:


(SCDS_reyalP) #18

If you can find a reliable way of reproducing this, please post (or put it in zerowing bugzilla) I saw this when I was showing someone how to use radiant, but wasn’t able to reproduce it on my machine…


(ydnar) #19

Nuke the “nomipmaps” line from your rock shader. Glitter it may, but you’re punishing your video card with texture/memory thrashing and hurting framerate.

y


(sock) #20

Looks very nice, I certainly like the in-out variety on the walls. You just need to vary the floor a bit more, it looks a bit too flat like its concrete or something. Split the floor and sweep it up into the corners of the walls etc.

Setting up editor textures for special surfaces like phong and landmine is the best thing to do. I often create alot of editor textures as it is not always easy to know what textures are doing what in the editor.

Sock
:moo: