With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
For all you mappers out there!

Moderators: Joe Kari, Pardner, TheDoctor, Breli

Postby ReD NeCKersoN » Mon Oct 26, 2009 2:43 am

Pardner wrote:I will try recompiling durango without the highres stuff.

No need. Just fire up the included one in 1.0
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Pardner » Mon Oct 26, 2009 3:14 am

ok so after re-compile using only -light -patchshadows this is what I got:
Image Image

And just for reference, here are the highres versions:
Image Image


So it looks like the highres shader did effect the other shadows in the maps. Also, we can all agree that the highres shaders do look better than the standard ones (them tree shadows are "kinda" ugly). But, also this confirms that the highres shader is not needed in certain areas and is going to need a little tuning on each map.
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby Joe Kari » Sat Dec 26, 2009 6:07 pm

Hi,

Sorry to be late in this discussion.
I have to clear few things ;)

* Hi-res external lightmap only affect the concerned shaders, not all the map.

* In your screenshot, you see that some place already have good shadows. That's because those surfaces are small enough to be mapped with a 128x128 internal lightmap without looking bad. But the terrain is BIG, and should be in only ONE texture (for various reason).
You have probably noticed that terrain are not affected by _lightmapscale or q3map_samplesize or various q3map2 switch.
External lightmap was targeting terrain at the begining (in RTCW).
So typically, you should use an hi-res external lightmap on big surface (terrain, big wall,...), and everywhere you notice that your _ligmapscale / samplesize can't apply due to lightmapsize limitation.

That explain Pardner's screenshot on Durango.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Pardner » Sat Dec 26, 2009 6:22 pm

hmmmm.... that give me an idea on how to fix this bug

This that first screenshot that Smokey posted, I used high res lightmap shaders on all the ground texture. Now, according to you, probably those would fit in a 128x128 lightmap. I might be able to remove some of the high res stuff and get a better compile. I dont know when I can get to this though :(

Image
Image
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby Joe Kari » Sat Dec 26, 2009 6:38 pm

No you should not: your whole terrain *should* be merged in a single texture, or the seam will be even worst ;) What I was saying only concern different object.
Have you tried all the tricks I gave in this thread to ReD ?

EDIT:
Arf...
Just try Durango on beta3, I see...
This is a mipmaping trouble... I don't understand why it happens on this surface, because they are connected and should share the same lightmap...
Does your shader have:
q3map_lightmapMergable
q3map_nonplanar

Because it is the ground texture, you could add:
q3map_lightmapAxis z

And lastly, if it still doesn't fix it, try to add nomipmaps to the lightmap stage of your shader. This one will fix it, but this has a cost... it will hurt FPS when you are looking to this texture at long range...

EDIT 2:
I'm pretty sure you have got something wrong in the map... I have opened your lightmap, and I saw that your this part are not contiguous.
Is there some "func_group" entity here?
Here what I found on the bottom left of your lm_0000.tga:

Image

You should either remove func_group, or merge them into only one func_group.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Joe Kari » Wed Dec 30, 2009 6:56 pm

I guess Pardner is on holidays and doesn't have internet :p

I have opened br_durango (SG 1.0 version) with radiant and there is a func_group at the lightmap seam. You should move this group into worldspawn, and it may work (or on the contrary, move all this ground into the func_group).
If this func_group is used to fix a light leak, you don't need this anymore since the cause of light leak is a bad lightmap resolution (using func_group prevent q3map2 from merging lightmap, so the whole func_group is covered by a whole 128x128 internal texture). In our case, we DO want the merging of all ground's lightmap levelwide.

The ground of durango is a bit odd... I don't know if q3map2 will be able to merge correctly this ground, since there is many ground overlapping each other (which cause overdraw around the fountain for example)...

If it doesn't work, we should probably remade some part of its geometry.

Good luck :)
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Pardner » Thu Dec 31, 2009 1:03 am

Just back from holiday, I will look into the durango stuff soon. Still sorting through the 100+ messages :P
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby Pardner » Fri Jan 01, 2010 6:39 pm

