World Coordinate pass?
MBAIRD
Posts: 22
Is it possible to render a world coordinate pass out of Daz?
Thanks
MB
You currently have no notifications.
Is it possible to render a world coordinate pass out of Daz?
Thanks
MB
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2024 Daz Productions Inc. All Rights Reserved.
Comments
Yes.
No problem. Glad i could help.
What are you looking for? A Daz Studio render that colours the surfaces by their (relative) position in scene space, with one colour per axis? For 3Delight that should be doable I think in Shader Mixer. For Iray I'm not suer - it isn't one of the options in the Canvasses pane (but then for a purely mathematical render it wouldn't hurt to switch engines).
Yeah, it shouldn't matter if you switch over to 3delight for a world coordinate pass and still render out the real scene in iRay. I need them as seperate images anyway. and yes, I want the one color per axis sort of render. I am looking to play around with further compositing in the now free BlackMagic Fusion compositor.
I have played with the shader mixer for about two minutes so I need to go back and look at it more thoroughly. I was hopeing somenoe knew of a tutorial or a process of how to do it that I was missing.
Milling host... humm. <grin>
MB
Okay, Shader builder looks like a really cool tool, but if you have never done a shader before the documentation is terribly inadiquate. After a few hours of looking at everything google can find, I am no closer to learning how to build ANY shader then when I started. Much less build a world coordinate shader. (other then finding xcomp, ycomp, and zcomp functions and thinking I am probably going to use these in some way. Other then that, no progress) any hints on where to look for shader buiding 101? because the Daz documents arn't doing it for me.
This is Shader Mixer, not Shader Builder.
Well, this is a quicky that does only the x value. I take three variable(Fixed) bricks, one for Scenemax, one for Scenmin (which gives points at opposite corners of the bounding box for the scene) and one for P, the point being rendered (if you use displacement that will be an extra wrinkle). I split each ne down into its x, y and z values. Then, as I said working with just x, I subtract the x minimum from both the x point and the x maximum, then divide the point-min by max-min (so I work out how far across the scene the point is as a proportion of the width). Then I feed the result into a new point and finally I cheat and feed that point into the output colour.
You can find all of the bricks in the Brickyard panel on the left (hidden by my render) under functions - the variable(Fixed) brick is under Utility, the Point and XYZ Components are under Geometry, subtract and divide are the Binary Operation brick under Mathematical.
Yep, it can be done in approximately two Minutes. Here is how i do this in steps. I use a little test scene containing a plane and sphere from the DS primitives.
1 Open the shader mixer window (DS menu Windows->Panes->ShaderMixer.
in the shadermixer window that pops up choose File->New Shader. Then select the Camera from "New Shader" box (see image).
Create a new root node for the shader. From the brickyard (lower left) dragndrop the Volume node into the grey area on the right.
3 this shader should not be transparent; from the brickyard (utility section) dragndrop the "Variable[Root Context]" into the shader area. The default value 1 is fine. Connect the output of the "Variable[Root Context]" to the input of Oi Input of the volume brick.
4 Last: Since this should generate world coordinates, use a transform node to generate world coordinates. Dragndrop it from the Geometry/Transformations in the brickyard. In the transform brick select "world" for the "To" parameter and connect it to the Ci input of the Volume brick
Now i can click on the "Apply" in the shader mixer's lower right. This will generate a camera in the scene. rendering through the camera will generate world a world coordinate image like the one below.
Normally this is what i would use. However, The DS world space is relatively large because it is in centimeters and the test scene is is already 2 meters wide and also has negative coordinates. So what i would do is to use the scripted 3delight renderer to render it into a floating point file (or render it to a rib file and then render that with the command line 3delight).
Alternatively, to save a png or jpg in all rainbow colors from within DS, without messing with a HDR file format simply go into the render settings from DS, and set the "gain" parameter to 0.01 (for this kind of render it is also common to set the "gamma" to 1). That will make the renderer scale all colors down by a factor of 100, so that the whole color range is used. There are still some negative values which you can simply resolve by shifting the image enough to the right and front (which might require an even smaller "gain" value to fit everything in, but you should get the idea). Of course it is possible to built some kind of self-adjusting scale into the shader (like Richard Haseltine did), but that complicates thing considerably IMO.
Depending on what you want to do with this render, there might be problems when semitransparent surfaces are involved, or if antialiasing is required. Probably it is best to set the pixel samples in the render settings to 1 (no antialiasing).
millighost... Thanks very much. that took you considerably longer then two minutes to explain and I sencerly appriciate it. I will go over it in detail and try to understand how it works. Bets tutorial yet on the subject. thanks again!