Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How-to render Z-Depth to texture?

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
darrennix
2910 Views, 9 Replies

How-to render Z-Depth to texture?

 

 

Given a camera and a scene, I need to render the distance of the pixels from the camera into a grayscale image. Does anybody know of a way to go about this? I am using Maya LT, and I use Maya as a secondary skill. Rendering depth into an image is one of the tricks that I need to accomplish for my work. Thank you very much, and thank you for providing Maya at the LT level. It is significantly appreciated. I hope somebody knows how this is possible.

 

 

 

9 REPLIES 9
Message 2 of 10
jordan.giboney
in reply to: darrennix

Hi @darrennix

 

Thanks for posting! 🙂 Glad to hear that you are happy with Maya LT! We love hearing that.

 

Are you planning on rendering with Arnold? If so, I found a couple of links that are applicable for Z-depth passes:

Let me know if this information answers your questions! If there is any clarification needed please do not hesitate to ask 🙂 Happy to help!



Jordan Giboney
Technical Solutions Engineer | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA


Message 3 of 10
darrennix
in reply to: jordan.giboney

Sorry, I meant that I use Maya in general as a secondary skill, meaning I am only using Maya LT.

 

Looking for any way to render depth in it. If there isn’t a quick way then I can justify looking into custom shaders and possibly doing it that way.

Message 4 of 10
jordan.giboney
in reply to: darrennix

Hi @darrennix

 

Thanks for your clarification 🙂 Are you planning on using Arnold for rendeirng Zdepth? The tutorials above list out some strategies if you want to use that render engine. Or, this article lists out a way to achieve it using Image Planes: 

 

Depth Compositing using Image Planes in Maya LT

 

Let me know if I misunderstood what you are looking for 🙂 Happy to keep working with you until we figure this out.



Jordan Giboney
Technical Solutions Engineer | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA


Message 5 of 10
darrennix
in reply to: jordan.giboney

I found those resources in my initial google search but I dismissed them because (am I mistaken?) Arnold isn’t part of Maya LT and the depth planes feature is in regard to compositing content together based on depth not creating a render of the depth.

 

Here is an example: Given a sphere and a camera, I expect (need) to see the areas nearest the camera be white (or black) and the areas farther from the camera be black (or white) with a black (or white or transparent) background. That is what I mean by depth rendered to texture.

 

I was able to do it with a different tool. I know there is some way to do it in Maya LT either with a shader or what.

 

I didn’t know that Arnold is a part of Maya LT. Is it really, do those steps really work?

Message 6 of 10
jordan.giboney
in reply to: darrennix

You are right! Arnold is not included with Maya LT - for some reason, I keep thinking that this is in the full version of Maya, my apologies for the confusion.

 

What tool did you end up using to get this effect? 🙂 I am personally curious, and it would be great to document the answer on this thread so that other Maya users can get that info as well!



Jordan Giboney
Technical Solutions Engineer | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA


Message 7 of 10
darrennix
in reply to: jordan.giboney

Thank you for you candidness and honesty.

Although Maya LT could perhaps do it via shaders potentially the steps are
more complicated than I was able to figure out, or else I missed something.

I ended up using a competitive tool, Blender, from this video (
https://www.youtube.com/watch?v=Zd9xzPKMIWE) which involved enabling "mist"
on a camera, configuring a Z boundary e.g. 2.5 to 10.0 representing the
region in which to produce a depth range from 0.0 to 1.0, and a shading
network that outputs "mist" to a file.

All in all I recognize the significance of Maya and what you are all
accomplishing with regard to reworking a complex and beautiful system into
functionality that everyone wants and I am very appreciative to be able to
use what is there at the reasonable price, so thanks again.
Message 8 of 10
mspeer
in reply to: darrennix

Hi!

 

MayaLT has no (or only limited) render features.

 

1. For Viewport 2.0 enable Hardware Fog and set Color to black.

2. Apply a white flat shader to your objetcs or enable Use default material and set the default material to

Color "black" + Incandescene "white"

 

vp2depth.gif

 

 

 For anything render related i recommend to use "full" Maya version and not Maya LT.

Message 9 of 10
darrennix
in reply to: mspeer

That's right, you are totally right, it's a render. I was thinking of it as
a texture bake. Still this a feature that you might want to add though to
the texture baking features e.g. in Turtle.

In particular, this is a render to a texture, used as a texture bake, but
you're right that it uses a render to accomplish the texture bake. In
particular depth rendered to texture from a camera source is very useful
for baking shadow maps and other tricks and techniques that are used to
read from it as a texture at runtime in an indy game or app.

I'll leave it up to you about whether it's a feasible feature to add, e.g.
to Turtle. The user would have to supply a camera to Turtle and select to
bake depth, and then it would render from the camera, but only capture
depth and store it into the texture.
Message 10 of 10
flaviocastello
in reply to: mspeer

❤️ I's very great! Thank you!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report