Terrain Blending

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
sock
Posts: 424
Joined: Sat Sep 09, 2000 7:00 am

Terrain Blending

Post 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
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
Delirium
Posts: 102
Joined: Mon Apr 27, 2009 10:05 am

Re: Terrain Blending

Post 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:
[url=http://gotdelirium.com/][img]http://www.gotdelirium.com/stuff/gdd.png[/img][/url]
sock
Posts: 424
Joined: Sat Sep 09, 2000 7:00 am

Re: Terrain Blending

Post 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.
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: Terrain Blending

Post by cityy »

Awesome, thank you for sharing sock. I want to look into that article now.
www.ferdinandlist.de/leveldesign
^Ghost
Posts: 230
Joined: Tue Sep 08, 2009 3:35 am

Re: Terrain Blending

Post by ^Ghost »

maybe have each picture able to enlarge?
[url=https://github.com/Garux/netradiant-custom]NRC[/url]
[url=https://defrag.racing/]Defrag[/url]
[url=http://ws.q3df.org/]Q3 Map Archive[/url]
User avatar
Theftbot
Posts: 483
Joined: Thu Oct 08, 2009 4:03 am

Re: Terrain Blending

Post by Theftbot »

if you had d/l formats to save the tuts that would be cool. Also videos in action would be awesome.
sock
Posts: 424
Joined: Sat Sep 09, 2000 7:00 am

Re: Terrain Blending

Post 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.
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: Terrain Blending

Post 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.
www.ferdinandlist.de/leveldesign
sock
Posts: 424
Joined: Sat Sep 09, 2000 7:00 am

Re: Terrain Blending

Post 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?
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: Terrain Blending

Post 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
	}
}
www.ferdinandlist.de/leveldesign
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Terrain Blending

Post by obsidian »

Do you have fog in your map?
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: Terrain Blending

Post by cityy »

No, I don't.
www.ferdinandlist.de/leveldesign
TTI
Posts: 13
Joined: Thu Oct 11, 2007 1:30 pm

Re: Terrain Blending

Post by TTI »

cityy: Try q3map_forceMeta.
sock
Posts: 424
Joined: Sat Sep 09, 2000 7:00 am

Re: Terrain Blending

Post 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?
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Terrain Blending

Post 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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: Terrain Blending

Post by cityy »

TTI wrote:cityy: Try q3map_forceMeta.
That, works! Thanks all. Really awesome pack sock. :up:
www.ferdinandlist.de/leveldesign
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: Terrain Blending

Post 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?
www.ferdinandlist.de/leveldesign
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Terrain Blending

Post 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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
skinNCNmaster
Posts: 344
Joined: Wed Jan 29, 2003 8:00 am

Re: Terrain Blending

Post 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....?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Terrain Blending

Post 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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
skinNCNmaster
Posts: 344
Joined: Wed Jan 29, 2003 8:00 am

Re: Terrain Blending

Post 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
Post Reply