How to read attribute in uvproject node

   1804   4   1
User Avatar
Member
216 posts
Joined: Oct. 2015
Online
Hello,

I try to read a created attribute (“attributeTest”) in an uvproject node but it doesn't work.
I do same same thing with a transform node and it work.
(cf. screenshot)

Do you have an idea where I'm wrong ? How can I read an attribute inside the uvproject node ?
Thanks.

Attachments:
attributecreate.jpg (49.5 KB)
attribute.jpg (127.7 KB)
readAttribute_01.hiplc (119.9 KB)

User Avatar
Member
216 posts
Joined: Oct. 2015
Online
I made a step by step to explain better my problem (cf. “attribute_stepByStep.gif”) :

-1- I have an detail attribute parameter (vector {2, 15, 15})
-2- I reference this attribute inside my transform node on x Translate with “@attributeTest.x” and it works
-3- Strangely, as it works and make the transformation, when I click on the parameter to show the evaluated value, it returns 0 instead of 2. I don't understand this because it's an detail attribute (bug or missing feature ?).
-4- On my uvproject node I put in Rotate parameter my attribute “@attributeTest.x”, “@attributeTest.y” and “@attributeTest.z”. But it doesn't do anything .
-5- As well as on the transform node, parameter can't be evaluated/displayed and return me 0 on each rotate component.
-6- Now, if I copy the attributeTest value parameter from his node creation (“attribute_create”)
-7- and paste it as reference to my rotate parameter (“uvproject” node),
-8- it works.
-9- and also value can be displayed.


Why it can't work with my attribute variable ?
I need to use this variable attribute because I need to make some operations before, inside an “attribute VOP”.

I hope that's clear, thanks.

Attachments:
attribute_stepByStep.gif (440.5 KB)

User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
you cant use attributes in uvproject.

Instead of doing this within the uvproject, use a uvtransform after the uvproject.
there you should be able to put @attributeTest.x

hope it helps.
User Avatar
Member
216 posts
Joined: Oct. 2015
Online
Thanks Doudini,
That's a really bad news for me.

I try your suggestion but in my case the uvtransform doesn't fit (I need to stay in 3D context instead the 2D of the uvtransform node).
I think the only option for me is to write my expression/code directly inside the parameter.

Just for the info, I'm currently making an asset for a cubic projection like in any other 3d app and this point is the only last thing that I need to do !

In anyway, thanks.
User Avatar
Member
216 posts
Joined: Oct. 2015
Online
I finally found a workaround to my situation :
I put a transform node before the uvproject one and another transform node after (same with “Invert Transformation” enabled).

With that, I can set my attribute on my transform nodes and it works !!

Cheers !

Attachments:
transform_uvproject.jpg (85.6 KB)

  • Quick Links