Page 1 of 1

Terrain Blending

Posted: Thu Feb 11, 2010 9:23 am
by sock
[lvlshot]http://www.simonoc.com/images/articles/ ... _promo.jpg[/lvlshot]

This is a small collection of stuff that I used in a previous map but I never got around to releasing seperately before. The texture packs come with example maps, shaders and textures in TGA format.

Texture packs : Plants and Terrain

The terrain blending article is a rewrite of a previous article which I think may suffer from problems with layout or content. I find most people stop reading it after page 2, but I never get email feedback so not sure why. So I plan to rewrite the original article in two parts with greater emphasis on better examples and more images.

New article : http://www.simonoc.com/pages/articles/terrain2_1.htm

I would appreciate it if anyone can spare some time to read the article through and let me know what you think? better layout? easier to follow? interesting? less text? good example images? etc

Thanks

Re: Terrain Blending

Posted: Thu Feb 11, 2010 9:51 am
by Delirium
I find it alot easier to read, maybe because I know what your talking about now (unlike when i was reading it for the first time)

I find that this one pulls you in alot more, and makes you want to read on

always loved your terrain tutorials =) :up:

Re: Terrain Blending

Posted: Thu Feb 11, 2010 11:18 am
by sock
@Delirium, thanks. The article is always going to be tough because it is about a subject which is not quick and easy to create. I will try and make the second part use more examples and images as well, if this format is better.

Re: Terrain Blending

Posted: Thu Feb 11, 2010 2:58 pm
by cityy
Awesome, thank you for sharing sock. I want to look into that article now.

Re: Terrain Blending

Posted: Thu Feb 11, 2010 4:38 pm
by ^Ghost
maybe have each picture able to enlarge?

Re: Terrain Blending

Posted: Thu Feb 11, 2010 8:31 pm
by Theftbot
if you had d/l formats to save the tuts that would be cool. Also videos in action would be awesome.

Re: Terrain Blending

Posted: Fri Feb 12, 2010 9:59 am
by sock
@cityy, try to spend some time creating terrain and trying out different blend layouts. The more time you spend on the terrain layouts the better the results will be.
@^Ghost, some of the images on the left do have larger version, you just need to click on them. I have changed the pages to say which one's have larger versions. If you think any others should be enlarged let me know.
@Theftbot, Do you mean the pages are downloadable? There are source files available with example maps, shaders and textures. Not sure about video's, I don't have any equipment for recording and editing video content.

Re: Terrain Blending

Posted: Sun Feb 21, 2010 12:44 pm
by cityy
I experienced an issue playing arround with your plant models.

vertextree.jpg

It looks like lighting would not work propperly on the tree?! At least it looks different from the trees in POM or AEdm7. What am I doing wrong here?

Mod edit: please lvlshot small images and/or link to large images. Thanks.

Re: Terrain Blending

Posted: Sun Feb 21, 2010 4:06 pm
by sock
cityy wrote:I experienced an issue playing arround with your plant models. What am I doing wrong here?
Can you compile the sample maps I have included with the terrain article?
What shaders are you using for the plants/tree model?

Re: Terrain Blending

Posted: Mon Feb 22, 2010 3:16 pm
by cityy
In your example map everything looks normal.

I am using the default shader that came with the package.

Code: Select all

