Archive for the ‘Uncategorized’ Category

Spherical spirals

Tuesday, March 2nd, 2010

Messing around with MEL again, I wanted to create a spiral path that wrapped around a sphere. Now I know how to create a 2d spiral (See previous post), and mapping this into 3 dimensions shouldn’t be too hard with handy polar coordinates.

The difference between 2d and 3d polar coordinates is an additional angle, phi, which defines the inclination of our point.

Unlike the 2d spiral where the radius increased by a fixed amount every 2pi radians, the radius on a spherical spiral remains constant; every single point will be mapped to a location on the surface of a sphere with a radius of r.

Previously, theta, went from 0 to xpi radians, where x was twice the number of revolutions our spiral went (a single revolution being 2pi).

This value of theta, together with the radius, r, defines completely a single point in 2d space, on an x\y plane, with theta being the angle around the origin.

Mapping this all onto a 3d sphere introduces the use of phi, which determines the declination of the point in 3d space, along an arc running from +z to -z (Note that for 3d polar coordinates z is considered vertical). The value of phi runs from +pi/2 (+z) to -pi/2), -z.

Spiral sphere created in MEL

Spiral sphere created in MEL

This maps out to the spiral sphere shown above.

The code for this is not much more complex than for the 2d spiral: sphereSpiral.mel

Try altering the values for revolutions, resolutions and radius to get different effects.

Spiral galaxy creation

Monday, February 15th, 2010

Following the maxim work smart, not hard, I thought about the spiral galaxy Iw as trying to make in Maya. As this will be used solely as a backdrop to a larger image, there was no need to have this in 3d, so I looked up some photoshop tutorials on galaxy creation.

Spiral galaxy created in Photoshop

Spiral galaxy created in Photoshop

This was done following the neat tutorial at http://blog.hexagonstar.com/galaxy-tutorial/

Good work! Now to just work on playing with the settings to get a more stylised, super high res, galaxy of my own to mess around with.

Script timing

Sunday, January 24th, 2010

Currently playing around with writing greebling MEL scripts. Greebles are created through iterative extruding of polygon faces. I’ve found this can be ridiculously intensive for my computer (Q9550\4GB). Certainly turning off the undo queue helps, as does deleting the construction history for objects which are being greebled, but still I can easily create a script, which despite performing maybe 200 extrusion operations, takes 5 minutes to complete.

I figured the best way to produce optimised code was to begin timing different versions of the script. Took me a short while to track down, but there is a useful timerX function available within MEL, enabling you to time the execution of particular script areas.

Hopefully this should highlight any bottle necks in my greebling scripts!

Adventures in Maya

Saturday, June 27th, 2009

Welcome to my blog, Outside Context Problem!

This is a place for me to store stream of conciousness ramblings, notes, updates and thoughts as I work through a personal project of mine; creating a short animation based on the book Excession by Ian M Banks, using Autodesk’s Maya.