Page 1 of 1
					
				Black lines & dots on ASE terrain.
				Posted: Tue Nov 01, 2011 11:42 pm
				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:
 
 
 
			
					
				Re: Black lines & dots on ASE terrain.
				Posted: Wed Nov 02, 2011 2:34 pm
				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
 
			
					
				Re: Black lines & dots on ASE terrain.
				Posted: Wed Nov 02, 2011 4:12 pm
				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:
 
There are no such artifacts 
 
No idea what is different ...
 
			
					
				Re: Black lines & dots on ASE terrain.
				Posted: Wed Nov 02, 2011 5:44 pm
				by Delirium
				obsidian wrote:Normally, it's a good idea to post your shader and compile settings.
 
			
					
				Re: Black lines & dots on ASE terrain.
				Posted: Wed Nov 02, 2011 6:57 pm
				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.
 
			
					
				Re: Black lines & dots on ASE terrain.
				Posted: Wed Nov 02, 2011 11:37 pm
				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.
			 
			
					
				Re: Black lines & dots on ASE terrain.
				Posted: Wed Nov 02, 2011 11:53 pm
				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 ?
 
			
					
				Re: Black lines & dots on ASE terrain.
				Posted: Thu Nov 03, 2011 1:38 am
				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?
			 
			
					
				Re: Black lines & dots on ASE terrain.
				Posted: Thu Nov 03, 2011 1:58 am
				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 :
 
q3map_lightmapSampleOffset 0.1 (just for joke, testing higher values now)
got this weird thing:
 
EDIT2:
q3map_lightmapSampleOffset 8
is doing the job... 
 
...THX Obsidian!
