Jump to content
chin_0k

question regarding mapping/setting brushes

Recommended Posts

Hey guys,

 

I have a question about brushes that are somtimes cutting through each other. I always have the feeling that two brushes that share the same volume (not meaning z-collisions) could reduce the performance, since the GPU has to figure out the line of this cut to decide which texture is visible.

 

Right now the game is fast enough to not care about this, but I always try to think ahead. Maybe there will come additional effects that could slow it down. So I would like to know. 

 

I made a picture of the three ways I could make a corner in a Wall. I try to use A. The Cyan colored line is the visible part. The dark blue square is the Part where both orange brushes share the same space.

bK0JQXr.png

 

I just thought about this, because in the PHGP stream someone was mapping and I saw this C-Type configuration all the time. I also try to avoid B, because here also the engine has to find out where to cut away the vertical brush. Also stretching textures over the brushes in A is easier since you don't have to make up for that offset of the vertical one in B. 

I also thought, that A is sometimes avoiding Lightmap issues. (I also have a few questions for Lightmaps, but I'll make another post).

 

So A is not so fast as B or C when mapping so I wanted to know if It is necessary or doesn't change anything performancewise.

 

EDIT - i added variant D as suggested by AEon. thanks

Share this post


Link to post
Share on other sites

I would also like to know this. I haven't done any real mapping since the doom days, I know way behind the time. Back then I had to be aware of how many brushes were visible, to the player at any one time, and what not. Good question here.

Share this post


Link to post
Share on other sites

Lights tend to leak through thin walls (it's a bug that should be fixed sometime in the future) so. I'd go with B and I think it'll remain the most efficient method even when lightmaps gets fixed, because doing every corner this way results with less total brush count. You should also by precaution make every outer wall at least 32 units thick and in general any wall that might be too thin to block light, for instance if you have a lava pool right on the other side of a wall, the lava light might come through if the wall is too thin. 

 

Also, you might want to set material internaleditortextureseditor_nolight_c to every face that isn't shown to players in game. Setting a face to this material prevents the lightmap rendering over it, which will save build time and lightmap size significantly. Don't know if that answered your question, but hope it's of some help.

Share this post


Link to post
Share on other sites

Bu...but that's a lot of woooooorrrrk...

 

=)

I think you could use some tricks with a texteditor. Load the map-file and make search-replace. 

For example you could use an ugly color for everybrush in the beginning. Then when actually texturing the map you can use other textures on the specific faces of the brushes.

Then in the end you replace all ugly textured faces with nolight.

Share this post


Link to post
Share on other sites

Bu...but that's a lot of woooooorrrrk...

 

=)

If you make every new brush you draw fully nolight at the get go, it's easier to texturize the faces that you're supposed to see :P

 

Also I recommend replacing the black nolight graphic with this one: 

It's easier to spot from other dark textures. 

Share this post


Link to post
Share on other sites

 

 

bK0JQXr.png

 

You forgot D... mitered corners. I will ASCII art it: (image was updated)

 

A is the simplest path, and the best... at least for outside walls. Only downside, lightmap leaks, potential ones... once the engine is up to it this will not be an issue though. The big advantage is that the inside walls can properly be textured, no overlap like in B, and overlap = overdraw = waste of resources.

 

B overlap makes texture fitting a pain to do... should be avoided... plus adds overdraw = waste of resources... and is a messy brushwork style.

 

C who the heck came up with that... adds another totally superfluous brush... never!

 

D Advantage can be used not just on outside walls, especially useful for corners that "fall" into the room. For proper texture fitting. The 45° overlap on the wall could potentially help to cut down on light leaks... but it should not be the reason to use it. Presently Reflex is not too happy about mitering (since texture alignment might choose an angled edge, created by the mitering, messing up the alignment that presently cannot be fixed in the editor)... so A would is a better bet, and easier to change.

 

So A when possible, D when needed.

Edited by AEon

Share this post


Link to post
Share on other sites

@Aeon - Thanks for the Tip - I added your suggestion to the image.

 

In Quake 3/Live i mostly used D, but havent done so in reflex yet, because sometimes the angle of the textures changing then.

D is best when the outside of the Wall is also visible.

 

Ok, regarding B (and C) i was right about it being costly. Good to know.

Share this post


Link to post
Share on other sites

Yeah... I remembered that mitering had an issue in Reflex... it is as you say it tends to mess up the texture alignment. And that was the reason in AEdm7R I un-mitered the floor edges.

 

BTW... creating a series of corners that encroach *into* the room makes for interesting examples as well: A then fails, B is bad for textures alignement + overdraw, but D is idea.

Share this post


Link to post
Share on other sites

In my AEdm7R map there used to be many light leaks, no matter what method I used. Most of them seem to have gone, but using method A on ramps does still lead to light leaks. The engine still needs some tweaking it seems.

Since textures are no longer being used, you could use method B now, I have no idea if that helps with the light leaks, it used not to do so, but this may have changed with 0.36+ now. And even though I like to miter, method D seems to be a waste of time presently.

Share this post


Link to post
Share on other sites

B is best for me too, it covers the light leaks and is easier to edit. D seems like useless effort to me, sure it looks nicer when looking at the wireframes but the end result doesn't really care either way. Seems like a more work to edit too when you have different angled brushes on every corner and you'd like to move them around. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×