displacements vs brushes question

007

Banned
Sep 24, 2009
14
1
So I got a lot of big brushes that are round and have corners and I was wondering, would it be better, performance wise, to have them as brushes, func_detailed or turn them into displacements power of 2 ?
 

Dr. ROCKZO

L8: Fancy Shmancy Member
Jul 25, 2009
580
159
Displacements aren't rendered in vvis anyway, it would be more economical to have these round brushes as Displacements.
 

RavenStryker

Former Alias: †Blade†/Xi.Cynx
aa
Nov 25, 2008
782
844
But you have to make sure that you have it closed off behind them if they are the outside of a map or blocking sight. As when they are rendered it's as if they are invisible to the.. the... whats the word I'm looking for... invisible to the Line of Sight thingy where what you see can be rendered.
 

007

Banned
Sep 24, 2009
14
1
Like I have all these tall pillars and 180 brushes, nothing is behind them so they dont block things from being rendered or anything since they are func_detailed thats why I thought turning them into displacements would improve the performance.
 
Apr 19, 2009
4,460
1,722
Like I have all these tall pillars and 180 brushes, nothing is behind them so they dont block things from being rendered or anything since they are func_detailed thats why I thought turning them into displacements would improve the performance.
Never ever func_detail your displacements it really fucks up your map.
 

RavenStryker

Former Alias: †Blade†/Xi.Cynx
aa
Nov 25, 2008
782
844
Never ever func_detail your displacements it really fucks up your map.

No no no no, I think was he was saying is right now the pillars are func_detailed but he can UN-func_detail them and make them into displacements and get better map performance out of them. Which is true and also you can make them not exactly circle and give them that time bit of real life wave to em if need be as well. =)
 
Apr 19, 2009
4,460
1,722
No no no no, I think was he was saying is right now the pillars are func_detailed but he can UN-func_detail them and make them into displacements and get better map performance out of them. Which is true and also you can make them not exactly circle and give them that time bit of real life wave to em if need be as well. =)
Ah, my bad. :V
 

Freyja

aa
Jul 31, 2009
2,994
5,813
Displacements do lighting differently so you won't be able to lightmap optimize them. They'll also be harder to edit.
 

Sel

Banned
Feb 18, 2009
1,239
2,570
Someone please explain to me how increasing your triangle count 4(+?) fold is a better idea.

Don't give me just, oh it renders in batches, I already know that, and it doesn't answer the question for shit.
 
Last edited:

Cynick

L4: Comfortable Member
Feb 7, 2010
153
284
It probably depends on how he's rounding the corners...if he's making a ton of little brushes, it might just be better to displace it--the lighting will probably look better without 9001 little individual faces being lit.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
It's to do with how the displacement data gets pulled from your memory cache when ingame.

When a model gets rendered its vertex mesh gets stored and pulled again for other versions of itself. This saves memory in general, but it's also because it's vertex based and so its related data is equated differently (its properties are stored and retrieved more efficiently i guess). The same savings that occur for the model and its vertex mesh apply to a displacement. Although, of course, it's a little different because models can be copy/pasted etc increasing the efficiency of using that particular model every time it's used. Having other additional benefits and draw backs of their own. You also have other things to consider such as lightmaps, vertex density/count and subsequent collision data.

a func_detail's purpose is mainly to prevent/reduce the impact of solid geometry on things like vvis, visleafs and decrease compile times/make compiles more efficient, and ingame rendering more efficient through preventing unnecassery cutting of faces etc. Since the presence of "world geometry" is fairly destructive to anything it touches. Including func_detail's touching other func_detail's (as they are only "fake" entities, they still cause water indices).

At least.. this is the lamest of terms i can put it in.
 
Last edited:

007

Banned
Sep 24, 2009
14
1
since I dont want to create a new thread for a diff question I have. Im making a ctf map with death pits. how can I make the intel return back to the intel room if it falls down the death pit. I dont want to wait for the intel to go back to the intel room if it falls down there, is there away to make it that once someone dies holding the intel from falling down the death pit, the intel immediately returns back to the intel room.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
For the "death pit" example you probably want func_respawnflag . If you can't see it as a brush entity, make sure you have the updated FGD.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
No Psy, I'm fairly sure they don't. Have you ever tried to change the lightmap on a displacement?
They do it per-vertex as far as I know.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
In HL2 Valve use a lightmap scale of 64 on the beach displacements on the coast/highway missions. Check out the sdk_content vmf's. I'm not sure why they would bother changing the lightmap scales if it didn't do anything.

Although, the engine has been updated for the Orange Box and i guess it makes sense that displacements might have light worked out vertexly. I think i remember YM saying something about displacements having standard lightmap scales...

I guess one would have to research this to find out for sure.
 
Last edited:

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Lightmaps are similar to textures but instead of pixels, you have luxels. So generally it's a good idea to stick to powers of 2.