db&w Support Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 09, 2010, 12:30:14 AM
2606 Posts in 486 Topics by 892 Members
Latest Member: pabsRakssmare
Home Help Search Calendar Login Register
db&w Support Forum  |  exrTrader  |  exrTrader General Discussion  |  Depth Buffer 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Depth Buffer  (Read 2701 times)
Peter Paterson
Pixlet
*
Offline Offline

Posts: 8


Depth Buffer
« on: May 19, 2009, 10:27:26 PM »

Guys

I'm having a real problem in getting a depth buffer out of LightWave using exrTrader.  I am certain it is me that is missing something.

For example if I chose to view the z buffer using the render buffer view...well there it is, I can see it in the when I view the buffer using LW's viewer.  Yet when I choose to use exrTrader, the depth buffer, as viewed within viper is a black image of the object on a white background (Raw Bufer Normailised View).

Please, if you can shed som ehelp on this then I will be very grateful.

Thanks
Logged
lightwolf
infiniMap / exrTrader / shaderMeister developer
Administrator
*****
Offline Offline

Posts: 1304


Obfuscated SDK Hacker


WWW
Re: Depth Buffer
« Reply #1 on: May 20, 2009, 12:09:37 AM »

Hello Peter,

this is a snipped from the manual for the next release (which is in beta), where we've gone into more detail about the buffers that LW provides (mind you, exrTrader doesn't generate them, it also doesn't change them if the processing options are at their defaults):

Depth
This buffer stores the distance of a surface from the camera.
Due to the fact that the depth is stored as a proper float image and the pixels represent the distance to the camera in metres, there's a few facts to remember.

* DepthRaw.png (7.74 KB. 640x480 - viewed 9 times.)

The first image to the right shows the normalized depth buffer for the sample render. There isn't much to see because the top of the image is the backdrop. In LightWave the backdrop is always rendered at an infinite distance1.
A normalized view looks at the highest and the lowest value in an image and then tries to display anything between them in the visible range from 0.0 to 1.0. In this case the backdrop compressed to be at 1.0, and all other values are compressed respectively. This means that the actual items are relatively close to the camera (at least in relation to the backdrop) and thus displayed as being black (which corresponds of a distance of 0, or something very close to it).
If you intend to composite in an application that handles float images (and the tools that are used to actually work with a float depth buffer) then there should be no need to change anything.

* DepthMax10.png (21.48 KB. 640x480 - viewed 13 times.)

If you intend to save the depth buffer as a low dynamic range image then you can use the Minimum and Maximum settings to define a range which should be normalized into the visible range.
The second image illustrates this, it is the same depth buffer as in the first image, but the Maximum has been set to 10.0.

One caveat, in the last release (V1.3) the minimum/maximum settings don't work as described here for the depth buffer (this is fixed in the next release).
Until that time you should use scale instead, using a low number (basically 1/<max distance in the scene>, i.e. 0.1 for a range from 0 to 10m, 0.01 for a range of 0 to 100m).

I hope this helps understand the depth buffer a bit better.

Cheers,
Mike

Logged

Optimism is an occupational hazard of programming: feedback is the treatment. (Kent Beck)

skype: lupus_lux
Visit us on facebook: http://www.facebook.com/dbw.finest.plugins
Peter Paterson
Pixlet
*
Offline Offline

Posts: 8


Re: Depth Buffer
« Reply #2 on: May 20, 2009, 01:16:28 AM »

Hi Mike

Thanks for this clear explanation.  I will play about with this tomorrow and get back here to comment. 

Cheers

Pete
Logged
Peter Paterson
Pixlet
*
Offline Offline

Posts: 8


Re: Depth Buffer
« Reply #3 on: May 20, 2009, 09:33:09 AM »

Just played about with the scale function, and this works as expected, thank you.  Also...I never realised that the scale setting can be set interactively with Viper open, brilliant Smiley
Logged
lightwolf
infiniMap / exrTrader / shaderMeister developer
Administrator
*****
Offline Offline

Posts: 1304


Obfuscated SDK Hacker


WWW
Re: Depth Buffer
« Reply #4 on: May 20, 2009, 10:37:08 AM »

Also...I never realised that the scale setting can be set interactively with Viper open, brilliant Smiley
Oh yeah, I love that bit as well. You should have seen me giggle once I had it in place and played with it for the first time.

I also want to add a picker/info window in a future version of exrTrader, that allows you to click on the VIPER image and then displays the pixel values numerically in a small window for diagnostics.

Cheers,
Mike
Logged

Optimism is an occupational hazard of programming: feedback is the treatment. (Kent Beck)

skype: lupus_lux
Visit us on facebook: http://www.facebook.com/dbw.finest.plugins
Peter Paterson
Pixlet
*
Offline Offline

Posts: 8


Re: Depth Buffer
« Reply #5 on: May 20, 2009, 12:45:07 PM »

Oh yeah, I love that bit as well. You should have seen me giggle once I had it in place and played with it for the first time.

I also want to add a picker/info window in a future version of exrTrader, that allows you to click on the VIPER image and then displays the pixel values numerically in a small window for diagnostics.

Cheers,
Mike

That will be very useful...thanks for all your work on this.
Logged
lightwolf
infiniMap / exrTrader / shaderMeister developer
Administrator
*****
Offline Offline

Posts: 1304


Obfuscated SDK Hacker


WWW
Re: Depth Buffer
« Reply #6 on: May 20, 2009, 12:47:47 PM »

That will be very useful...thanks for all your work on this.
Well, thank you for supporting us Smiley

Actually, the list of stuff we'd like to implement is usually quite large. The hard part is picking the stuff to work on and finding a way to do it properly.

Cheers,
Mike
Logged

Optimism is an occupational hazard of programming: feedback is the treatment. (Kent Beck)

skype: lupus_lux
Visit us on facebook: http://www.facebook.com/dbw.finest.plugins
Peter Paterson
Pixlet
*
Offline Offline

Posts: 8


Re: Depth Buffer
« Reply #7 on: May 20, 2009, 04:41:27 PM »

The hard part is picking the stuff to work on and finding a way to do it properly.

I'm sure you guys will find solutions Smiley

Cheers
Logged
lightwolf
infiniMap / exrTrader / shaderMeister developer
Administrator
*****
Offline Offline

Posts: 1304


Obfuscated SDK Hacker


WWW
Re: Depth Buffer
« Reply #8 on: May 20, 2009, 04:46:21 PM »

I'm sure you guys will find solutions Smiley
Hehe... that's all coding is... finding solutions to problems we wouldn't have without computers Wink

Cheers,
Mike
Logged

Optimism is an occupational hazard of programming: feedback is the treatment. (Kent Beck)

skype: lupus_lux
Visit us on facebook: http://www.facebook.com/dbw.finest.plugins
Peter Paterson
Pixlet
*
Offline Offline

Posts: 8


Re: Depth Buffer
« Reply #9 on: May 21, 2009, 09:15:47 AM »

Ah...insight can be a dangerous thing!  Smiley
Logged
lightwolf
infiniMap / exrTrader / shaderMeister developer
Administrator
*****
Offline Offline

Posts: 1304


Obfuscated SDK Hacker


WWW
Re: Depth Buffer
« Reply #10 on: May 21, 2009, 10:36:03 AM »

Ah...insight can be a dangerous thing!  Smiley
Yup, but life wouldn't be the same without danger Wink

Wow, that's why it's called the Depth buffer - or should it be shallow buffer? Cheesy

Cheers,
Mike
Logged

Optimism is an occupational hazard of programming: feedback is the treatment. (Kent Beck)

skype: lupus_lux
Visit us on facebook: http://www.facebook.com/dbw.finest.plugins
Riff
Pixlet
*
Offline Offline

Posts: 2


Re: Depth Buffer
« Reply #11 on: May 25, 2009, 04:15:35 AM »

Lightwolf:

Although I purchased exrtrader some time ago, I have just now had the time to begin to use it.  My pipeline is LW9.6 (build 1539) & Fusion 5.31 (build 78).  Both apps are the 64bit versions using XP64.

Wow, exrtrader is very well thought out.  Lightwolf repeatedly describes himself as being "picky".  That is good, very good in that this little plugin works so well.  That being said, I also was having problems getting the zbuffer to actualize in Fusion.  This thread provided a solution (use scale) which I would not have been able to 'discover' for myself.

Also note that Timothy Albee posted a LW/exrtrader/Fusion pipeline tutorial on Spinquad.  Just what I needed, URL as follows:
http://www.spinquad.com/article/story/8&page=1

Oh, btw, Lightwolf, I miss your presence on IRC (freenode: #lw3d)

Riff Masteroff
Logged
lightwolf
infiniMap / exrTrader / shaderMeister developer
Administrator
*****
Offline Offline

Posts: 1304


Obfuscated SDK Hacker


WWW
Re: Depth Buffer
« Reply #12 on: May 25, 2009, 01:45:47 PM »

Wow, exrtrader is very well thought out.  Lightwolf repeatedly describes himself as being "picky".  That is good, very good in that this little plugin works so well.  That being said, I also was having problems getting the zbuffer to actualize in Fusion.  This thread provided a solution (use scale) which I would not have been able to 'discover' for myself.
Thanks Smiley As I mentioned before, the manual for V1.4 will contain more information on how LW provides the buffers, and what it provides.
Here's a sneak of the re-vamped GUI:

* newMainGUI.png (15.47 KB. 346x601 - viewed 11 times.)

Also note that Timothy Albee posted a LW/exrtrader/Fusion pipeline tutorial on Spinquad.  Just what I needed, URL as follows:
http://www.spinquad.com/article/story/8&page=1
We also link to that (in our apparently well hidden) links section on the website Smiley
Oh, btw, Lightwolf, I miss your presence on IRC (freenode: #lw3d)
It kept kicking me out and annoyed me... I'll try to stick around more though.

Cheers,
Mike

Logged

Optimism is an occupational hazard of programming: feedback is the treatment. (Kent Beck)

skype: lupus_lux
Visit us on facebook: http://www.facebook.com/dbw.finest.plugins
Pages: [1] Go Up Print 
« previous next »
Jump to: