Jump to content

bind vector array


Recommended Posts

Hi,

I'm having a slight problem where I'm sure there's a quick solution I'm just overlooking.

 

On a geometry I create a vector array { {1,0,0}, {0,1,0}, {0,0,1} } together with a simple color {1,1,1}.

In a materialbuilder shader then, if I bind to the simple color and hook that up the the surface output I see the white color. However, when I create a bind for the vector array, get the nth element from it and hook this into the surface output, I cannot get any of the array vectors to display.

File and screenshot attached.

Thanks for your help!

M

vecArray_odforce.jpg

vecArray_odforce.hiplc

Link to comment
Share on other sites

You need to set your attributes to primitives and not points. I guess Shop is looking for prim attributes and not point attributes by default. To get it working with points, create your material inside a MatNet and it will look for points attributes, at least I've tested it and it's working.

 

Cheers,

Link to comment
Share on other sites

shop and mat shouldnt make a difference, but array type is not interpolable, so it makes sense that it's a bit ambiguous as point attribute when sampled in a surface shader, it's similar with string attribs if I remember correctly, so prim is a safer bet for those

Edited by anim
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...