Rendering what's behind Displacements

Rendering what's behind Displacements

Re: Rendering what's behind Displacements Posted by SDDM on Sun Apr 17th 2005 at 4:07am
SDDM
9 posts
Posted 2005-04-17 4:07am
SDDM
member
9 posts 1 snarkmarks Registered: Nov 25th 2004 Location: America
At the point of the map I'm in right now, there is currently a three cliffs with a river running down each using waterfalls. My problem is if you go to the very bottom cliff, you start to get really low fps. I used mat_wireframe 1 and I noticed that even though I have a brush behind each of the cliffs textured with 'nodraw', it is still rendering everything behind the cliff. However if I texture the brush with something other than 'nodraw' such as a brick texture, I can no longer see the wireframe of the displacements behind the cliff, but I still see the water, waterfalls, models, etc.
Re: Rendering what's behind Displacements Posted by Leperous on Sun Apr 17th 2005 at 10:47am
Leperous
3382 posts
Posted 2005-04-17 10:47am
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
This might just be because VIS thinks you should be able to see what's above the cliff, rather than you being able to see through the wall behind; place some HINT brushes around and see.
Re: Rendering what's behind Displacements Posted by Campaignjunkie on Sun Apr 17th 2005 at 10:45pm
Campaignjunkie
1309 posts
Posted 2005-04-17 10:45pm
1309 posts 329 snarkmarks Registered: Feb 12th 2002 Occupation: Student Location: West Coast, USA
Here's another explanation of what Hint Brushes are:

http://www.lunaran.com/dmenc_hints.php

It was written for Quake 2, but applies for any Quake-engine / Source
game. Basically it says Hint Brushes are good for visibility as well as
cleaner BSP cuts.
Re: Rendering what's behind Displacements Posted by rs6 on Sun Apr 17th 2005 at 11:00pm
rs6
640 posts
Posted 2005-04-17 11:00pm
rs6
member
640 posts 94 snarkmarks Registered: Dec 31st 2004 Occupation: koledge Location: New Jersey, USA
the nodraw texture does not block visibilty, it just doesn't draw what its applied to.
Re: Rendering what's behind Displacements Posted by Campaignjunkie on Mon Apr 18th 2005 at 12:57am
Campaignjunkie
1309 posts
Posted 2005-04-18 12:57am
1309 posts 329 snarkmarks Registered: Feb 12th 2002 Occupation: Student Location: West Coast, USA
Actually, I'm pretty sure NODRAW does block visibility. Any worldbrush
(with the exception of additives, transparent textures, water, etc.)
will block visibility. But VVIS is horrendously lazy and doesn't really
check visibility too well, so then you get a situation like this
occuring. If you look at the Valve SDK maps, you can see they used a
LOT of Hint Brushes.

User posted image

I think this is the situation he's talking about. So, say there's a
player standing on the bottom cliff. Place hintbrushes (pink lines)
along the floor of each cliff. As you can see, you'll end up with 4
vertical divisions called LEAFS. Hopefully, VIS will figure out you're
in seperate leafs and won't render the other stuff.
Re: Rendering what's behind Displacements Posted by SaintGreg on Mon Apr 18th 2005 at 6:49am
SaintGreg
212 posts
Posted 2005-04-18 6:49am
212 posts 51 snarkmarks Registered: Dec 3rd 2004
If you are making the white area of that picture cliffs, you'll still
need vertical hint brushes to stop them from rendering underneath
you. And its not that vis is lazy, on a full compile it does a
pretty decent job, but the vis clusters dont always get formed
optimally to block visibility right, which is when you need
hints. So really its not vis's fault that bsp does a bad job.

I think the real answer to this question is just that it is in fact
rendering whether you have a brick texture or a nodraw texture.
Nodraw world brush will block visibility, if the vis clusters allow
it. The reason you dont see the wireframe of the displacement is
that it renders behind the brick texture. With nodraw you can see
right through to the displacement. This only happens with
displacements though, everthing else will be shown in wireframe if it
is being rendered. So its really just a figment of mat_wireframe
1 and not that it stops being rendered.

Really displacements take very little cpu/gpu power to render compared
to their polycount, so the displacements themselves shouldn't be
causing a problem. If you are getting lag, you may want to try
using clever hints to fix it.
Re: Rendering what's behind Displacements Posted by SDDM on Tue Apr 19th 2005 at 8:29pm
SDDM
9 posts
Posted 2005-04-19 8:29pm
SDDM
member
9 posts 1 snarkmarks Registered: Nov 25th 2004 Location: America
Thanks for the help guys, but I found out why FPS got so low. It was the water that was running down each of the cliffs =/ . I took another look and found out even at the bottom of the cliffs it would still render all the water from bottom to top. I tried using hint brushes, but I don't know if I should put them vertically, horizontally, or diagonally. As I tried to do this, I couldn't figure out, if I have a displacement and make it cave into itself, do I put the hint brushes where the straight wireframe is in the 2d views on hammer, or what you actually see in 3d view/in-game.

Hopes you guys understand what I mean