lfnetwork.com mark read register faq members calendar

Thread: Grass and Shaders
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-08-2004, 09:56 AM   #1
Arkon11
Rookie
 
Arkon11's Avatar
 
Join Date: Sep 2003
Posts: 21
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.
Arkon11 is offline   you may: quote & reply,
Old 07-09-2004, 02:00 AM   #2
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
Okay is this for M/P? If it is and you use grass_sprites all over, don't expect great framerates. Sprites lag maps.


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Old 07-10-2004, 01:45 AM   #3
wedge2211
Commander, Rogue Squadron
 
wedge2211's Avatar
 
Join Date: Jul 2002
Location: Ithaca, NY
Posts: 2,320
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.


wedge2211 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Mapping > Grass and Shaders

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:03 PM.

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