Introduction to Maya - Modeling Fundamentals Vol 2

This course will look in the fundamentals of modeling in Maya with an emphasis on creating good topology. It's aimed at people that have some modeling experience in Maya but are having trouble with
complex objects.

#
**1**
* *
17-01-2008
, 08:56 AM

Anyways, I was wondering how I would make an object orbit another object, and how I would get it to maintain a constant distance if the object being orbited was moving.

Any ideas would be much appreciated!!

Chris

#
**2**
* *
17-01-2008
, 08:59 AM

#
**3**
* *
17-01-2008
, 10:21 AM

If you want to physically rotate it then a bit of maths is needed for figuring the location in space and moving it accordingly.

I was playing about with papervision3D early last year and wrote a little flash script to rotate a moon around a planet in 3D space. If I can find it I'll post it up as an example that could be used as a 'principle of doing it' sample that could be modified for maya.

As a final thought just have a good search for maya related versions as it might be fairly simple to get the effect working with dynamics.

Good luck

Simon

Jan/Feb Challenge 2007

May/Jun Challenge 2006

Mar/Apr Challenge 2006

Jan/Feb Challenge 2006

Nov/Dec Challenge 2005

Sep/Oct Challenge 2005

Jul/Aug Challenge 2005

www.flash-fx.net

#
**4**
* *
17-01-2008
, 02:44 PM

Code:

class org.papervision3d.samples.orbit.orbit_test extends MovieClip { // _______________________________________________________________________ // vars3D var container :MovieClip; var scene :Scene3D; var camera :FreeCamera3D; var sphere :Ase; // _______________________________________________________________________ // Main function orbit_test() { init3D(); this.onEnterFrame = loop3D; } // _______________________________________________________________________ // Init3D function init3D() { // Create container movieclip and center it container = this.createEmptyMovieClip( "container", this.getNextHighestDepth() ); container._x = 320; container._y = 240; // Create scene scene = new Scene3D( container ); // Create camera camera = new FreeCamera3D(); // Create material var texture :BitmapData = BitmapData.loadBitmap( "Bitmap" ); var material :BitmapMaterial = new BitmapMaterial( texture ); material.oneSide = true; // Make it single sided // Load sphere sphere = new Ase( material, "world.ase", .1 ); sphere.rotationX = 0; sphere2 = new Ase( material, "world.ase", .025 ); sphere2.rotationX = 0; sphere2.rotationZ = 45; // set the moon to be 125 away from the planet sphere2.x = sphere.x + 125; sphere2.y = sphere.y + 125; sphere2.radians = 0.785 sphere2.degrees = 45; sphere3 = new Ase( material, "world.ase", .025 ); sphere3.x = sphere.x + 125; sphere3.y = sphere.y + 125; sphere3.z = sphere.y + 125; sphere3.radiansX = -2; sphere3.radiansY = 0; sphere3.radiansZ = 0; sphere4 = new Ase( material, "world.ase", .025 ); sphere4.x = sphere.x + 0; sphere4.y = sphere.y + 176; sphere4.radians = 0 sphere4.degrees = 0; // Include in scene scene.push( sphere ); //scene.push( sphere2 ); scene.push( sphere3 ); //scene.push( sphere4 ); } // _______________________________________________________________________ // Loop function loop3D() { // calculate the distance between the two (based on the origin being the planet at 0,0,0 dist = Math.sqrt((sphere2.x * sphere2.x) + (sphere2.y * sphere2.y)); _root.distance.text = dist; // calculate distance between two (z axis ball) distz = Math.sqrt((sphere3.x * sphere3.x) + (sphere3.y * sphere3.y)); angle = sphere2.radians; sx_pos = Math.sin(angle) * dist; sy_pos = Math.cos(angle) * dist; sphere2.x = sx_pos; sphere2.y = sy_pos; sphere2.radians += 0.01; sphere2.radians += 0.01; sphere2.radians += 0.01; // combined anglex = sphere3.radiansX; angley = sphere3.radiansY; anglez = sphere3.radiansZ; sx_pos = Math.sin(anglex) * dist; sy_pos = Math.cos(anglex) * dist; cx_pos = Math.sin(anglez) * dist cz_pos = Math.cos(anglez) * dist vy_pos = Math.sin(angley) * dist vz_pos = Math.cos(angley) * dist sphere3.x = sx_pos; sphere3.z = cz_pos; sphere3.y = vy_pos; sphere3.radiansX -= 0.03; sphere3.radiansY += 0.03; sphere3.radiansZ += 0.03; sphere3.rotationY = sphere3.rotationY + 0.2; //sphere.rotationX = sphere.rotationX; //container._ymouse /3; sphere.rotationY = sphere.rotationY + 0.4; // Render scene.renderCamera( camera ); } function toRadians(degree:Number):Number { return degree / 180 * Math.PI; } function toDegrees(radian:Number):Number { return radian * 180 /Math.PI; } }

https://www.flash-fx.net/3D/masters/i...on3D/orbit.swf

Simon

Jan/Feb Challenge 2007

May/Jun Challenge 2006

Mar/Apr Challenge 2006

Jan/Feb Challenge 2006

Nov/Dec Challenge 2005

Sep/Oct Challenge 2005

Jul/Aug Challenge 2005

www.flash-fx.net

Expression on Bend Deformer Problem
by Calvin in forum Programming replies 0 on 22-08-2016
:help: Problem with varying refractive index using Expression Editor
by EonStrife in forum Lighting & Rendering replies 4 on 15-12-2011
rotation expression troubles
by bendingiscool in forum Programming replies 1 on 26-10-2007
important question with expression editor
by Jay_R_Locke in forum Maya Basics & Newbie Lounge replies 1 on 28-11-2003
Need help troubleshooting expression.
by NitroLiq in forum Programming replies 4 on 08-01-2003

How computer animation was used 30 years ago to make a Roger Rabbit short
On 2022-07-18 14:30:13

Sneak peek at Houdini 19.5
On 2022-07-18 14:17:59

VFX Breakdown The Man Who Fell To Earth
On 2022-07-15 13:14:36

Resident Evil - Teaser Trailer
On 2022-05-13 13:52:25

New cloud modeling nodes for Bifrost
On 2022-05-02 20:24:13

MPC Showreel 2022
On 2022-04-13 16:02:13