Digital Art Zone

 
     
What is the output from the Depth-brick in Shader Mixer?
Posted: 14 July 2012 11:09 PM   [ Ignore ]
Member
Avatar
Rank
Total Posts:  193
Joined  0

The documentation is a bit short on what comes out of the Depth-brick. It seems to be a rather small value so I doubt is is cm.
The question came up in this thread https://www.daz3d.com/forums/viewthread/4026/

Cheers! Oom

Profile
 
 
Posted: 15 July 2012 05:06 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13690
Joined  2003-10-09

I’m not certain it isn’t counting ray-trace bounces, rather than physical distance. What about this, which takes the point for the eye, the point on the surface, and calculates their distance?

Image Attachments
DistanceToCamera.jpg
 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 15 July 2012 11:10 AM   [ Ignore ]   [ # 2 ]
Member
Avatar
Rank
Total Posts:  193
Joined  0

Thank you for your answer and interest Richard it is much appreciated!
However it is not an answer to the question.

What the documentation do say is that is is a distance. The value was between 0 and 1 in my tests so I don’t think it is a count of ray bounces.

Depth

Brickyard : Functions > Geometric

Provides the distance from the camera to the surface of the object at that micropoly as a Float.

I have been thinking about asking specific questions about every detail that is missing in the Shader Mixer documentation to get it complete.
This is not the start of that little project…......... I think wink

Cheers! Oom

Profile
 
 
Posted: 15 July 2012 12:38 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13690
Joined  2003-10-09

What happens if you multiply it by the SceenMax variable (or rather, the Pythagorean length derived from it since that’s a point)? Maybe it’s returning a value equal to the fraction of the total extent of the scene? Sorry, I am, as you may infer, guessing here.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 15 July 2012 02:23 PM   [ Ignore ]   [ # 4 ]
Member
Avatar
Rank
Total Posts:  193
Joined  0

Thank you for your answer and interest Richard it is much appreciated!
I see it like this: The answer to this question should have been in the documentation, it is not there.
As the information is not where it should be, I ask for it and I fully expect one of the four or five (my guess) people in the universe who actually knows the answer to share the information. smile

Cheers! Oom

 

Profile
 
 
Posted: 28 July 2012 01:17 AM   [ Ignore ]   [ # 5 ]
Power Member
Avatar
RankRankRank
Total Posts:  1311
Joined  2010-03-01
Oom Fooyat - 15 July 2012 02:23 PM

Thank you for your answer and interest Richard it is much appreciated!
I see it like this: The answer to this question should have been in the documentation, it is not there.
As the information is not where it should be, I ask for it and I fully expect one of the four or five (my guess) people in the universe who actually knows the answer to share the information. smile

Cheers! Oom

Oom, I am not one of those four or five “in the know”. Those are very rare birds. I was thinking though, that this approach maybe very good to get those answers. So in the mean time I did some digging and this is what I found:

If you look at page 139 (page 150 in the pdf) of the RISpec3.2 Manual you find the following:

float depth( point P )
Return the depth of the point P in camera coordinates. The depth is normalized to
lie between 0 (at the near clipping plane) and 1 (at the far clipping plane).

Here is a pretty good explaination of what near clipping planes are:
http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html
and here for what far clipping planes are:
http://www.facepunch.com/threads/1075270-What-s-the-point-of-the-near-clipping-plane-in-3d-games

So I guess the question now is where are the near and far clipping planes set in DAZ?
Lonnie

Profile