CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 04-27-2013, 10:42 AM   #1
dottob
New Member
 
dottob's Avatar
portfolio
dottob
China
 
Join Date: Apr 2013
Posts: 15
How to Wrapped move the bamboo books?



As you see,I have some boxs(120s or more) to simulation this bamboo books (the name is right?),I want move(curl? wrapped? sorry for my poor english) them from left to right,or move from bothsides to center in 60 sec(or more times)

How can I do this with the MaxScript like a magic?

Thank you very much!
 
Old 04-27-2013, 02:33 PM   #2
feranti
Frequenter
Antoine Ferrieux
Paris, France
 
Join Date: Apr 2008
Posts: 208
Why not simply skin the book (one bone per wood piece) without maxscript?
 
Old 04-27-2013, 03:35 PM   #3
dottob
New Member
 
dottob's Avatar
portfolio
dottob
China
 
Join Date: Apr 2013
Posts: 15
Quote:
Originally Posted by feranti
Why not simply skin the book (one bone per wood piece) without maxscript?


Thank you for your replay

I need the algorithm,I 'll not only use it with maxscript in 3dsmax,like away3d,papervison3d,etc.

Last edited by dottob : 04-27-2013 at 03:41 PM.
 
Old 04-28-2013, 10:09 AM   #4
Ian31R
Expert
portfolio
Ian Adams
Freelancer
Kent, USA
 
Join Date: Aug 2011
Posts: 290
There's not really an "algorithm" for rigging things like that in maxscript, using only code. For an experienced rigger, they probably wouldn't only use maxscript for the whole rig. You would instead probably have multiple things driving the transforms of the planks. Maybe by using cloth or skrinwrap, you could even use splineIK. Really, in this type of rig, I don't think you would need maxscript much, if at all. You might be able to use maxscript for a UI with the rig, controlling, already existing parameters.

What are you trying to achieve outside of max? Making this rig creatable with one click in Maya or maybe have it simulated in a game? Maxscript just extends the application using things that already exist within it.

You might be able to make the rig using only code by using C++ and the SDK, and make a plugin for max. Using C++, you can probably use a lot of the same code for other application plugins.
 
Old 04-28-2013, 02:02 PM   #5
dottob
New Member
 
dottob's Avatar
portfolio
dottob
China
 
Join Date: Apr 2013
Posts: 15
Thank you for your remind

Quote:
Originally Posted by Ian31R
There's not really an "algorithm" for rigging things like that in maxscript, using only code. For an experienced rigger, they probably wouldn't only use maxscript for the whole rig. You would instead probably have multiple things driving the transforms of the planks. Maybe by using cloth or skrinwrap, you could even use splineIK. Really, in this type of rig, I don't think you would need maxscript much, if at all. You might be able to use maxscript for a UI with the rig, controlling, already existing parameters.

What are you trying to achieve outside of max? Making this rig creatable with one click in Maya or maybe have it simulated in a game? Maxscript just extends the application using things that already exist within it.

You might be able to make the rig using only code by using C++ and the SDK, and make a plugin for max. Using C++, you can probably use a lot of the same code for other application plugins.


Indeed,in max there are multiple ways to achieve this. I thought maybe this could be achieve by pure code with maxscript. I still believe it would be .

Let's wait and see?Shake hands!
 
Old 04-29-2013, 02:17 PM   #6
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,427
Send a message via ICQ to denisT
here is a basic setup... you can play with some parameters... everyone is free to make nice user interface for that:
Code:
delete objects fn addLink parent gap:0 maxcount:1 &count: &nodes: = ( if count < maxcount do ( next = instance parent name:(uniquename parent.name) pos:(parent.pos + [(1 + gap)*parent.width,0,0]) wirecolor:(parent.wirecolor*0.95) next.parent = parent count = count + 1 insertitem next nodes 1 addLink next gap:gap maxcount:maxcount count:&count nodes:&nodes ) ) fn makeChain maxcount = ( gap = 0.05 count = 0 nodes = #() root = chamferbox name:"sleeper" width:2 length:20 height:0.5 fillet:0.1 fillet_segments:3 root.pivot = point3 (root.min.x + 0) root.center.y root.max.z addLink root gap:gap maxcount:maxcount count:&count nodes:&nodes t = 0 s = 5 d = 3 a = 90 k = 2 i = 0.4 with animate on for node in nodes do ( at time (t+0) rotate node (eulerangles 0 0 0) at time (t+s) rotate node (eulerangles 0 -a 0) t += d a -= (k + i) ) ) makeChain 20

if you want true math formula google for Spiral of Theodorus
 
Old 04-29-2013, 02:44 PM   #7
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,427
Send a message via ICQ to denisT
Quote:
Originally Posted by denisT
if you want true math formula google for Spiral of Theodorus

i'm very kind today ... so
Code:
delete objects fn makeChain count = ( gap = 0.05 parent = chamferbox name:"sleeper" width:2 length:20 height:0.5 fillet:0.1 fillet_segments:3 parent.pivot = point3 (parent.min.x + 0.01) parent.center.y parent.max.z nodes = #() while count-1 > 0 do ( node = instance parent name:(uniquename parent.name) pos:(parent.pos + [(1 + gap)*parent.width,0,0]) wirecolor:(parent.wirecolor*0.95) node.parent = parent count -= 1 insertitem node nodes 1 parent = node ) start = 0 step = 5 delay = 3 n = 0 with animate on for node in nodes do ( n += 1 at time start rotate node (eulerangles 0 0 0) at time (start + step) rotate node (eulerangles 0 (-pi*(atan (1./sqrt(n)))) 0) start += delay ) ) makeChain 24
 
Old 04-30-2013, 12:38 PM   #8
dottob
New Member
 
dottob's Avatar
portfolio
dottob
China
 
Join Date: Apr 2013
Posts: 15
Thumbs up Ah!Is this real?You make it possible!I can't belive my eyes!

Quote:
Originally Posted by denisT
i'm very kind today ... so
Code:
delete objects fn makeChain count = ( gap = 0.05 parent = chamferbox name:"sleeper" width:2 length:20 height:0.5 fillet:0.1 fillet_segments:3 parent.pivot = point3 (parent.min.x + 0.01) parent.center.y parent.max.z nodes = #() while count-1 > 0 do ( node = instance parent name:(uniquename parent.name) pos:(parent.pos + [(1 + gap)*parent.width,0,0]) wirecolor:(parent.wirecolor*0.95) node.parent = parent count -= 1 insertitem node nodes 1 parent = node ) start = 0 step = 5 delay = 3 n = 0 with animate on for node in nodes do ( n += 1 at time start rotate node (eulerangles 0 0 0) at time (start + step) rotate node (eulerangles 0 (-pi*(atan (1./sqrt(n)))) 0) start += delay ) ) makeChain 24


You just like the God Of The Maxscript!
I'll try my best to digestion your Great Work!
And THANK YOU Specially for you GIVE ME A RIGHT WAY!
 
Old 04-30-2013, 12:38 PM   #9
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:21 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.