xyzdist vop in shader

   2907   4   1
User Avatar
Member
680 posts
Joined: 11月 2013
オフライン
Hi,
I want to use xyzdist vop in shader. It can't work. Am I wrong?
Thanks!
Edited by jerry7 - 2016年9月27日 04:48:49

Attachments:
20160927164507.png (33.4 KB)

User Avatar
Member
721 posts
Joined: 9月 2013
オンライン
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
9417 posts
Joined: 7月 2007
オフライン
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
CG Supervisor
Framestore, NY
User Avatar
Member
31 posts
Joined: 10月 2017
オフライン
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
8184 posts
Joined: 9月 2011
オフライン
You can't send rays (trace) in a displacement shader, or the render will never start.
  • Quick Links