Prims upside down?

   2113   8   1
User Avatar
Member
8 posts
Joined: May 2018
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.

Attachments:
Issue_02.JPG (247.3 KB)
Issue_01.JPG (352.4 KB)

User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Probably best to post your hip.

But reverse sop might help you.
User Avatar
Member
8 posts
Joined: May 2018
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.
Edited by JackEaves - June 6, 2018 09:03:05

Attachments:
Jack_Issue.hip (1.1 MB)
Divide_section.JPG (26.2 KB)

User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Well, since your file is referencing external files I can't see exactly where the issues are.

But what you need to do is select only the prims that need changing. What your doing is applying the reverse to all of them.

The idea behind the reverse is to change the Normals of each prim.

In your second image you have the reverse sop after the operations. Try putting it before the looped section and in the Source Group parameter of the reverse sop put,

0-8

Those are your floor prims which all face towards the ‘inner’ dimensions of the geometry they are a part of, compared to how the other prim normals face.

Don't know if this part of your scene is giving you the issues.

But just turn on prim normals so you can how the geometry is before and how it is after you operations and you will see which ones need to be ‘corrected’ before.

You can leave the reverse sop at it's default settings other than entering prim numbers as mentioned before.
Edited by BabaJ - June 6, 2018 14:55:33
User Avatar
Member
8 posts
Joined: May 2018
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!
Edited by JackEaves - June 7, 2018 03:34:53

Attachments:
Jack_Issue.hip (596.8 KB)
Issue_01.JPG (114.4 KB)
Issue_02.JPG (683.3 KB)

User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Hey Jack,

So what I see the issue being is the polysplit.

If you turn on show vertice numbers for the viewport > under the Markers tab of Display Options,

you'll see that for every last resulting piece of a polysplit operation on a primitive - that the vertice number order is changed compared to the previous new prims created by the polysplit.

This is why when you set your shift to 2 on the reverse node it corrected the issue on the problem ones.

So you could just select those problem prims and reverse for only those. That would be the immediate solution for your existing scence if you don't want to make further changes.

But your asking how to do this procedurally….

This probably would take more testing, as I haven't used the polysplit node before.

But just looking at your file it appears that in each polysplit operation per primitive ( as in your loop ) it is only ever the last new piece(primitive) created that has its' vertice number order changed(compared/relative to the others).

Unfortunate as it is(that all can't be the same), but good if true, that it is always the last one.

Because then you could turn the results of the polysplit into a procedural operation.

…..meanwhile later, after some messing about….

To your most recent scene file, I've added a wrangle and put it in a netbox colored so you can find it easily.

It's only applying to the one polysplit in the loop…but should work in other cases as well in your scene.

Attachments:
Jack_Issue_added_wrangle.hiplc (717.3 KB)

User Avatar
Member
8 posts
Joined: May 2018
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!
User Avatar
Member
8 posts
Joined: May 2018
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.
Edited by JackEaves - June 12, 2018 03:33:08

Attachments:
Jack_Issue_02.hip (1.3 MB)
Issue_03.jpg (744.7 KB)
Issue_04.jpg (770.1 KB)

User Avatar
Member
8 posts
Joined: May 2018
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.
Edited by JackEaves - June 13, 2018 03:09:02

Attachments:
Issue_06.jpg (28.5 KB)
Issue_05.jpg (243.4 KB)

  • Quick Links