Patch lightmaps.


(Hewster) #1

Hi,

I’m re-compiling our wildwest_hacienda map for our 1.5 update,
using some of the latest features of q3map2 :slight_smile:
and fixing a few bugs at the same time…

In this pic:

How can I avoid this effect ?
I want to blend the patches lightmaps with the surrounding brushes…
If these were all brushes I could create a func_group, but it seems this is
not possible with patches ?

This effect only happens in certain darker areas of the map, its interesting
that the larger arch lower down looks ok :confused:

Here is the shader that is applied to the patches and the surrounding
brush work:

textures/ww_hacienda/plastered_wall
{
	qer_editorimage textures/ww_hacienda/plastered_wall.tga
	surfaceparm gravelsteps
	q3map_forcemeta
	q3map_lightmapsamplesize 16
	q3map_lightmapGamma 1
	q3map_bounce 1
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/ww_hacienda/plastered_wall.tga
		blendFunc filter
		rgbGen identity
	}
}

and the sky shader:

textures/ww_hacienda/sky/midday
{
	qer_editorimage textures/ww_hacienda/sky/midday_up.tga
	surfaceparm noimpact
	surfaceparm nomarks
	surfaceparm nolightmap
	surfaceparm sky
	q3map_sunExt 1.0 0.95 0.75 150 240 50 2 16
	q3map_lightmapFilterRadius 0 64
	q3map_skyLight 80 5
	skyparms textures/ww_hacienda/sky/midday - -
	{
		depthWrite
	}
}

I compiled the map using q3map2.5.10 with the following switches:
light -bounce 10 -fast -samples 3 -thresh 0.4

Any suggestions are welcome :slight_smile:

Cheers,

Hewster


(chavo_one) #2

I’m sure someone will correct me if I’m wrong, but make sure none of those patches are part of a func_group. Lightmaps can’t stretch across func_group boundaries. That’s how I have gotten around this issue in the past.


(Hewster) #3

mmm thanks chavo, but I’m sure I tried that and it wouldn’t group them…
… I’ll have another go :slight_smile:

Hewster


(chavo_one) #4

Maybe it’s not the cause for your troubles. The quick way to tell if the patch is part of a func_group is to look at its color in radiant. If it’s baby blue, then it’s in a func_group.

Be aware that a single patch can be the only member of a func_group as well. This would also cause the lightmap problem.

EDIT: after re-reading your response Hewster, I’m not sure we are talking about the same thing. I’m saying get rid of all your func_group entities on that wall. Were you saying you were trying to create one large func_group consisting of all the parts of the wall?


(WadeV1589) #5

Select all the arch patches and click Ungroup. So if any are grouped they will be un-done.

Secondly, for the lightmap to fit properly, don’t the brushes touchin them have to be sliced to end in line with the edges of the patches? I’ve always noticed the results are perfect when I’ve done this.


(Hewster) #6

ok, I should point-out that this map was made by BoltyBoy, and so
I’m learning what he’s done as I go along…

Also dispite having played with wolf mapping since its conception,
my knowlege of patches is very limited !!

ok, the arches are grouped already, as a type “patchCapped”
if I ungroup them will this cause another problem ? or is this why I
should split the brushes that are touching it…

I’m gona do this anyhow and try a test compile…

Thanks for the quick responces chaps, its really apprciated :slight_smile:

Hewster


(chavo_one) #7

Couple things to note.

  1. When you cap a bevel, the default is to create the caps and bevel as a func_group entity with type patchCapped (as you noted). To get rid of this grouping, select the entire group (shift+alt+leftClick), rightClick, and select “Ungroup Entity”.

  2. In my image above, note the light blue patches. This means they are part of a func_group entity. If you successfully ungroup them, then they will be drawn black like the patches on the left.

  3. The reason you should split the brushes that are touching it is to prevent t-junctions and therefore “sparklies”. In the image above, I have cut the surrounding brushes so that their vertexes line up with patch vertexes. If a patch vertex does not match up with a brush vertex, you will get a t-junction. This may also cause the lighting errors, not sure though.

