How to Wrapped move the bamboo books?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  04 April 2013
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!
 
  04 April 2013
Why not simply skin the book (one bone per wood piece) without maxscript?
 
  04 April 2013
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 April 2013 at 03:41 PM.
 
  04 April 2013
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.
 
  04 April 2013
Thank you for your remind

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!
 
  04 April 2013
here is a basic setup... you can play with some parameters... everyone is free to make nice user interface for that:

  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
 
  04 April 2013
Originally Posted by denisT: if you want true math formula google for Spiral of Theodorus

i'm very kind today ... so

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
 
  04 April 2013
Thumbs up Ah!Is this real?You make it possible!I can't belive my eyes!

Originally Posted by denisT: i'm very kind today ... so

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!
 
  04 April 2013
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



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 04:07 PM.


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