Jump to content
brokenpixel

looking for solution for temporarily zeroing out rotation of copied el

Recommended Posts

hello all

i have hit a stumbling block while trying to solve a procedural modeling problem. i have a path curve that i am using as a base to copy and then skin a profile curve to create a curvy wall. i then create groups from each created segment and would like to do any number of operations on them (polyextrude in particular). the issue is that since each piece is rotated differently i cannot achieve the results i want. i figured that one way to solve this was to store the rotation parameter in an attribute, zero out the rotation of the segment, do whatever processes i want to do, and then re-rotate the segment back to its original rotation. some research on the forums turned up discussions of various vex + vop ways to find rotations - but i have had a hard time applying what i can pick up to my particular situation. any assistance with this would be greatly appreciated !

.hip file attached.

best,

scott

post-1153-128970044393_thumb.png

curve_create_forum_04.hip

Share this post


Link to post
Share on other sites

hello all

i have hit a stumbling block while trying to solve a procedural modeling problem. i have a path curve that i am using as a base to copy and then skin a profile curve to create a curvy wall. i then create groups from each created segment and would like to do any number of operations on them (polyextrude in particular). the issue is that since each piece is rotated differently i cannot achieve the results i want. i figured that one way to solve this was to store the rotation parameter in an attribute, zero out the rotation of the segment, do whatever processes i want to do, and then re-rotate the segment back to its original rotation. some research on the forums turned up discussions of various vex + vop ways to find rotations - but i have had a hard time applying what i can pick up to my particular situation. any assistance with this would be greatly appreciated !

.hip file attached.

best,

scott

post-1153-128970044393_thumb.png

...not sure if this is what you want, but I just used a point sop(to extrude more smoothly) and an extrude(not polyextrude) and it extruded fine after your node WOULD_LOVE_TO_BE_ABLE_TO_POLYEXTRUDE_HERE... yeah, ney?

curve_create_forum_05.hip

Share this post


Link to post
Share on other sites

hello laidlaw + all

thank you for taking a look at this. i'm getting closer to what i am trying to do but am still not quite there. i revised my .hip to hone in a bit more on the specific problem here. i created a few nodes at the top that create an alternate surface purely for the CREATE_NORMALS_FOR_SURFACE point SOP so i can be sure my normals point in the exact direction i want my extrusions happening. using the extrude SOP i am indeed able to extrude in the direction i want - but unlike the polyextrude SOP my options are limited regarding scaling, etc. check out the TRY_CHANGING_SX_OR_SZ transform SOP in the new .hip which illustrates the specific problem of each segment of this wall having a different rotation. ideally i would be able to scale and tweak the segment piece at this point in any way i want to and when elements are reassembled in the COPY_TO_REASSEMBLE_PANELS copy SOP the tweaks would be homogeneous across all copies.

best,

scott

post-1153-128977388382_thumb.pngpost-1153-128977388922_thumb.png

curve_create_forum_08.hip

Share this post


Link to post
Share on other sites

hello laidlaw + all

thank you for taking a look at this. i'm getting closer to what i am trying to do but am still not quite there. i revised my .hip to hone in a bit more on the specific problem here. i created a few nodes at the top that create an alternate surface purely for the CREATE_NORMALS_FOR_SURFACE point SOP so i can be sure my normals point in the exact direction i want my extrusions happening. using the extrude SOP i am indeed able to extrude in the direction i want - but unlike the polyextrude SOP my options are limited regarding scaling, etc. check out the TRY_CHANGING_SX_OR_SZ transform SOP in the new .hip which illustrates the specific problem of each segment of this wall having a different rotation. ideally i would be able to scale and tweak the segment piece at this point in any way i want to and when elements are reassembled in the COPY_TO_REASSEMBLE_PANELS copy SOP the tweaks would be homogeneous across all copies.

best,

scott

post-1153-128977388382_thumb.pngpost-1153-128977388922_thumb.png

I'm coming up blank. I believe you need to do you work based on the point normal directions for ease, that is how the extrude is doing it, and that is why your grouping and transform are not working(pretty much saying what you already said differently). You can put a transform to center it and a reverse transform to align it back along an axis, I just don't know how to create and orient angle based on two points from your shape. Which is pretty much what you are looking for reworded.

Just to play devils advocate, is there an alternative way for you to get the same results? Like create the shape unbent and then bend it along a line(Lattice)? There may be a simpler solution going down that road, not sure what you're look is suppose to be or the functional needs are supposed to be. Then you don't have to worry about creating your shape off axis. If at the end of the day your final object is going to be static and you're not making a tool you have a lot more options.

Share this post


Link to post
Share on other sites

I could be wrong... but is it possible that this might be a good case to use a forEach operator?

this way you run the extrude on each element within a group.

Just a thought

I'm coming up blank. I believe you need to do you work based on the point normal directions for ease, that is how the extrude is doing it, and that is why your grouping and transform are not working(pretty much saying what you already said differently). You can put a transform to center it and a reverse transform to align it back along an axis, I just don't know how to create and orient angle based on two points from your shape. Which is pretty much what you are looking for reworded.

Just to play devils advocate, is there an alternative way for you to get the same results? Like create the shape unbent and then bend it along a line(Lattice)? There may be a simpler solution going down that road, not sure what you're look is suppose to be or the functional needs are supposed to be. Then you don't have to worry about creating your shape off axis. If at the end of the day your final object is going to be static and you're not making a tool you have a lot more options.

Share this post


Link to post
Share on other sites

I could be wrong... but is it possible that this might be a good case to use a forEach operator?

this way you run the extrude on each element within a group.

Just a thought

he is doing it each element at a time using old-school copy stamping technique (from before ForEach) which can surprisingly be even faster than ForEach in some cases

it doesn't matter which technique you use, the problem remains the same, you need to move each element to "local" space, do what you want then move back to original transform

here is the example of that

i am using some reference points to get element's local space rather than calculating alignment directly from geometry edges because it is more flexible and doesn't depend on copied geometry that much

the actual alignment is in VOPs

there is copy and forEach example, but they are essentially the same

curve_create_forum_08_fix.hip

Share this post


Link to post
Share on other sites

hello tomas

thank you for your guidance ! this is fantastic. i thought the way to do this was to normalize the rotations temporarily but i had no clue exactly how to do it. much appreciation.

the next step for me is figuring out how to be able to input a closed curve and have it work properly as well. currently i can only get proper results from an open curve. let me know if you have any thoughts on how to apply this same technique to a closed curve ( simply pipe a circle into the top of the network and you will see what happens ).

this was frustrating me and now i have a usable solution. you rock.

- scott

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

×