Author Topic: [SOLVED]Shader code not functioning properly.  (Read 6936 times)

commander scrooge

  • Posts: 187
  • Turrets: +1/-9
[SOLVED]Shader code not functioning properly.
« on: July 26, 2010, 10:08:32 pm »
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
Code: [Select]
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
« Last Edit: August 01, 2010, 08:17:33 pm by commander scrooge »
Pathbot every thing you need here

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Shader code not functioning properly.
« Reply #1 on: July 27, 2010, 03:21:37 am »
For nobuild to work you need to compile with -custinfoparms IIRC

commander scrooge

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #2 on: July 27, 2010, 04:18:19 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

  • Posts: 339
  • Turrets: +1337/-24
    • youtube page
Re: Shader code not functioning properly.
« Reply #3 on: July 27, 2010, 05:05:39 am »
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:
Code: [Select]
<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>
« Last Edit: July 27, 2010, 05:07:59 am by n.o.s.brain »

Draeke

  • Posts: 56
  • Turrets: +8/-2
Re: Shader code not functioning properly.
« Reply #4 on: July 27, 2010, 07:24:36 am »
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?

Code: [Select]
surfaceparm noalienbuild
surfaceparm nohumanbuild
is equivalent to
Code: [Select]
surfaceparm nobuild
« Last Edit: July 27, 2010, 07:31:22 am by Draeke »

commander scrooge

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #5 on: July 27, 2010, 04:33:48 pm »
I use netradiant, this is the build I used and apparently it has custinfoparms all ready.
Pathbot every thing you need here

Ingar

  • Tremulous Developers
  • *
  • Posts: 554
  • Turrets: +302/-7
    • Ingar's projects on the Web
Re: Shader code not functioning properly.
« Reply #6 on: July 27, 2010, 05:50:12 pm »
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

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #7 on: July 27, 2010, 06:57:34 pm »
I run on mac, not windows.  What is it suppose to be saved as?
Pathbot every thing you need here

Ingar

  • Tremulous Developers
  • *
  • Posts: 554
  • Turrets: +302/-7
    • Ingar's projects on the Web
Re: Shader code not functioning properly.
« Reply #8 on: July 27, 2010, 07:11:38 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
Code: [Select]
{\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

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #9 on: July 28, 2010, 03:14:39 am »
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

  • Posts: 56
  • Turrets: +8/-2
Re: Shader code not functioning properly.
« Reply #10 on: July 28, 2010, 11:07:14 am »
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:
Code: [Select]
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

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #11 on: July 28, 2010, 03:22:29 pm »
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.
« Last Edit: July 28, 2010, 03:24:32 pm by commander scrooge »
Pathbot every thing you need here

commander scrooge

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #12 on: July 29, 2010, 03:18:58 am »
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

Code: [Select]
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

  • Tremulous Developers
  • *
  • Posts: 554
  • Turrets: +302/-7
    • Ingar's projects on the Web
Re: Shader code not functioning properly.
« Reply #13 on: July 29, 2010, 07:45:26 pm »
It's a longshot but you can try it anyway.
Open a terminal and run the following commands:
Code: [Select]
cd
ln -s "Library/Application Support/Tremulous" .tremulous

commander scrooge

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #14 on: July 30, 2010, 12:53:16 am »
No go  :(
Pathbot every thing you need here

commander scrooge

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #15 on: August 01, 2010, 05:51:26 pm »
Bump, I would really like to get my shader code functioning...
Pathbot every thing you need here

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Shader code not functioning properly.
« Reply #16 on: August 01, 2010, 06:08:00 pm »
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

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #17 on: August 01, 2010, 06:36:38 pm »
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

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Shader code not functioning properly.
« Reply #18 on: August 01, 2010, 06:52:01 pm »
Wherever netradiant files are...
and /which etc are tremulous commands, to see which files/folders trem is using.

commander scrooge

  • Posts: 187
  • Turrets: +1/-9
Re: Shader code not functioning properly.
« Reply #19 on: August 01, 2010, 08:17:11 pm »
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