Can not read point attribute with shader

   1672   6   2
User Avatar
Member
313 posts
Joined: Oct. 2016
Offline
To make things simple here is an image and a hip file.

The attribute Oi can not be read by the shader. Do you know why and how? Please help!

Attachments:
attribute_to_shader_issue.png (673.6 KB)
attribute_to_shader_issue.hipnc (1.1 MB)

Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
4532 posts
Joined: Feb. 2012
Offline
From the screenshot the type should be color not color array.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
Try setting the type to Color and see if it works.
Currently is Color(array)
User Avatar
Member
313 posts
Joined: Oct. 2016
Offline
Thanks guys, (but it does not work, no idea what is missing)

if I do this (rename Oi to Cd) the Cd is read easily from the shader itself. This is what is expected to happen with the Bind node.

My Bind node seems like it is dead.

The other Bind node is the same.

Pulling Transparency manually works immediately.
Edited by SWest - Nov. 3, 2022 07:43:22

Attachments:
attribute_to_shader_issue1.png (519.4 KB)
attribute_to_shader_issue2.png (560.8 KB)
attribute_to_shader_issue3.png (548.4 KB)
attribute_to_shader_issue4.png (525.1 KB)

Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
313 posts
Joined: Oct. 2016
Offline
Also, when connecting the Bind node to the shader this message keep showing while rendering.

(The attribute "Of" is an intentional test. )
Edited by SWest - Nov. 3, 2022 08:52:03

Attachments:
attribute_to_shader_issue5.png (210.5 KB)

Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
478 posts
Joined: Aug. 2014
Offline
Try this.

Attachments:
fixed_attribute_to_shader_issue.hipnc.tar.gz (302.8 KB)

User Avatar
Member
313 posts
Joined: Oct. 2016
Offline
Thanks animatrix_, Andr and especially ajz3d,

thanks to your advice, and a calm moment of fiddling with numbers, this also works with Mantra and Karma (ajz3d's contribution).

The missing piece of the puzzle was that (Houdini) OpenGL does not support this out of the box, so rendering must be done with Mantra or something equivalent. Also, using OpenGL to interpret the shader is a mistake (I should know this). However ajz3d showed how to do this with Karma as well.

The idea of using attributes (replacing maps) is just one tool in the toolbox when dealing with shading. However, it is one that does not require UV:s or UDIM:s, and for that reason it is important imho. Other methods that do not require UV:s are Houdini groups and (probably) image projections. Maya also has something like "3d" materials (can not remember the proper name) and I'd expect Houdini has something equivalent.

This is a small step for man, but... I'm so relieved! Now on to the next challenge.
Edited by SWest - Nov. 3, 2022 14:50:45

Attachments:
solved_attribute_to_shader_issue.png (451.3 KB)

Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
  • Quick Links