Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

How to clear Zbuffer without using legacy nodes or layers?

All other topics about Ventuz 5 here.

Moderator: Support

Post Reply
User avatar
gaz99
Posts: 16
Joined: 29 Nov 2016, 17:25

How to clear Zbuffer without using legacy nodes or layers?

Post by gaz99 » 06 Apr 2018, 16:12

Hi,

I'm wondering if there is a way in Ventuz 5 to clear the Z buffer in the same layer without using the legacy view-port node. I have attached an example where I want to animate objects over the top of other objects without them clipping into each other. When the view-port is enabled with the clear z option the behavior is how I want it.

The only other way to do this would be to use a separate layer.
I am trying to avoid this way if possible because although my example is simple,
in my real project the object containers have links to other containers/scripts/animations (both inputs and outputs).
This would mean I would have to expose a lot of things up to layer level on both layers so they could interact with each other just to get the same behaviour.

Was there any progress with the requests to bring the node back? (http://forum.ventuz.com/viewtopic.php?f ... port#p9986)

Cheers,
Gaz
Attachments
ViewportExample.zip
(377.54 KiB) Downloaded 268 times
Gareth - Kinetic Pixel

User avatar
lerou
Posts: 345
Joined: 06 Sep 2013, 07:14
Location: Hamburg, Germany

Re: How to clear Zbuffer without using legacy nodes or layer

Post by lerou » 06 Apr 2018, 16:51

there is no clear z, so you got several choices:

1. use ref layer filter

use a reference layer. Use filter to draw only the overlaying objects in the other layer. This will implicitely use a rendertarget, so it increases the GPU load. See Example_with_ref_layer.vzs.

2. use fx node

put an fx node in front of your overlaying objects. Don't add effects. This will implicitely use a rendertarget, so it increases the GPU load. A bit drity. See Example_with_fx.vzs.

3. Manually override z

Draw a rectangle very far in the back. Set z-test to always and disable rendering RGBA. This will overwrite the z. Dirty but works in this case. Gets tricky when you're moving the camera though. Should be a bit cheaper then a rendertarget.

1. is the cleanest approach, although those filters do get confusing. Also if you need many ref layers you get a performance impact due to the rendertargets. Same goes for 2. So maybe you can go with 3.
Attachments
Scenes.zip
(309.24 KiB) Downloaded 284 times

User avatar
gaz99
Posts: 16
Joined: 29 Nov 2016, 17:25

Re: How to clear Zbuffer without using legacy nodes or layer

Post by gaz99 » 06 Apr 2018, 17:05

Hi Lerou,

That's perfect, thank you for this, really useful.

Cheers,

Gaz
Gareth - Kinetic Pixel

Post Reply