Rotating Spherical pieces around a common axis
-
Look for the FreeRotate plugin - that might have something useful ??
-
Thanks Tig,
will investigate it & get back.
...is that a Thylacine? ...helped make an animatronic one years ago for a Cascade Lager Commercial in Oz. -
@wozabee said:
Thanks Tig,
will investigate it & get back.
...is that a Thylacine? ...helped make an animatronic one years ago for a Cascade Lager Commercial in Oz.No it's just a mangy Tig[er]...
No Tasmanian Devils round here! -
-
Just in the interests of clarity, the Thylacine was a Tasmanian Tiger not a Tasmanian Devil.
and just a thought on the thread, Is there not some way to use the "Glue to" feature so the pieces could slide around on the surface of an invisible globe.
-
@box said:
Just in the interests of clarity, the Thylacine was a Tasmanian Tiger not a Tasmanian Devil.
and just a thought on the thread, Is there not some way to use the "Glue to" feature so the pieces could slide around on the surface of an invisible globe.
I knew it was 'Tasmanian' at least!The
glue_to
property only applies to one face at a time so you can't [easily] glue it to the face[t]s forming the surface of the sphere...However, you started me thinking...
...
You add a selection-observer to the model that spots for a type of component-instance with a particular attribute being selected.
That attributed component-instance, is to glue to any face[t] in a surface that is under it.
Whenever the observer fires it runs a raytest from the instance's insertion point [0,0,0] transformed to match the instance's transformation [its underside-center] ... and getting the ray's vector as the [0,0,-1] transformed to match the instance's transformation]... and if it finds a face [or edge with a face... then it uses that face[t] as the instances 'glue_to' face...
It could be further enhanced to link the instance and the face[t]s of a selected surface only so that the instance only sticks to those... -
As you want the globe to be invisible it could be difficult.
An instance could be give an anchor-point [the globe's center] and a radius.
Then whenever that type of attributed instance is selected the selection observer checks its location relative to the anchor and if the distance is not the radius it transforms the instance until it is, the vector for the translation transformation is easily got from the instances location and the anchor, adjusted so its length = radius...
Now we have an instance that is always 'radius' away from 'anchor'.
To ensure that it faces anchor properly as it is moved we also need to transform the instance about its z_axis so it matches the anchor>>>instance vector...
To ensure that the instance is correctly rotated around this anchor>>>instance vector we'd need something to establish that - probably something that uses the sphere's axis to ensure the instance doesn't get hopelessly spun around as we go...
So... it's not impossible then... just very awkward!! -
That's easy for you to say Tig
-
I get the gist of the conversation, and thought I would offer this simplistic suggestion, once all of the heavy stuff is perfected: Maybe utilize custom transparent materials/textures, but extremely faint?
Or, not relevant. -
here's a roughed out dynamic component..
this one just has random degress between -90,90 on the x and z axis..
it's messed up somewhere as one of the axis snaps back to the original position after the animation. -
WOW!
Thanks Jeff!
I think, using the line you're going down, the interact tool might be set for just a pre-set number of degrees "plate" rotation per click (say, 2 degrees or so). The trick would be - and I'm not yet familiar with dynamic components, or scripting yet to know if this is possible - holding down another key (say, one of the Left/Right, or Up/Down keys) to decide which on axis, and direction, the touched plate will move. Maybe holding another key (maybe the left "[" and right "]" keys) would cause the plate to rotate (2 degrees or so, again) in it's relative z axis to where it's sitting.I think this might streamline things enormously... if possible.
Hmmm...
I'm getting excited now!
all the possibilities! -
@unknownuser said:
here's a roughed out dynamic component..
[attachment=0:coswjkjp]<!-- ia0 -->globe_plates.skp<!-- ia0 -->[/attachment:coswjkjp]
this one just has random degress between -90,90 on the x and z axis..
it's messed up somewhere as one of the axis snaps back to the original position after the animation.I'm only now just beginning to look at dynamic components. Trying to adjust the parameters of your model:
ANIMATE("rotx", RANDBETWEEN(-90,90)); ANIMATE("rotz", RANDBETWEEN(-90,90))and have so far managed only to reduce the degrees that it ranomly moves the comonents by. Trying anything else with the expressions just has it doing a syntax error.
Would love to at least learn how to get your plates to just move 1 set number of degrees increment with each click, THEN find how to tell it which direction 9+ or -) to go, with perhaps a keystroke. Then maybe work out some combination to tell them either +x, -x, +y,-Y, per click...
Can't find any "easy-to-understand" info on how do do much with 'Rotx", Rotz" , etc, online though.
Anyone have suggestions?
-
Hi Tig,
have been looking at Kwok's "Key rotate" plug-in.
(and he's nicely tolerated my naivety in Ruby...)
It certainly looks like the most promising place to start.
Just hover my cursor over each component, then rotate each axis with the L-R/Up-down arrows etc.
Have so far managed to change it so that I get my desired 2 to 5 degrees component rotation per click.
The trick now is how to tell it to rotate each component around the assigned component axis instead of the general center of the component.I'm now slowly wading through everything on Ruby online, dusting off my poor brain's cobwebs (being a Film SFX designer for 30 years, I left the computer biz way back when we hand-made things with Z80's!).
looking at this bit at the moment:
pt = e.bounds.center
Assuming this is the critical bit, I've yet to find out how to change it to refer it to the component's assigned axis instead.
Any help would be mega-fantastic. But this is a great learning experience at any rate.Cheers again,
Woz
@tig said:
As you want the globe to be invisible it could be difficult.
An instance could be give an anchor-point [the globe's center] and a radius.
Then whenever that type of attributed instance is selected the selection observer checks its location relative to the anchor and if the distance is not the radius it transforms the instance until it is, the vector for the translation transformation is easily got from the instances location and the anchor, adjusted so its length = radius...
Now we have an instance that is always 'radius' away from 'anchor'.
To ensure that it faces anchor properly as it is moved we also need to transform the instance about its z_axis so it matches the anchor>>>instance vector...
To ensure that the instance is correctly rotated around this anchor>>>instance vector we'd need something to establish that - probably something that uses the sphere's axis to ensure the instance doesn't get hopelessly spun around as we go...
So... it's not impossible then... just very awkward!! -
...ooh, forgot to mention...
I've set the Component Axis for each part to the same arbitrary point in space. made a little "gyroscope" looking thingy at the center of the shells to line up all of their centers with.
Woz.
-
BTW, here's the link to Kwok's "Key rotate" plug-in:
http://forums.sketchucation.com/viewtopic.php?t=28086
Thanks for the pointers so far Kwok!
Woz
Advertisement