Page 1 of 1

Telling Radiant that a texture is a clip texture

Posted: Sat Mar 22, 2008 12:27 pm
by dichtfux
Does anyone know how to tell Radiant that a texture is a clip texture?

I'm creating a map for quake2world atm and they're using a custom clip texture. It works fine in-game, but I can't use View-Filter->Clips in Radiant, which is pretty annoying (clips are not filtered when I use it).

I've had a look at the file in radiant/games/q2.game and it's got the following lines (the one for q2w looks the same, at least for those lines):

Code: Select all

...
cont7="mist"
cont17="playerclip"
cont18="monsterclip"
cont19="current_0"
...
Looks like it has something to do with it, but I don't understand what to do. Ideas, anyone?

I'm using the latest Radiant 1.5 from svn on linux/x86, downloaded & compiled 2 days ago.

Re: Telling Radiant that a texture is a clip texture

Posted: Sat Mar 22, 2008 1:53 pm
by obsidian
AFAIK, Radiant just parses the name of the shader. For instance, skip won't be filtered with hints, but if you rename it hintskip, it will.

Re: Telling Radiant that a texture is a clip texture

Posted: Sat Mar 22, 2008 2:57 pm
by dichtfux
Hm, the texture is already named common/clip.

(Note that this is q2 and that the default clip texture is e1u1/clip or something like that.)

Re: Telling Radiant that a texture is a clip texture

Posted: Tue Mar 25, 2008 7:55 pm
by Ingar
I solved this by creating a shaderlist.txt and common.shader in $datadir/default/scripts.
I also added the following to q2w.game, it tells radiant where it can find the shader scripts:

Code: Select all

shaderpath="scripts"
I've tried this with gtkradiant 1.5 and it resolves the clip issue. As a bonus,
I added semi-transparency to common/clip, common/hint and common/trigger.

The relevant changes are in quake2world SVN :)

Re: Telling Radiant that a texture is a clip texture

Posted: Wed Mar 26, 2008 12:30 am
by pjw
Thanks for the enlightenment Ingar--you kick ass!

It's not often that we get a Q2-related question on here... :)