texture on curves seen from both sides

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

texture on curves seen from both sides

Post by wacko »

This thread started in pms, so don't bother how or why :wink:

there are two files for a texture (if it's a shader texture): the texture and the .shader. But you can also collect many shaders into one shader file or make a new .shader for already existing textures like I did for these tubes. This shader explains to MOHR and MOHAA how the texture is handled: What texture to show in MOHR, what keywords it has, what type of surface it is (for sounds an so on) and how it is displayed in MOHAA (solid, transparent parts like grates or semitransparent like glass...) and some other things. And it is - as I said - rather useful for mapping purpose, so you should take a look, maybe just a quick one!

For your both sides visible texture for the tubes try this:
in mohaa/main make a folder textures and a folder scripts
in mohaa/main/textures make a folder pipe
Back in folder mohaa/main/scripts make a txt-file with notepad and name it pipe.shader
put this in the pipe.shader:

textures/pipe/dblpipe
{
qer_editorimage textures/general_industrial/bnkrpipe1_iron.tga
qer_keyword pipe
qer_keyword metal
surfaceparm metal
cull none
{
map textures/general_industrial/bnkrpipe1_iron.tga
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}


In MOHR, make your curve cylinder, select textures/pipe and you'll find a texture called dblpipe.
If you apply this to your cylinder, it will be textured outside AND inside, because of this cull=none. You won't see this though in MOHR, but in MOHAA it will be fine :wink:
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Cool. Good info.
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
Ace of Spades
Major
Posts: 291
Joined: Thu Jan 30, 2003 8:50 am
Location: West Coast, USA

Post by Ace of Spades »

Thanks Wacko! This will come in real handy!

Ace

8)
Post Reply