Jump to content

Attribute wrangle: Detail mode vs Point mode and it's relation


Recommended Posts

Hi,

my title may be confusing, but it's a noob question. I'm having trouble accessing points attributes in detail mode. I can create points easily, but when I want to access let's say it's position, it always returns 0,0,0 with the point() function. Also it seems that points created AND removed still appear in detail attributes but not in my points.

I'm not sure I completely understant the logic of detail vs point(...) and it's relation/interactions.

 

I have attahched a file containing both examples of my problem

noobQuestion.hipnc

Link to comment
Share on other sites

I've not the exact explanation, but I think you can't use the geo created in a wrangle in the same wrangle.
You have to split your code in two wrangles.

In short, the point or primitive modes run over points or primitive, so it's suitable for modifying existing geo.
If you want to create points from scratch you have tu use detail mode since there is nothing to run over.
Moreover, if you create one point in point mode, you actually create a point for each pre-existing point.

Think of the detail mode as a function executed once per frame,
and the point mode a function executed once per point.

noobQuestion.hipnc

Edited by flcc
Link to comment
Share on other sites

So it seems like even if you create a point, it's not created until the end of your code (output of wrangle). Because if I try to access it's position in a detail wrangle, but in another one, it works. If I do it in the same node as it was created, it returns false.

So if I need to move my geo, but inside my detail wrangle. Do I just end my code in detail wrangle, add a point wrangle, then add another detail wrangle?

 

EX: I want to create geometry, then move it to (0, 0, 0) to do some trigonometry and create prims and points etc..., then move it to it's previous location.

Do I have create 4 nodes? Or is there a way to do it all inside the detail wrangle?

 

Maybe I just need to adapt my code.

Thanks!

Link to comment
Share on other sites

Say like this, I would say yes you need to create four node. there is nothing wrong with this.
But you can also code all in the detail wrangle. Create points coordinates, make you transforms, run for loops on the created (virtual)points and then in the end of your code creates all the geo with the addpoint or prim function. All in one detail wrangle. Not really the better way but it's possible.

At this point you need to know what is the final purpose.
There is so much way to do things in houdini.

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...