Quake3World.com Forums
     Level Editing & Modeling
        Making a shader receive shadows but not cast them


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Making a shader receive shadows but not cast them

Grunt
Grunt
Joined: 28 Mar 2014
Posts: 59
PostPosted: 01-09-2015 07:22 PM           Profile Send private message  E-mail  Edit post Reply with quote


Suppose you have a light and a brush blocking the light for another brush. I'm looking to get shadows on the blocker, but I don't want the blocker to cast a shadow on the brush behind it. Isn't there a shader command to do this? Otherwise I think the only other way is to make it a group, or a model and set _rs 1 and _cs 0, but there's got to be a better way of doing this through the shader.




Top
                 

Theftbot
Theftbot
Joined: 07 Oct 2009
Posts: 483
PostPosted: 01-09-2015 10:48 PM           Profile Send private message  E-mail  Edit post Reply with quote


Try making the brushes in consideration a func_static, set entity keys:

_cs 0
_rs 1




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 01-10-2015 01:26 AM           Profile Send private message  E-mail  Edit post Reply with quote


Once that works would be nice to see an image of that application.




Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2222
PostPosted: 01-10-2015 03:29 AM           Profile Send private message  E-mail  Edit post Reply with quote


Never seen a shaderparm like that, but I've used _rs and _cs many times for what you are describing.



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 

Insane Quaker
Insane Quaker
Joined: 15 Feb 2010
Posts: 298
PostPosted: 01-10-2015 11:10 AM           Profile Send private message  E-mail  Edit post Reply with quote


"surfaceparm trans"? ...works fine for me. :D

By the way, _rs & _cs are completely new for me. Is there a list (updated entities.def?) with all the "new" entity keys?

like:
_mingridlight
_minvertexlight
_blocksize
vertexremapshader1
_lightmapscale
modelscale
...



_________________
Q3A Maps - by sst13
Quake Live Workshop


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 01-10-2015 11:28 AM           Profile Send private message  E-mail  Edit post Reply with quote


GTKradiant 1.6.4, select a brush, hit N, bingo:

Only used for the world.
-------- KEYS --------
message : Text to print at user logon. Used for name of level.
music : Path/name of looping .wav file used for level's music (e.g. music/sonic5.wav).
_ambient OR ambient : Adds a constant value to overall lighting. Use is not recommended. Ambient light will have a tendency to flatten out variations in light and shade.
_color : RGB value for ambient light color (default 0 0 0).
gravity : Gravity of level (default 800 = normal gravity).
gridsize : Granularity of the lightgrid created by q3map. Value is three integers separated by spaces, representing number of units between grid points in X Y Z. Default gridsize value is 128 128 256. Use larger powers of 2 to reduce BSP size and compile time on very large maps.
_blocksize : Q3Map always splits the BSP tree along the planes X=_blocksize*n and Y=_blocksize*n. Increase the blocksize using larger powers of 2 to reduce compile times on very large maps with a low structural brush density (default 1024 1024 0, 0 values = disable).

-------- Q3MAP2 KEYS --------
_minlight : Minimum light value, levelwide. Uses the _color key to set color. Does not add, unlike ambient.
_minvertexlight : Minimum vertex lighting, levelwide.
_mingridlight : Minimum lightgrid (dynamic entity lighting) levelwide.
_keeplights : Keep light entities in the BSP. Normally stripped out by the BSP process and read from the .map file by the lighting phase.
_noshadersun : Ignore q3map_sun/sun directives in sky shaders and ONLY use entity sun lights.
_farplanedist : Limit on how many units the vis phase of compilation can see. Used in combination with level-wide fog, it can help reduce r_speeds on large, open maps.
_foghull : Shader to use for "fog hull". Foghull shader should be a sky shader. Omit the "textures/" prefix.
_lightmapscale : Floating point value scales the resolution of lightmaps on brushes/patches in the world. Can be overridden in func_group (or other entities) (default 1.0).
_cs OR _castshadows : Allows per-entity control over shadow casting. Defaults to 0 on entities, 1 on world. 0 = no shadow casting. 1 = cast shadows on world. > 1 = cast shadows on entities with _rs (or _receiveshadows) with the corresponding value, AND world. Negative values imply same, but DO NOT cast shadows on world.
_rs OR _receiveshadows : Allows per-entity control over shadow reception. Defaults to 1 on everything (world shadows). 0 = receives NO shadows. > 1 = receive shadows only from corresponding keyed entities (see above) and world. < 1 = receive shadows ONLY from corresponding keyed entities.
_celshader : Sets the cel shader used for this geometry. Note: Omit the "textures/" prefix. Overridable in entities.
_styleNalphaGen : *IMPORTANT* Replace "N" in the key "_styleNalphaGen" with an integer between 1 and 31 as your style index. Values takes standard shader waveform functions (e.g. wave sin 0.5 0.3 0.25 1.5)
_styleNrgbGen : *IMPORTANT* Replace "N" in the key "_styleNrgbGen" with an integer between 1 and 31 as your style index. Values take standard shader waveform functions (e.g. wave sin 0.5 0.3 0.25 1.5)

-------- Q3MAP2 TERRAIN KEYS --------
_indexmap OR alphamap : Path/name for the art file used to guide the mapping of textures on the terrain surface.
_layers OR layers : Integer value denotes number of unique root shaders that will be used on the terrain.
_shader OR shader : Path to the metashader used to assign textures to the terrain entity. Note: Omit the "textures/" prefix.




Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2222
PostPosted: 01-10-2015 01:56 PM           Profile Send private message  E-mail  Edit post Reply with quote


sst13 wrote:
"surfaceparm trans"? ...works fine for me. :D


Trans tells a material to be "shine through" it doesn't allow for anything more than that. With cs and rs, you can tell what object casts shadows on and/or receives light from what.



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 01-10-2015 04:40 PM           Profile Send private message  E-mail  Edit post Reply with quote


Or rather, trans sets the brush to be ignored by -vis and does not try to cull objects behind it.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 01-10-2015 04:45 PM           Profile Send private message  E-mail  Edit post Reply with quote


As for entity definition files, there's a pretty large list of stuff that I've added/cleaned up for GtkRadiant. Most of it is for Q3Map2, Q3A Point Release 1.32, and QuakeLive. It's included with the latest version of GtkRadiant.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.