double trouble - lightmaps and framerate


(fraco) #1

Hi,

I have some problems again:

Problem number 1)
weird lightmap problem:

and with r_lightmap 1

the top brush is part of a func_group with _lightmapscale 0.25 (had some lightleaks).

like so

any suggestions? I guess I could take the brush out of the func_group, but it bugs me that I really have no clue why this happens.

[EDIT] fixed the next problem already, sorry. This is caused by some models with spawnflags 2. I guess the models were to complex.
2) second problem: weird FPS drop
there’s a spot in my map where i only have r_speeds going up to 5000 tris, but I have severe framerate drops, whereas just before that spot I had r_speeds up to 9000, but framerate was stable. The framerate drops everytime I move and if I use noclip the problem is gone. What other reasons for framerate drops can there be? Most brushes nearby are detail, I have some hinting nearby and a few pickups and a few models.

thnx

fraco


(rgoer) #2

I hate to intrude, but I’m having some lightmap issues as well and maybe I could just ride your thread’s coattails for a minute?
I’m finding some weird lightmaps on this .ase misc_model entity–here are some “/r_lightmap 1” shots:



I compiled with these settings: BSP -meta -vis -light -fast -patchshadows -bounce 3 -samples 2 -filter

That misc_model entity has a _lightmapscale of 0.25

(and yeah, I know you say that -filter cancels out -samples, but I still like the way the two look in conjunction ;^)

The shaders used by that model all follow this template:

textures/rc_ville/brick3c
{
nopicmip
q3map_forcemeta
q3map_nonplanar
q3map_shadeangle 120
qer_editorimage textures/rc_ville/brick3c.tga
q3map_lightmapsamplesize 1
q3map_normalimage textures/rc_ville/brick3cbump.tga
{
map $lightmap
}
{
map textures/rc_ville/brick3c.tga
blendFunc GL_DST_COLOR GL_ZERO
}
}

The only light that hits this first model comes from the sky, so here’s the sky shader:

textures/rc_ville/rc_sky
{
	qer_editorimage textures/rc_ville/rcsky_up.tga
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm sky
	q3map_globaltexture
	q3map_skylight 60 5
	q3map_sun 0.9 0.92 1 64 40 33
	skyparms textures/rc_ville/rcsky - -
}

To give you an idea of where the sun is positioned relative to this model, and how shadows are supposed to be falling, here’s this:

I’m having issues with another .ase misc_model’s lightmaps as well:


The same deal here–the same shader template, _lightmapscale of 0.25.

Both of these models were brushwork .map files that I used q3map2 to convert to .ase files.

I’m fully prepared to be told that the reason my lightmaps are borked is because I’m a dumbass and have done some dumbass thing or another, but I’d appreciate any help all the same.


(fraco) #3

hmm,
i used for light


-fast -v -patchshadows -bounce 5 -samples 3 -filter -nocollapse -game sof2 

I just spotted this problem on the last compile, and coincidently (this english?), that is also when i started using -samples 3 together with filter.

I wonder. Gonna ditch -filter.

regards

fraco


(rgoer) #4

Just for kicks, I did the same (ditched -filter, kept -samples) and got the same botched results, just with blockier edges to my shadows.


(ydnar) #5

Fraco:

Caulk the side of that one brush, then add a single brush with a coplanar textured face to the caulk that’s not part of the func_group. Overlapping caulk with textured faces is OK.

Rgoer:

There’s a limit to high resolution shadows.

Change your shaders to q3map_shadeAngle 90. That way the right angles at the corners of the building will be sharp.

Next, split the triangle above the door in two (the one coplanar with the wall making the low-res shadow).

y


(fraco) #6

I just realised with hindsight that “double trouble” idd was a very good topic title after all. hehe

thnx for the suggestion Ydnar, that should fix it idd.


(rgoer) #7

Thanks for the reply, ydnar, but I don’t have any control over how those triangles are created (at least, I don’t think so)–they were generated by the -meta process when I compiled the brushwork into a .bsp for the purpse of .ase conversion. The triangles as they show up in the .ase model are nothing like the triangles of my original brushwork (prior to conversion). Is there anything I can do about that? Is -meta required for .ase conversion? I was under the impression that it was, but maybe I’m a moron.


(ydnar) #8

Split the original brushes. Q3Map2 never merges brush faces for triangle reduction.

y