Jump to content
Elggetto

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

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Thank you so much for your answer! Houdini is such a beast of a software. I really want to grasp the basics before diving into more complicated stuff.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×