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!

Z Depth problem

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

zebialowicz
Posts: 10
Joined: 09 Jul 2018, 14:28

Z Depth problem

Post by zebialowicz » 09 Jul 2018, 14:35

Hello.

I have 2 layers on my scene and 2 objects (Cube and Sphere). My objects are on different layers. And my problem is, i cannot set Z-Depth properly, i mean, my layers overlap. I want effect like my Shere is behind my Cube, i tried with a lot of options, like ZSort, Z-Testing but its not working properly. Its working great only if my objects are on ONE and SAME layer. But i need my objects to be on different layers. I will attach image to show u what i talking about:
ventuz.PNG
Have u any idea what can i do with that ?

Best Regards

chriss0212
Posts: 666
Joined: 18 Jan 2012, 20:56
Location: wuppertal
Contact:

Re: Z Depth problem

Post by chriss0212 » 09 Jul 2018, 16:56

Hi

put it into the same layer! The layer is overwriting Z! In most cases this is a very good behavior ;)

Greetings

Christian

zebialowicz
Posts: 10
Joined: 09 Jul 2018, 14:28

Re: Z Depth problem

Post by zebialowicz » 10 Jul 2018, 07:50

Ouch... I thought we have another solution...

In my case the problem is bigger because i have big model with a lot of elements which are separate objects, and in this case my ,,objects tree,, on the layer is complicated and impractical. But thanks, if it is only way to do that -> i will do it like u say :)

Best Regards
Szymon

User avatar
Dennis
Posts: 384
Joined: 08 Jun 2015, 11:29

Re: Z Depth problem

Post by Dennis » 10 Jul 2018, 09:11

you can use Groups or "Merge" all the 3D Elements and Axis into one container.. (Ctrl+M)

so you get a cleaner hierarchy...

regArts
k0s

ps: believe me i have seen a way more worse complicated and impractical tree than yours ;) 10000% :P

:ugeek:

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

Re: Z Depth problem

Post by lerou » 10 Jul 2018, 09:12

yes, unfortunately there is no way to share the depth buffer - and also not the stencil buffer. I don't agree with the word "most" in Chris' answer, but sometimes it is indeed handy to have separate buffers. Often it's not.

Try to encapsulate your complex stuff in a container. The difference to a layer is not that big.

chriss0212
Posts: 666
Joined: 18 Jan 2012, 20:56
Location: wuppertal
Contact:

Re: Z Depth problem

Post by chriss0212 » 10 Jul 2018, 09:23

I don't agree with the word "most" in Chris' answer, but sometimes it is indeed handy to have separate buffers
;)

Maybe it would be great to have a bool for killing Z in a layer... Or: a normal 3D Layer always keeps Z and just a group will kill Z ;)

Greetings

Christian

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

Re: Z Depth problem

Post by lerou » 10 Jul 2018, 09:29

Well, as long as I'm not forced to separate my stuff into two layers, I don't. But it would be so much cleaner - for instance when building some UI with stencil: one layer to set up all stencil functions and then use it in the 3D layer. Especially if your stencil stuff is 2D and then you want to apply it to 3D content (which this time really is MOST of the time). Also Touch does not seperate between layers. So even if some objects on your second layer are visible, they might still be occluded by other objects in terms of touch.

zebialowicz
Posts: 10
Joined: 09 Jul 2018, 14:28

Re: Z Depth problem

Post by zebialowicz » 11 Jul 2018, 09:13

Okay thank You everyone for help :)
Now i put all my elements on one layer, its working fine but only in 50% ^^ Because if i add any effect node (even without specific effect) on my 3D element, this element overwritting Z depth... I cannot attach image file because of NDA, but its something like:
1. I have Cube and Sphere on scene
2. Sphere is BEHIND of Cube
3. If i add any (even blank) effect on ma SPHERE, she is goint to be IN FRONT
4. If i set effect as Inactive, again my Sphere is behind the Cube.

Its soo annoying, because i spent 3 days only on work around it, how to set Z Properly. I thought its like, i added 50 elements on scene in proper hierarchy and now i can easy add some effects on elements and all will work fine, but i dont know why elements with effects are in front of rest elements (without effects)...

zebialowicz
Posts: 10
Joined: 09 Jul 2018, 14:28

Re: Z Depth problem

Post by zebialowicz » 11 Jul 2018, 09:42

Okay i did it somehow, maybe its not best solution but is working right now ;)

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

Re: Z Depth problem

Post by lerou » 11 Jul 2018, 16:21

The FX node is an implicit render target and will therefore eliminate the depth info.

Post Reply