Notifications
Clear all

[Closed] Question about "collapsTo" method

Is it possible to collaps the range of modifier stack (similar to maxOp.collapsTo) but to not affect base object. All geometry changes need to be stored in EditPoly or EditMesh modifier.

16 Replies

I don’t know how you’d script it, but what you could do is have the teapot, copy it, apply your modifiers, collapse it. Then on your original teapot, add an edit poly modifier, delete all the face, and then attach the modified teapot. Then by enabling / disabling the edit poly modifier would control the effect.

Slightly laterally thinking, but could work.

Dean

Hi Dean, thanks for relpy.
You are right, it is possible using your suggestion.
But you need to jump to modify panel to perform some modifier operation, and than slow down entire process.
This is the code


 delete objects
 max create mode
 obj=Teapot name:"OriginalObj"
 addmodifier obj (Stretch Stretch:1)
 addModifier obj (Bend BendAngle:45)
 slice = Slicemodifier Slice_Type:2
 slice.Slice_Plane.Position.z = 45
 slice.Slice_Plane.Rotation = (quat 0 0.21644 0 0.976296)
 addModifier obj slice
 addModifier obj (Cap_Holes())
 maxOps.cloneNodes obj cloneType:#copy newNodes:&nnl
 objCopy = converttopoly nnl[1]
 for i = obj.modifiers.count to 1 by -1 do deleteModifier obj i 
 addModifier obj (Edit_Poly())
 max modify mode
 select obj
 obj.Edit_Poly.SetSelection #Face #{1..(obj.numfaces)}
 obj.Edit_Poly.ButtonOp #DeleteFace
 obj.Edit_Poly.Attach objCopy editPolyNode:obj
 

I hope there is better solution for this “simple” task, but who knows :hmm:

do you not see that what you want to do doesn’t make sense?
make cylinder, add edit poly modifier, move/rotate some verts, and try to change number of the cylinder’s sides… screwed?
what does it mean? after you taper, bend, whatever modifier operations with mesh (it calls simple modifier), the cylinder gone forever, and you can forget about it. radius and height still work. but any dimension things can be done with scale. if topology died there is no reason to keep base primitive.

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Yep.
Not make sence if you want to make changes on base object after collasing.
But i need this only for preview, i not want to see bunch of modifiers in stack.
I modeling a building and i used a lot modifiers. This way I can see the different variants

I mentioned at the beginning of thread that i search similar function like maxOps,collapsTo but for range,
let say i have assigned 10 modifiers and i want to collaps from 1st to 5th only. All collapsed mods will be stored in newly assigned epoly modifier at the top of stack.
I do not know if this is achievable in max.

you can do it… it’s actually not complicated…

make reference at some stack point…
delete all modifiers of reference above the point
disable everything below the point of the original node
collapse stack
replace baseobject of the original node with the reference

voilà

3 Replies
(@gazybara)
Joined: 11 months ago

Posts: 0

I will try:)
Thanks Denis
I post the code latter

(@gazybara)
Joined: 11 months ago

Posts: 0

In fact, do not really understand how to do that with maxscript. Can you show a little example, please.

(@denist)
Joined: 11 months ago

Posts: 0

if i show a little example this little example will show everything it’s too easy.
usually when i show my solutions all people say “Hey! That’s simple. That’s exactly how I would do it”

I’m not that person :). Anyway, i never figure out how to move modifiers of ref. object above and below “border” line with mxs. I appreciate your time, and understand what other peoples say.
I never ask something if is simple.:sad:

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

okay, okay… as i already said today in other topic i’m kind today… let me make a snippet. i’m little busy right now but hopefully i will show it soon…

No,no…Your kindness started at Jul 2009 when you join on this forum. Don’t forget that.

oops… yes. i’ve said “oops”.
the task is not as easy as i thought. edit poly modifier updates its mesh cash every time when the base object was changed.
i didn’t expect this behavior. my bad…
so… there is a backup idea. we have to bake the current deformation in an edit_poly modifier somehow…
and i will do it because –
I would NEVER let MAX kick my a$$!!! (denisT)

gazybara,

before i go far with max fighting could you give me a picture where this feature really works?
what does the max user lose without it?

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Hey Denis,
stop fighting, really no need. I do not want to waste your time.
At the very beginning, I realized that will be hard task to do because Autodesk not implemented jet this feature. Users can live withot this.
When you start to unwrap a geometry with different mtl ID I start assigning EPoly for poly selection and UVW Map mod. Eventually stuck will overflow with mods for every matID.
In this case “collapsTo for range of mods” would have a significant use.
Anyway, thank you.
Maybe you can start some challenge related to this topic.:shrug:
Cheers!

Page 1 / 2