News:

Come Chat with us live! Learn how HERE!

Main Menu

[SOLVED]Shader code not functioning properly.

Started by commander scrooge, July 26, 2010, 10:08:32 PM

commander scrooge

I can't figure out how to get my shader code to work, I believe it has something to the paths but I don't know...

Maps-> CLTM.bsp
Textures-> atcs
Scriptes->CLTM.shader->v
textures/atcs/nobuild
{
qer_editorimage textures/common-trem/nobuild.tga
surfaceparm nodraw
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
surfaceparm nomarks
surfaceparm noalienbuild
surfaceparm nohumanbuild
}


All the map files are in this .zip (including the .map) http://www.box.net/shared/v3rugb27kn
Pathbot every thing you need here

UniqPhoeniX

For nobuild to work you need to compile with -custinfoparms IIRC

commander scrooge

Quote from: UniqPhoeniX on July 27, 2010, 03:21:37 AM
For nobuild to work you need to compile with -custinfoparms IIRC

I'm afraid I don't fully under stand what your saying, instead of surfacparm it would be custinfoparms?
Pathbot every thing you need here

n.o.s.brain

#3
If you are compiling with the default build setttings in radiant, you have to edit the .xml file located in your radiant directory. On windows and with radiant 1.5, you would go to program files/gtkradiant/trem.game/default_build_menu.xml and open it with a text editor. Then add in , -custinfoparms in the appropriate build setting that you are going to use to compile the map.
example of what I pasted into the bottom of my default_build_menu.xml:

<build name="Q3Map2 Trem: (Final) ">
<command>[q3map2] -meta -custinfoparms -v "[MapFile]"</command>
<command>[q3map2] -vis -saveprt -v "[MapFile]"</command>
<command>[q3map2] -light -fast -patchshadows -shade -filter -super 2 -bounce 2 -samplesize 16 -samples 3 -v "[MapFile]"</command>
</build>

Draeke

#4
Alternatively you can go to Radiant's toolbar and select Build >> Customize. This menu should let you edit both default and custom build options. From here you can add custinfoparms (like n.o.s.brain's way) by selecting a build option and editing the commandlines.

EDIT:
Also your shader is pretty much identical to the textures/common-trem/nobuild shader in data-1.1.0.pk3, maybe you want to use that instead?

surfaceparm noalienbuild
surfaceparm nohumanbuild

is equivalent to
surfaceparm nobuild

commander scrooge

I use netradiant, this is the build I used and apparently it has custinfoparms all ready.
Pathbot every thing you need here

Ingar

You saved your shader file as a rich text file (RTF).
Open it with NOTEPAD and not with WORDPAD.

Do not call your shader textures/atcs/nobuild
call it textures/CMLT/nobuild

make sure CMLT is in your shaderlist.txt

Happy hunting...


commander scrooge

I run on mac, not windows.  What is it suppose to be saved as?
Pathbot every thing you need here

Ingar

Quote from: commander scrooge on July 27, 2010, 06:57:34 PM
I run on mac, not windows.  What is it suppose to be saved as?

Plain text (or normal text or whatever it is called on Mac)
instead of Rich Text.

When I open your shader file it looks like

{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss\fcharset0 Helvetica;}}
{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\lang1033\f0\fs24 textures/CLTM/nobuild\par
\{\par
\tab qer_editorimage textures/CLTM/nobuild\par
\tab surfaceparm nodraw\par
\tab surfaceparm nolightmap\par
\tab surgaceparm nonsolid\par
\tab surfaceparm trans\par
\tab surfaceparm nomarks\par
\tab surfaceparm noalienbuild\par
\tab surfaceparm nohumanbuild\par
\pard\}\par
}
^@


Obviously neither radiant nor tremulous likes that :P

commander scrooge

Thanks, that would be a major problem.  But the shader code still doesnt work, I suspect I didn't add it to the shaderlist.txt properly, could you explain the process is which you add it to the shaderlist.txt?  I simply ran a search for 'shaderlist.txt' and found 5 results, I was able to find out two seemed to be related to q3/netradiant, both were different.  I just added 'CLTM' to each one, is there another step I have missed?
Pathbot every thing you need here

Draeke

The appropriate shaderlist.txt should be located in base/scripts (one level below your data-1.1.0.pk3).

It should contain something like this:
arachnid2
atcs
karith
nexus6
niveus
transit
tremor
uncreation
common
common-trem
titan
displays
misc
plant_life
water


Adding the name of your shader (minus the extension) as a new line in the file should allow your shader to be recognised by Radiant.

Perhaps you accidentally saved the shaderlist as an RTF?

commander scrooge

#11
No, I did not save it as RTF.  I simply changed the wrong shader.txt file.  I also put a copy of CLTM.shader in the scripts folder because netradiant said it coouldnt read 'scripts/CLTM.shader.'  I'll build and test the map later.
Pathbot every thing you need here

commander scrooge

Once again, the shader code hath failed.  Checked shaderlist.txt, twice, it is plain text.  What now?

P.S. Just so you can see what I have changed...

maps-> CLTM.bsp
textures-> CLTM
scripts-> CLTM.shader -> v

textures/CLTM/nobuild
{
qer_editorimage textures/common-trem/nobuild.tga
surfaceparm nodraw
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
surfaceparm nomarks
surfaceparm nobuild
}


(CLTM.shader is in plain text, also checked it twice)

Library/app. support/Tremulous/base/scripts
Shaderlist.txt
CLTM.shader
Pathbot every thing you need here

Ingar

It's a longshot but you can try it anyway.
Open a terminal and run the following commands:

cd
ln -s "Library/Application Support/Tremulous" .tremulous


commander scrooge

Pathbot every thing you need here

commander scrooge

Bump, I would really like to get my shader code functioning...
Pathbot every thing you need here

UniqPhoeniX

If you haven't even gotten the shader to netradiant yet, then check the netradiant/games/trem.game file to see where radiant is looking for the shader and shaderlist.txt, and make sure those files are there.
For getting it to Tremulous: /which scripts/CLTM.shader, /fs_homepath and /fs_basepath...

commander scrooge

I'm not sure I understand what you just said...  It might help to know I'm running on a mac.

I'm confused when you say netradiant/games/trem.game, I believe you mean the one inside of the netradiant.app?
I'm completely lost when you say /which scripts/CLTM.shdaer, /fs_homepath and /fs_basepath...
Pathbot every thing you need here

UniqPhoeniX

Wherever netradiant files are...
and /which etc are tremulous commands, to see which files/folders trem is using.

commander scrooge

Ok, the paths are correct.

You guys are gonna laugh at me, but... I made the 'nobuild' only 1 grid above the floor, which makes it not work. . .
Pathbot every thing you need here