Hi BabaJ :-)
Ideally i would like the box to match the length and width of the source prim face, Its height can stay the same. So that it matches the face perfectly.
This should work on both the squares and the rectangles because its using length and width per prim?
I hope that makes sense.
Wouldn't the pscale scale it uniformly though? Instead of on the width and length.
Thank you!
Found 8 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » Scale Object Instances To Match Scale of Prims?
- JackEaves
- 8 posts
- Offline
Houdini Indie and Apprentice » Scale Object Instances To Match Scale of Prims?
- JackEaves
- 8 posts
- Offline
Hi Everyone,
I have a cube with different sized faces - some are thinner, some are more square for example.
I have set it up so that there is a point at the center of each prim.
I am them Instancing a new cube to sit on each of these points.
What I want to do is to make the instance cubes match the scale of the prim that they are sitting on.
Is this possible?
I am aware that the instances inherit the attributes from the points that they are instanced too but I don't fully understand how to implement it…
I have tried it with a for each loop before and got it working but it doesn't work with Instances.
Thank you for any help
I have attached some example images and my scene.
I have a cube with different sized faces - some are thinner, some are more square for example.
I have set it up so that there is a point at the center of each prim.
I am them Instancing a new cube to sit on each of these points.
What I want to do is to make the instance cubes match the scale of the prim that they are sitting on.
Is this possible?
I am aware that the instances inherit the attributes from the points that they are instanced too but I don't fully understand how to implement it…
I have tried it with a for each loop before and got it working but it doesn't work with Instances.
Thank you for any help
I have attached some example images and my scene.
Edited by JackEaves - July 7, 2018 10:40:20
Technical Discussion » Prims upside down?
- JackEaves
- 8 posts
- Offline
Don't worry! I've figured it out by some more googling
Thank you for all your help BabaJ.
I found a ‘distance_between’ process from someone on another forum post: sl0throp's post near the bottom: https://www.sidefx.com/forum/topic/22750/ [www.sidefx.com] and then modified it a little and used it to reference the ledge of each edge, of each prim within a loop. Then divide the appropriate edges by the appropriate measurement. This means that the edges are all divided equally depending on their size.
Thanks again!
Jack.
Thank you for all your help BabaJ.
I found a ‘distance_between’ process from someone on another forum post: sl0throp's post near the bottom: https://www.sidefx.com/forum/topic/22750/ [www.sidefx.com] and then modified it a little and used it to reference the ledge of each edge, of each prim within a loop. Then divide the appropriate edges by the appropriate measurement. This means that the edges are all divided equally depending on their size.
Thanks again!
Jack.
Edited by JackEaves - June 13, 2018 03:09:02
Technical Discussion » Prims upside down?
- JackEaves
- 8 posts
- Offline
Hi BabaJ,
I've just had a look at your file, the primitive wrangle works great! Thank you so much for figuring that out for me. As you said it isn't procedural but I may come back to it and figure out how to get it to work that way If i can.
I ended up starting again and taking a different approach - trying to get the subdivisions there before the extrusion. This works perfectly! Adding vertices to the base prim and then extruding up.
However even though I am using telling it to calculate the amount of cuts by the size of the prim, it's still giving the shorter edges the same amount of cuts as the longer edges. I think it's because I'm using the area of the whole prim, not the length of the edge?
Would you happen to know a better way to divide each edge of the prim (Inside a for-each loop?) according to it's length? So if the edge is 10 units long, divide it 10 times?
Have attached my new hip and some screenshots.
Sorry I've changed the subject a bit here, If i should really open a new topic please let me know !
Thanks again for all your help,
Jack.
I've just had a look at your file, the primitive wrangle works great! Thank you so much for figuring that out for me. As you said it isn't procedural but I may come back to it and figure out how to get it to work that way If i can.
I ended up starting again and taking a different approach - trying to get the subdivisions there before the extrusion. This works perfectly! Adding vertices to the base prim and then extruding up.
However even though I am using telling it to calculate the amount of cuts by the size of the prim, it's still giving the shorter edges the same amount of cuts as the longer edges. I think it's because I'm using the area of the whole prim, not the length of the edge?
Would you happen to know a better way to divide each edge of the prim (Inside a for-each loop?) according to it's length? So if the edge is 10 units long, divide it 10 times?
Have attached my new hip and some screenshots.
Sorry I've changed the subject a bit here, If i should really open a new topic please let me know !
Thanks again for all your help,
Jack.
Edited by JackEaves - June 12, 2018 03:33:08
Technical Discussion » Prims upside down?
- JackEaves
- 8 posts
- Offline
Hi BabaJ,
Thanks again for your feedback! I agree that its the split..
Ah i see what you mean about the vertice numbers, good spot!
If it comes to it i may just do it by hand as you mentioned, but ideally i was hoping to run this on larger scale and therefore it would take longer to reverse each one.
But yes it could be a lucky thing that is has a pattern to the issue (effecting the last in the row).
Thanks a lot for adding to my file, i dont have access to houdini until Monday but what you've done sounds great and i cant wait to see what youve done.
Thanks, again!
Thanks again for your feedback! I agree that its the split..
Ah i see what you mean about the vertice numbers, good spot!
If it comes to it i may just do it by hand as you mentioned, but ideally i was hoping to run this on larger scale and therefore it would take longer to reverse each one.
But yes it could be a lucky thing that is has a pattern to the issue (effecting the last in the row).
Thanks a lot for adding to my file, i dont have access to houdini until Monday but what you've done sounds great and i cant wait to see what youve done.
Thanks, again!
Technical Discussion » Prims upside down?
- JackEaves
- 8 posts
- Offline
Hi BabaJ,
Thank you again for your reply, I appreciate the help.
Yes good point, I've attached a new hip which I have put a simple pyramid-like shape onto the walls and removed the nodes that aren't necessary for this example.
It wasn't the floor that I had issues with - however I was meaning to get rid of them so thank you.
In the new hip, I want all of the pyramids to point down, however you should see that the ones at the end of each line are pointing up instead. I can select these faces manually by putting in the prim numbers however i'm not sure how to do this procedurally, as the cuts are done depending on the grid and extrude inputs before it. This is why I put the reverse after the loop which is making the divisions.
Is there a way, once the loop has ran, to then look through all of prims and say ‘if prim is facing up, reverse U’? Or even, right at the end of the network once the geometry has replaced the prims, to say ‘if geometry is facing up, reverse it to face down’?
Also, I've turn on primitive normals but nothing looks wrong with them, from what I can see.
I've attached an image to show my thought process and where it's going wrong.
Thank you again!
Thank you again for your reply, I appreciate the help.
Yes good point, I've attached a new hip which I have put a simple pyramid-like shape onto the walls and removed the nodes that aren't necessary for this example.
It wasn't the floor that I had issues with - however I was meaning to get rid of them so thank you.
In the new hip, I want all of the pyramids to point down, however you should see that the ones at the end of each line are pointing up instead. I can select these faces manually by putting in the prim numbers however i'm not sure how to do this procedurally, as the cuts are done depending on the grid and extrude inputs before it. This is why I put the reverse after the loop which is making the divisions.
Is there a way, once the loop has ran, to then look through all of prims and say ‘if prim is facing up, reverse U’? Or even, right at the end of the network once the geometry has replaced the prims, to say ‘if geometry is facing up, reverse it to face down’?
Also, I've turn on primitive normals but nothing looks wrong with them, from what I can see.
I've attached an image to show my thought process and where it's going wrong.
Thank you again!
Edited by JackEaves - June 7, 2018 03:34:53
Technical Discussion » Prims upside down?
- JackEaves
- 8 posts
- Offline
Hi BabaJ
Thanks for your reply, great idea! You can find my hip below.
I have also attached an image, these are the nodes that are dividing the prims. I measure the size of the current prims from the extrusion and the divide them based on that, so that larger faces are divided more than small faces.
I have just tried a reverse SOP and found that if I set it to shift and the U Offset to 2 then it corrects the wrong prims BUT it does this for everything, so now the rest of the prims are upside down. Is there a way I can make it only work on those that are already upside down?
Thank you again for your help.
Thanks for your reply, great idea! You can find my hip below.
I have also attached an image, these are the nodes that are dividing the prims. I measure the size of the current prims from the extrusion and the divide them based on that, so that larger faces are divided more than small faces.
I have just tried a reverse SOP and found that if I set it to shift and the U Offset to 2 then it corrects the wrong prims BUT it does this for everything, so now the rest of the prims are upside down. Is there a way I can make it only work on those that are already upside down?
Thank you again for your help.
Edited by JackEaves - June 6, 2018 09:03:05
Technical Discussion » Prims upside down?
- JackEaves
- 8 posts
- Offline
Hi everyone,
This is my first post so apologies if I should be providing more info.
I have a grid which I have then extruded some towers. I have then split the prims so that they have (roughly) equal sub divisions. However some of these prims, mostly the right sid, have become rotated along Y (I think) Which means when I attach / replace them with geometry the geometry comes in upside down.
I hope this makes sense, Please see my attached images.
Is there any way, after I have cut the prims, to make sure they are all still orientated the right way?
I have seen posts saying about using Facet and some other nodes but this only seems to fix flipped / reversed prims and doesn't solve my problem.
Any ideas?
Thanks!
Jack.
This is my first post so apologies if I should be providing more info.
I have a grid which I have then extruded some towers. I have then split the prims so that they have (roughly) equal sub divisions. However some of these prims, mostly the right sid, have become rotated along Y (I think) Which means when I attach / replace them with geometry the geometry comes in upside down.
I hope this makes sense, Please see my attached images.
Is there any way, after I have cut the prims, to make sure they are all still orientated the right way?
I have seen posts saying about using Facet and some other nodes but this only seems to fix flipped / reversed prims and doesn't solve my problem.
Any ideas?
Thanks!
Jack.
-
- Quick Links