You were right Joe:
[thumb=http://forum.smokin-guns.org/userpix/357_Untitled_2.jpg][timg]357_Untitled_2.jpg[/timg][/thumb]

I recreated those brushes without the func_group. I am recompiling right now to see how it turns out. If you notice in the 1.1b3 version, there are two lightmap images (lm_0000.tga and lm_0001.tga) both have shadow textures. I could not figure out how or why this was happening. Hope this fixes it, will post back.


Edit: While compiling, I noticed that a few func_groups and models had various "_lightmapscale" set that differed from the worldspawn. Is there any purpose for setting a "_lightmapscale" on a model of func group?
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby ReD NeCKersoN » Fri Jan 01, 2010 8:52 pm

Pardner wrote:While compiling, I noticed that a few func_groups and models had various "_lightmapscale" set that differed from the worldspawn.

I think I did that a few years ago while trying to eliminate "light leaks" around certain brushes. Those settings should probably be removed now.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Joe Kari » Fri Jan 01, 2010 11:17 pm

You can have different _lightmapscale for different entity, that's safe.
Except if some entity are supposed to share a lightmap with another one (like your ground near the target_escape).
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Pardner » Wed Jan 06, 2010 4:58 pm

Ok, I removed the func_group and replaced with _detail brushes like the rest of the robber escape point. The _lightmapscape is set to 0.125 and here are the resulting lightmap images (note I am using two hrl shaders, and only two images were created):

[thumb=http://forum.smokin-guns.org/userpix/357_lm_0000_1.jpg][timg]357_lm_0000_1.jpg[/timg][/thumb]
[thumb=http://forum.smokin-guns.org/userpix/357_lm_0001_1.jpg][timg]357_lm_0001_1.jpg[/timg][/thumb]

But the error is still there:
[thumb=http://forum.smokin-guns.org/userpix/357_shot0026_1.jpg][timg]357_shot0026_1.jpg[/timg][/thumb][thumb=http://forum.smokin-guns.org/userpix/357_shot0027_1.jpg][timg]357_shot0027_1.jpg[/timg][/thumb][thumb=http://forum.smokin-guns.org/userpix/357_shot0028_1.jpg][timg]357_shot0028_1.jpg[/timg][/thumb]

This is getting very frustrating. I don't know if my shader is wrong but I will post them any way:
Code: Select all
//br_durango,
textures/sg_hrl/sand_ground1_hrl
{
   q3map_lightmapSize 1024 1024
   q3map_lightmapBrightness 3.0
   q3map_lightimage textures/sg_sand/sand_ground1
   qer_editorimage textures/sg_sand/sand_ground1
   {
      map textures/sg_sand/sand_ground1
   }
   {
      tcgen lightmap
      map $lightmap
      rgbGen identity
      blendFunc filter
   }
}

Code: Select all
//br_durango,
textures/sg_hrl/sand_ground1b_hrl
{
   q3map_lightmapSize 1024 1024
   q3map_lightmapBrightness 3.0
   q3map_lightimage textures/sg_sand/sand_ground1b
   qer_editorimage textures/sg_sand/sand_ground1b
   {
      map textures/sg_sand/sand_ground1b
   }
   {
      tcgen lightmap
      map $lightmap
      rgbGen identity
      blendFunc filter
   }
}

NOTE: I have q3map_lightmapBrightness 3.0 because 2 seems too dark, but so does q3map_lightmapBrightness 3.0 :| . in fact q3map_lightmapBrightness doesn't seem to do much.

Joe Kari wrote:The ground of durango is a bit odd... I don't know if q3map2 will be able to merge correctly this ground, since there is many ground overlapping each other (which cause overdraw around the fountain for example)...

I tried to reduce some of the overlap, but it seems to need a lot of brush recreation.

This might be one map that will not get a highres lightmap. :oops:
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby Joe Kari » Wed Jan 06, 2010 11:06 pm

Usually, "rgbGen identity" come in the first shader stage. It's not related to the lightmap seam, but maybe it explain why it so dark that you have to use q3map_lightmapBrihtness.

Finally, you may try to move all the ground in a func_group (but ground should NOT overlap each other).

I have sent you a PM ;)
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Joe Kari » Thu Jan 07, 2010 11:43 pm

I have fixed this for you ;)
q3map_nonplanar and q3map_mergable were not in your shader, so it doesn't merge lightmap at all...

Change your shaders with that:
Code: Select all
//br_durango,
textures/sg_hrl/sand_ground1_hrl
{
   q3map_lightmapSize 1024 1024
   q3map_lightmapBrightness 2.0
   qer_editorimage textures/sg_sand/sand_ground1
   q3map_nonplanar
   q3map_shadeangle 60
   q3map_lightmapMergable
   {
      rgbGen identity
      map textures/sg_sand/sand_ground1
   }
   {
      tcgen lightmap
      map $lightmap
      blendFunc filter
   }
}


//br_durango,
textures/sg_hrl/sand_ground1b_hrl
{
   q3map_lightmapSize 1024 1024
   q3map_lightmapBrightness 2.0
   qer_editorimage textures/sg_sand/sand_ground1b
   q3map_nonplanar
   q3map_shadeangle 60
   q3map_lightmapMergable
   {
      map textures/sg_sand/sand_ground1b
      rgbGen identity
   }
   {
      tcgen lightmap
      map $lightmap
      blendFunc filter
   }
}


//br_santacruz
textures/sg_hrl/stone_ground1a_hrl
{
   q3map_lightmapSize 1024 1024
   //q3map_lightmapBrightness 3.0
   qer_editorimage textures/sg_stone/stone_ground1a
   q3map_nonplanar
   q3map_shadeangle 60
   q3map_lightmapMergable
   {
      map textures/sg_stone/stone_ground1a
      rgbGen identity
   }
   {
      tcgen lightmap
      map $lightmap
      blendFunc filter
   }
}


//br_santacruz
textures/sg_hrl/dirt_brown5_hrl
{
   q3map_lightmapSize 1024 1024
   //q3map_lightmapBrightness 3.0
   qer_editorimage textures/sg_dirt/dirt_brown5
   q3map_nonplanar
   q3map_shadeangle 60
   q3map_lightmapMergable
   {
      map textures/sg_dirt/dirt_brown5
      rgbGen identity
   }
   {
      tcgen lightmap
      map $lightmap
      blendFunc filter
   }
}



I have remade most of the ground to avoid overdraw, it is cleaner now. When you want a seamless lightmap, no part of the same entity that have shader with q3map_mergable should be over another (in standard z-axis projection) or it is impossible to merge.

I have turned _lightmapscale to 0.25 since 0.125 is too much (and doesn't have effect at all).

I'm currently working on hint brushes, I will sent you the file later ;)


Oh we should add this to our common.shader (I have used it for my hintbrushes) :
Code: Select all
textures/common/hintskip
{
   qer_nocarve
   qer_trans 0.30
   surfaceparm nodraw
   surfaceparm nonsolid
   surfaceparm skip
   surfaceparm structural
   surfaceparm trans
   surfaceparm noimpact
}

It is just a skip, but when you use in Radiant filter->hints, it remove hintskip too. Most of hint-brushes consist in one 'hint' face and 5 'hintskip' faces.

EDIT:
Here the lightmap I get:
Image
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Pardner » Fri Jan 08, 2010 2:26 am

awesome Joe! Thanks for the help. I will update my shaders.
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Previous

Return to Level Editing

Show Sidebar
Show Sidebar

User Control Panel