// ======================================================================
// TREE
// ======================================================================
textures/plants_soc/tree01_bark
{
	qer_editorimage textures/plants_soc/tree01_bark.tga

	q3map_nonplanar
	q3map_shadeAngle 75

	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/plants_soc/tree01_bark.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
}
// ----------------------------------------------------------------------
textures/plants_soc/tree01_stump
{
	qer_editorimage textures/plants_soc/tree01_stump.tga

	q3map_nonplanar
	q3map_shadeAngle 75

	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/plants_soc/tree01_stump.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

Re: Terrain Blending

Posted: Mon Feb 22, 2010 3:41 pm
by obsidian
Do you have fog in your map?

Re: Terrain Blending

Posted: Mon Feb 22, 2010 5:35 pm
by cityy
No, I don't.

Re: Terrain Blending

Posted: Tue Feb 23, 2010 12:08 am
by TTI
cityy: Try q3map_forceMeta.

Re: Terrain Blending

Posted: Tue Feb 23, 2010 1:08 pm
by sock
The tree model is made from 4 shaders (tree01_bark, tree01_stump, tree01_leaves, tree01_leavesback) which all need to be active via a shader script included in the shaderlist.txt file. I also recommend you try and compile the sample map with the plant pack and see what results you get.

What compiler options are you using?

Re: Terrain Blending

Posted: Tue Feb 23, 2010 4:25 pm
by obsidian
Not entirely related to the problem, but just wanted to note:

Sometimes converting a model shader to be vertex lit is a good idea. If the triangles that make up the model are relatively small, vertex lighting may actually look better. Plus you get better performance.

Re: Terrain Blending

Posted: Thu Feb 25, 2010 7:22 pm
by cityy
TTI wrote:cityy: Try q3map_forceMeta.
That, works! Thanks all. Really awesome pack sock. :up:

Re: Terrain Blending

Posted: Sat Feb 27, 2010 4:56 pm
by cityy
Ok, I've got another question: If I want to put the models in a pk3 - is there the possibility to put the textures belonging to the models into the same folder in which the other textures of my map are?
I put the textures into my map's textures folder, included the .ase files into the pk3, adjusted the shader and worked with find/replace textures but apparently it does not work the way I wanted. :toothy:
Do I have to put the plants_soc texture folder into the pk3?

Re: Terrain Blending

Posted: Sat Feb 27, 2010 7:12 pm
by obsidian
Model surfaces are compiled into the BSP. You don't have to add model files to the PK3 unless you are redistributing them for other people to use (like sock).

Of course, you still have to include the model's textures. The model's textures can technically reside anywhere within the PK3's sub-directories as long as the model itself knows where to look for the texture or shader. ASE models have a line in the material ID's which tells Q3Map2 which texture/shader to apply to the model surface.

Most models will have unique textures which for organizational reasons reside in the same folder as the model itself.

Re: Terrain Blending

Posted: Mon May 31, 2010 5:34 pm
by skinNCNmaster
[lvlshot]http://www.rave.ca/en/image/original/377972/[/lvlshot]
the above shot has a sun spotlight to test a 1000 watt sun. lol


question... why is the underside of the branches black.. completely shadowed.. theres no like light filtering through the branches.. a sort of green radiance is missing... with that huge a spotlight right next to the tree.. the branches should be glowing light sources.. and the surrounding area should have a bit of green.. hmm i can add the surrounding green with a light... its mainly the branches..

ive reread above and am about to try q3map_forceMeta .. ... though..

Code: Select all

textures/plants_soc/tree01_leaves
{
	qer_editorimage textures/plants_soc/tree01_leaves.tga
	q3map_cloneShader textures/plants_soc/tree01_leavesback

	q3map_vertexScale 1.25
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	surfaceparm nolightmap
	surfaceparm alphashadow
	qer_trans 0.99

	deformVertexes wave 16 sin 0 1 0 .2
	{
		map textures/plants_soc/tree01_leaves.tga
		alphaFunc GE128
		rgbGen vertex
		depthWrite
	}
}

your script.. can someone help edit it for better dealings with light....?

Re: Terrain Blending

Posted: Mon May 31, 2010 6:49 pm
by obsidian
I assume your light is placed above the tree?

cloneShader references a subshader that is the underside of the leaves, it has a different vertex light value than the top face. This creates a more "correct" lighting approximation where the top face is lit more than the bottom face since the light source is from above.

Try either having some sort of light source illuminating the tree from below, or (since the model is vertex lit) use lightJunior.

Re: Terrain Blending

Posted: Mon May 31, 2010 10:04 pm
by skinNCNmaster
bunch of light juniors.. too many actually.. lol :D still a nice screen for socks tree
[lvlshot]http://www.rave.ca/en/image/original/378037/[/lvlshot]

the fps is due to a incomplete hull so no vis compiling yet :P