xyzdist vop in shader

   2298   4   1
User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
Hi,
I want to use xyzdist vop in shader. It can't work. Am I wrong?
Thanks!
Edited by jerry7 - Sept. 27, 2016 04:48:49

Attachments:
20160927164507.png (33.4 KB)

User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
I am also trying to measure the distance from a shading surface to another object (in this case a wireframe).
In the documentation it says xyzdist can read internal paths like opobj/etc
It only seems to output the max search distance, though. Any ideas?

Additional question: Whats the most straight forward way to create a custom wireframe shader?

Attachments:
wireframe_shader.hiplc (413.4 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
8538 posts
Joined: July 2007
Offline
op: syntax in Mantra can only point to geometry that is defined in IFD
that is any SOP node with render flag that is included in Mantra's objects
of course to make it not renderable you can clear vm_rendervisibility field

so in your specific case you need to create new object that will hold your wireframe geo
see example

to the other question to render just wireframe you can try using Wren ROP, it offers some basic control, but nothing fancy, depends on what you need it for

Attachments:
wireframe_shader_fix.hipnc (422.3 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
28 posts
Joined: Oct. 2017
Offline
Could you use the output of the occlusion instead of xyzdist?
I'm trying to figure out how to drive displacement with the occlusion.
What's the syntax for using an internal map instead of a disk-based map in a texture map field?

T
User Avatar
Member
7755 posts
Joined: Sept. 2011
Online
You can't send rays (trace) in a displacement shader, or the render will never start.
  • Quick Links