Black lines & dots on ASE terrain.

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
MetalBeast
Posts: 16
Joined: Sun Aug 14, 2011 2:46 am

Black lines & dots on ASE terrain.

Post by MetalBeast »

Hi,

I have a weird problem with my big ASE terrain (16.000 x 8.000 units), > black lines (in the lightmap).
No idea what is the reason, used the same shader (other textures) and same skybox in another big map (there are no such lines visible).

Anybody has an idea, what can cause this problem?

Tried already another sky-shader, another terrain shader / no terrain shader.
Samplesize resize, Lightmapsize, no changes..

The black lines are always at the same place.

Screenshots see here:
Image Image
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Black lines & dots on ASE terrain.

Post by obsidian »

Normally, it's a good idea to post your shader and compile settings. For that type of terrain, it'll probably look much better with a simple dotproduct texture blending (it's automatic and spiffy).

For your lightmap issue, q3map_lightmapMergable and other secrets:

http://q3map2.robotrenegade.com/docs/sh ... lends.html
[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]
MetalBeast
Posts: 16
Joined: Sun Aug 14, 2011 2:46 am

Re: Black lines & dots on ASE terrain.

Post by MetalBeast »

Thanks for answer obsidian.

Well, tried many different light compile settings, no changes.
This problem also occurs, when I'm using no shaders.

q3map_lightmapMergable does not work for ASE terrain, it gives 1000's of errors while compile prozess.

On the screenshots, you can see I was using dotproduct2 terrain shaders, like described here: http://www.simonoc.com/pages/articles/terrain1_2.htm

I have already used the same shaders and light compiling settings in this map:

Image

There are no such artifacts :(

No idea what is different ...
Delirium
Posts: 102
Joined: Mon Apr 27, 2009 10:05 am

Re: Black lines & dots on ASE terrain.

Post by Delirium »

obsidian wrote:Normally, it's a good idea to post your shader and compile settings.
[url=http://gotdelirium.com/][img]http://www.gotdelirium.com/stuff/gdd.png[/img][/url]
MetalBeast
Posts: 16
Joined: Sun Aug 14, 2011 2:46 am

Re: Black lines & dots on ASE terrain.

Post by MetalBeast »

Delirium wrote:
obsidian wrote:Normally, it's a good idea to post your shader and compile settings.
Hmm, I did already,
but here, it's the standard dotproduct2 shader:

Code: Select all

textures/korriban_da/sandtodirt
{
        qer_editorimage textures/korriban_da/sand
	
	q3map_nonplanar
	q3map_shadeangle 120
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 )
	noPicMip
	noMipMaps

	{
		map textures/korriban_da/sand	// Primary
		rgbGen identity
	}
	{
		map textures/korriban_da/dirt	       // Secondary
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaFunc GE128
		rgbGen identity
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/korriban_da/rocktodirt
{
        qer_editorimage textures/korriban_da/rock2
	
	q3map_nonplanar
	q3map_shadeangle 120
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 )
	noPicMip
	noMipMaps

	{
		map textures/korriban_da/rock2	// Primary
		rgbGen identity
	}
	{
		map textures/korriban_da/dirt	     // Secondary
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaFunc GE128
		rgbGen identity
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}
But, as I already wrote, this happens also without any shader, just with texture applied.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Black lines & dots on ASE terrain.

Post by obsidian »

Which is also why it didn't work, some of those directives are rather important for stuff like terrain, like nonPlanar.

The reason for the black lines is because it doesn't know to span lightmaps across your terrain mesh, so you end up with seams where two lightmap pages meet.

Anyway, the point is to just post the shader and/or other essential stuff in the future so other people can see what you're doing wrong rather than trying to guess what you're doing wrong.
[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]
MetalBeast
Posts: 16
Joined: Sun Aug 14, 2011 2:46 am

Re: Black lines & dots on ASE terrain.

Post by MetalBeast »

obsidian wrote: The reason for the black lines is because it doesn't know to span lightmaps across your terrain mesh, so you end up with seams where two lightmap pages meet.
And how can I fix this ?

what would be the right shader for the ASE terrrain ?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Black lines & dots on ASE terrain.

Post by obsidian »

Oh, I see. I thought you fixed it with the screenshot above.

Try adding q3map_terrain and maybe q3map_lightmapSampleOffset.

Also, what did you use to create your ASE model?
[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]
MetalBeast
Posts: 16
Joined: Sun Aug 14, 2011 2:46 am

Re: Black lines & dots on ASE terrain.

Post by MetalBeast »

obsidian wrote:Oh, I see. I thought you fixed it with the screenshot above.
No, unfortunately, all things I tested until now are making the results worse and not better.
obsidian wrote:Try adding q3map_terrain and maybe q3map_lightmapSampleOffset.
q3map_terrain is for alphamapped terrain entities, or not ?

I will test q3map_lightmapSampleOffset now...
obsidian wrote:Also, what did you use to create your ASE model?
1. Created terrain with Easygen, exportet as map.
2. Imported in Radiant, deleted all keys from terrain entity.
3. Applied singe shader to the terrain.
4. Compiled the terrain map to ASE
5. Imported the ASE in MAX, optimised and added second shader to it
6. Reexported as ASE.

I did this already few times, never before got these weird shadow lines...


EDIT:

Tested ydnar's example shader for ASE terrain.
And got this o_O :

Image


q3map_lightmapSampleOffset 0.1 (just for joke, testing higher values now)

got this weird thing:

Image

EDIT2:

q3map_lightmapSampleOffset 8
is doing the job... :D

...THX Obsidian!

Image
Post Reply