To be safe, ungroup all of the patches and make sure all of your surrounding brushwork is properly clipped to fit with the patch vertexes.


(Hewster) #8

Nice one thanks for explaining that chavo, and with pretty pics too :slight_smile:

Now all I have to-do is uninstall radiant 1.3.13 , and reinstall 1.3.12,
and use q3map2.5.10 instead of the latest one, and I can try a fresh
compile (gruble grumble grumble … :/)
http://www.splashdamage.com/forums/viewtopic.php?t=5678

Hewster


(ydnar) #9

We’re working on it. BirdDawg and I both have test models and will be tracking the problem down.

y


(Hewster) #10

Ok, I ungrouped the patchCapped groups, and then grouped them all
together with the surrounding brush work (I didn’t split the brushes,
as I wanted to see if there would be a twinkle problem first), then
compiled with the fixed q3map2.5.11 (Thanks again Ydnar) and here is the
result :

We have a result :D, and no twinkles…
Thanks to all for their help in this

Hewster


(ratty redemption) #11

cool you got it working, but I don`t think you even need the patches to be in a func_group, and the “patchCapped” is just a remark made by the editor.

I sometimes add the key “name” to my func_groups and give the value some thing like “patchCap1”, “patchCap2” etc… it seems to make no difference to compiles.


(Hewster) #12

ahh right… ok ratty, so it was probably because they were grouped that
I was getting the difference in lightmap… this makes sence :slight_smile:
and so does the “type” key simply being a remark…

I feel i have taken yet another spet toward enlightenment :smiley: hehe

Hewster


(ratty redemption) #13

Hewster, at least it`s a good step :wink:

I seem to of found out today, that my meta blend shaders aren`t going to work with day time read as well illuminated lightmapped terrain, although they work perfectly with vertex lit terrain and kinda ok with night time lightmapped… oh well.


(ydnar) #14

Huh?

Care to elaborate?


(ratty redemption) #15

sorry I know that sounded cryptic… I was trying out some of my “interesting” uses of meta shading, on one of Gerbils lightmap lit terrains, and found that it didnt work quite as well as on my vertex lit terrain maps.

specifically by using alphagen vertex and an alphamap, I can get verts to fade to full transparency, so making say the edge of a terrain map fade into a dark sky.

but with a lightmap as well, I could only get the image stage to fully fade, the lightmap stage didnt seem to work with alphagen vertex, so I couldnt get full transparency on the same verts …the end result is fine with a dark sky but with a daylight sky, it`s obvious the edge of the terrain is only a certain translucency.

Im not complaining as I know terrain and meta shaders arent really ment for this kinda of mapping.

but the new meta blended water Ive dev is near perfect and better results then I had hoped for, so Ive had some success… and you guys can see that when I release some tests maps.


(ratty redemption) #16

actually Gerbils just reminded me that our original idea was to use separate strips of terrain, like Ive been doing in the vertex lit maps, and overlap them with the lightmapped terrain… if I can get the vertex strips to look like they have the same lighting as the lightmapped terrain, then we get the best of both worlds, more realistic shadows of lightmap with superior blending of vertex.

I`ll post back here if I have any luck with this tomorrow.


(SCDS_reyalP) #17

FWIW, You can have multiple installs without much trouble. I see 6 working versions on my machine.

:eek:


(ratty redemption) #18

agreed, I usually have 2 gtk folders in program files and 2 radiant folders in wolf when Im trying out a new version of gtk... although I usually just install new q3map2 over old version of its self.


(ratty redemption) #19

by using rgbgen vertex which iirc also sets alphagen vertex, and having q3map_vertexscale 0.25 on the meta blend strips, I was able to achieve the affect Gerbil and I were after :smiley:

this is very powerful stuff and hopefully I can now upgrade my own terrain maps to lightmapping while still messing around with “exotic” meta blends :wink:

if I wasnt such a stubborn little ratty and refused to believe in hero worship, then Id probably feel like hugging ydnar about right now :drink: :clap: :eek3: