3DS Max, DirectX Material, and depth maps

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2009   #1
3DS Max, DirectX Material, and depth maps

Hi all,

I've been trying to write a post-effect shader that applies fog to the 3dS Max window over other objects rendered.

I can make a post effect show up fine, and I've been able to sample the image that the scene has already rendered. I can't seem to get a Depth Map though - I set up a sampler for it and it seems to be always filled with black.

Has anyone managed to sample the scene depth buffer from HLSL yet?


Alex
__________________
----------------------------------
Alex Hogan - Technical Artist
Monolith Productions
alex@alexhogan.com
 
Old 01 January 2009   #2
Do you have a second technique in each shader for each object that outputs the pixel depth for that objects pixels?

Or what is your approach?
__________________
-Kees
 
Old 01 January 2009   #3
Well,

First, I am trying to get a depth-based post- effect (just fog, for starters) to affect the entire scene.

Currently I'm trying to do 1 shader as a post effect, with just the default materials from Max applied to the actual objects. I saw that post_output.fx can grab the rendered scene as an image and work with it. I was hoping it could also grab the scene's depth buffer.

I couldn't get that to work. I tried modifying the post_output.fx demo effect to output the depth, but I always get black.

Now I am toying with having shaders applied to each object that output depth, and a post-effect to use it later, but I don't know how to make the output depth texture shared between the different material instances and the post-effect.

I can post my hax0red version of post_output.fx if it helps. I'd appreciate anything that might point me in the right direction.
__________________
----------------------------------
Alex Hogan - Technical Artist
Monolith Productions
alex@alexhogan.com
 
Old 01 January 2009   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:20 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.