LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   JA Mapping (http://www.lucasforums.com/forumdisplay.php?f=540)
-   -   Grass and Shaders (http://www.lucasforums.com/showthread.php?t=131437)

Arkon11 07-08-2004 08:56 AM

Grass and Shaders
 
Well, I'm working on an un-anouced map, I found this neat grass shader in a bushido map pack for JO.

-----------------------------------------
textures/f0x0r/japanvertgrass01
{
qer_editorimage textures/f0x0r/japanvertgrass01
{
map textures/f0x0r/japanvertgrass01
}
{
map $lightmap
blendfunc filter
rgbgen identity
}
{
map textures/f0x0r/ss_grassjapan
surfaceSprites vertical 5 20 25 2000
ssVariance 1 2
ssWind 4.0
alphaFunc GE192
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
depthWrite
rgbGen vertex
}
}
-----------------------------------

It's pretty decent, and with a little tweaking it will suit my needs (if i get permission to use it that is). But I am having trouble. to use this shader, you have to lay down this grass shader/texture. Which is visable and solid. Then the grass sprites appear on that. I want it so I can lay down something that is invisible and not solid. Kinda like nodraw. I don't have any idea what to do. Any suggestions.



Oh and I just did this---


Well, I made a few changes, ignore the file names and stuff.

------------------------------
textures/grass/floor
{
qer_editorimage textures/grass/floor
surfaceparm nomarks
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm trans
q3map_nolightmap

{
map $lightmap
blendfunc filter
rgbgen identity
}
{
map textures/f0x0r/ss_grassjapan
surfaceSprites vertical 5 20 25 2000
ssVariance 1
ssWind 0.0
alphaFunc GE192
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
depthWrite
rgbGen vertex
}
}

-----------------------

I thought that would make the ground texture invisble.(the nodraw part) But it made everything invisable so it seems. I still need some help.

lauser 07-09-2004 01:00 AM

Okay is this for M/P? If it is and you use grass_sprites all over, don't expect great framerates. Sprites lag maps.

wedge2211 07-10-2004 12:45 AM

Re: Grass and Shaders
 
Get rid of surfaceparm nodraw. This section:

Quote:

Originally posted by Arkon11
{
map textures/f0x0r/ss_grassjapan
surfaceSprites vertical 5 20 25 2000
ssVariance 1
ssWind 0.0
alphaFunc GE192
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
depthWrite
rgbGen vertex
}

Is what maps a texture to the surface. (See the "map textures/..." line?) Try making yourself a jpeg that's all black and replacing the stage I highlighted with:

{
map textures/whatever/black
blendfunc add
}

Then you should be able to apply the shader to a brush and just get grass sprites sprouting from an invisible surface.


All times are GMT -4. The time now is 06:46 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.