Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/archive/global.php(40) : eval()'d code on line 2
Behind displacements [Archive] - TF2Maps.net Forums

PDA

View Full Version : Behind displacements


Uriak
08-25-2008, 08:50 AM
I'm just wondering now... Displacements are ignored by vvis and require some regular world brush behind them. Entirely nodraw textured brushes aren't rendered but block linesight at the same time. Fine.

But what if you can't have a fully nodraw textured brush behind the displacement ? Do you have to cut it anyway at all cost (using vertex editing for instance) ? Or can you do with some texture with no rendering cost but able to block linesight even if only on one brush face ? I'm quite reluctant to let some dev texture behind my displacements...

Laz
08-25-2008, 08:51 AM
I dont really understand your question?

samn
08-25-2008, 08:57 AM
Why can't you put a nodraw texture underneath?

Uriak
08-25-2008, 08:58 AM
Imagine I have a squared World Brush
|
|
|_____
\_/\_/

"|" part is textured as a wall. the "\_/\_/" would be a displacement. What should I do with the "____" face, besides cutting this brush in two, with one entirely covered in nodraw ? As far as I understand the compiling process, the "___" is rendered no matter what so if I put it in nodraw, it let me sees through the brush and ruins possible optimisation.

samn
08-25-2008, 09:02 AM
You put the nodraw brush underneath the displacement, assuming that the displacement is used as a floor/ground
like this:
|
|
|\_/\_/\_/
--------------

Though I get the feeling that I don't really understand the question, could you explain further and maybe post a picture of it in hammer?

Uriak
08-25-2008, 09:06 AM
Oops, I should have precised : the sketch thingie was viewed from above. Both vertical and horizontal faces are "walls" and the displacement covers one these walls. The question is not only about displacements but rather : if I have one face I don't need to render, how can I make it block visibility anyway (imagine displacement/model/func_detail hiding it) ?

Laz
08-25-2008, 09:09 AM
so you there is a wall that partially goes behind a displacement? and you want to know if you have to cut it so you can nodraw the part behind the displacement, or just texture the entire face as one big face.

simplified: 1 textured face or 1 textured face + 1 nodraw face.
I dont think this will make any difference, as in both cases, there is only 1 face drawn. Go for the simpler brushwork and just let the texture run behind.

Koei
08-25-2008, 09:22 AM
I just texture it with a black texture. Can't imagine that having an impact on performance.

Uriak
08-25-2008, 09:32 AM
Rasterizing a face ? (we're ok that drawing a pair of triangles is nothing) But I guess it shouldn't impact much.

While I'm at it, if I want to avoid light bleeding for instance, by having an unseen face textured in nodraw, I must ensure its whole brush is nodraw covered, of course ?

FaTony
08-25-2008, 04:37 PM
I haven't understood ur Q but...
http://developer.valvesoftware.com/w/images/0/03/Hammer_leaks4.jpg
http://developer.valvesoftware.com/wiki/Leak

VelvetFistIronGlove
08-25-2008, 07:37 PM
As far as I understand the compiling process, the "___" is rendered no matter what so if I put it in nodraw, it let me sees through the brush and ruins possible optimisation.

A nodraw face is not drawn, but will cut vis as long as the rest of the faces of the same brush are either solid textures or nodraw. So it's fine to make the wall in question nodraw: you won't see it, because of the displacement; and it won't cause any problems for vis.

You only need to nodraw the faces that aren't seen, not the whole brush.

Uriak
08-26-2008, 03:37 AM
well, I wondered because after some routine compiling check I forgot that exact displacement. And the nodraw face would let me see the area behind. So you say that if vvis had separated those areas, I would only have seen the sky under this face, isn't it ?

grazr
08-26-2008, 03:54 AM
it might just be a case of bad leaf node placement. Use some hints to help force the leaf nodes into the shape and size you want. If the leaf node you are in stretches beyond a certain point like around a corner, that area is seen and rendered, even if you cannot see it personally.

There is a drawportal command to see exactly what is being rendered from where r_drawportals 1 i think. It might not be what you are trying to do that is the problem. Again, some screen shots would be helpful.

The nodraw texture should not be tied to an entity as vis would then ignore it, also a leak will cause vis to hualt and your map will all render at once. A nodraw brush behind a displacement, for all intents and purposes, should block vis and line of site. Check that the nodraw brush reaches the floor/walls etc.

Uriak
08-26-2008, 04:14 AM
My main problem was to know if a nodraw face would do it's vvis cutting job even if other faces of the brush aren't in nodraw. Since it seems to be the case, I'm satisfied with the answer.

I've still to place hints and portals, but I know how to use them (used in casablanca). My new map has just way more more non squared world brushes, it'll be a little more triky. But by design I shouldn't have big optimisation issues whatsoever.