new grass foliage models


(RayBan) #1

here are some new foliage models that will look very close to the grass foliage used
in radar, but provides better fps by using only a 1/4 of the tris of the ones used in
radar.

http://rapidshare.de/files/29303588/newfoliagemodels.pk3.html


(Aborted) #2

looks good mate


(d3coy) #3

could you post a shader that you used to make this grass appear on your terrain or did you place them manually? Ive had trouble with getting grass models to show on my terrain using shaders so maybe yours will help me out :stuck_out_tongue:


(RayBan) #4

im just using the radar foliage for this one, but you can make any kind you want, basicly if
your going to use the new models in a standard terrain shader you just have to add the
foliage shader parms to it, here’s an example.


textures/temperate_sd/grassdense1_foliage
{
	nopicmips
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_nonplanar
	q3map_shadeangle 155
	q3map_forcemeta

        // foliage shader lines to add the grass models....
	q3map_foliage models/foliage/grassfoliage1a.md3 1.25 48 0.1 2
	q3map_foliage models/foliage/grassfoliage2a.md3 1.1 48 0.1 2
	q3map_foliage models/foliage/grassfoliage3a.md3 1 48 0.1 2
        // end of grass models....

	qer_editorimage textures/temperate_sd/grass_dense1.tga

	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/grass_dense1.tga
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

instead of adding that to every terrain texture, you probably would want to make
base shaders, and have the main base shader added to a new foliage base shader,
here is an example of the same above with the base shaders,



// basic base shader for terrain, and by using q3map_baseShader and referencing
// it in other shaders, we dont have to keep re-typing it out.. although you could
// if you wanted to.
textures/my_terrain/my_base_shader
{
	nopicmips
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_nonplanar
	q3map_shadeangle 155
	q3map_forcemeta
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
}

// new foliage base shader using the above base shader so we dont have to
// add all that text again to it.
textures/my_terrain/my_base_shader_foliage
{
	q3map_baseShader textures/my_terrain/my_base_shader // adding this line is
// like adding all the shader info from the above one.

// here we add our models
	q3map_foliage models/foliage/grassfoliage1a.md3 1.25 48 0.1 2
	q3map_foliage models/foliage/grassfoliage2a.md3 1.1 48 0.1 2
	q3map_foliage models/foliage/grassfoliage3a.md3 1 48 0.1 2
}

// normal grassdense terrain without the foliage
textures/my_terrain/grassdense1
{
        // 1st add the normal base shader
	q3map_baseShader textures/my_terrain/my_base_shader

	qer_editorimage textures/temperate_sd/grass_dense1.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/grass_dense1.tga
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

// same terrain but now adding the foliage base shader
textures/my_terrain/grassdense1_foliage
{
        // this one uses the foliage base shader.
	q3map_baseShader textures/my_terrain/my_base_shader_foliage

	qer_editorimage textures/temperate_sd/grass_dense1.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/grass_dense1.tga
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

EDITED: corrected some errors in the post, its correct now. RE-EDITED, oops… missed one. =P it should be fine now.


(d3coy) #5

now this will not work with dotproduct2 will it? I was under the impression you were using that for your baserace style map… but i could be wrong.

I am using dotproduct2 on this map, but have disabled it for a certain shader to allow it to work… im just curious if thats what you are doing.


(RayBan) #6

im using alphamod blending with control brushes to indicate the verts to blend, i tried dotproduct blending before, but i find its a hassle to
setup plus the fact you have to make new textures for it with the proper alpha channels… im just using the stock et temperate textures
and do not need alpha channels in them for the blends, however… you should be able to use the foliage models on your textures.


(Jaquboss) #7

it is very nice indeed, you could also try tall version, or diffirent grass types to more variety…


(YourFather_CZ) #8

How can i add theese models to map Würzburg Radar. If i add this pack to etmain folder nothing is changed. :frowning:

Thx


(nUllSkillZ) #9

As far as I know the foliage models are compiled into the map.
To get this to work in Radar the maps would have to be re-compiled.


(YourFather_CZ) #10

Damn :banghead:


(RayBan) #11

wurzburg radar already has the foliage in it, are you saying you want to recompile radar and need the foliage?
if thats the case, what you can do is make copys of the models, and rename them without the ‘a’ at the end, so
they would be called grassfoliage1.md3 , grassfoliage2.md3 and grassfoliage3.md3
place them in the same folder ( models/foliage ), and if you have the radar map ( i know someone has somewhere… since ive seen a different
version of it without a lightmap ) then you can recompile it, and the foliage would be
added to it.

and nUllSkillZ is correct in that once you have compiled a map with the foliage models using
the foliage system, you do not have to include the models when you make your pk3, they
get compiled into the map and are not needed anymore after that.


(RayBan) #12

im going to try making a few different types of models that can be used with the foliage
system, used sparingly… because of the poly count they can only have a low odd’s chance
of appearing with a large density so they will be spread out widely as to keep fps down,
here’s an early mushroom one… the model is good, my texture for it is bad… but it should
look nice when i get a proper texture.

maybe some flowers of some sort… like poppies would look nice… daisys… ect…


(RayBan) #13

i uploaded the foliage models again here for those who asked,
sorry for the late reply, puter problems recently and i had to
hunt them down again.

http://rapidshare.com/files/17635679/foliagemodels.zip.html