Elggetto Posted June 25, 2021 Share Posted June 25, 2021 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 Quote Link to comment Share on other sites More sharing options...
flcc Posted June 25, 2021 Share Posted June 25, 2021 (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 June 25, 2021 by flcc Quote Link to comment Share on other sites More sharing options...
Elggetto Posted June 25, 2021 Author Share Posted June 25, 2021 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! Quote Link to comment Share on other sites More sharing options...
flcc Posted June 25, 2021 Share Posted June 25, 2021 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. Quote Link to comment Share on other sites More sharing options...
Elggetto Posted June 25, 2021 Author Share Posted June 25, 2021 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.