Difference between revisions of "Advanced Sculptie Exporter From Maya"
Dzonatas Sol (talk | contribs) m |
Dzonatas Sol (talk | contribs) m (→Overview) |
||
Line 6: | Line 6: | ||
[[Image:Qlab_maya.jpg|150px|left]] | [[Image:Qlab_maya.jpg|150px|left]] | ||
The idea here is to take an entire Maya scene, modeled with NURBS, and import it directly into Second Life complete with surface textures, baked lighting and all position/scale/rotation information. It builds upon the maya exporter we released with the initial sculptie launch. | |||
First-up in an example Maya scene: here we have a generous contribution from Bret St. Clair, his ant: [http://www.qarl.com/qLab/pile/ant/ant.ma ant.ma] | |||
<!-- | |||
: (can we store these files in the wiki itself, so that they too can be modified?) | : (can we store these files in the wiki itself, so that they too can be modified?) | ||
:: (script is too big for wiki page, otherwise this link would work [http://wiki.secondlife.com/w/index.php?action=raw&ctype=text/javascript&dontcountme=s&title=Advanced_Sculptie_Exporter_From_Maya/ant.ma ant.ma] - Dz) | :: (script is too big for wiki page, otherwise this link would work [http://wiki.secondlife.com/w/index.php?action=raw&ctype=text/javascript&dontcountme=s&title=Advanced_Sculptie_Exporter_From_Maya/ant.ma ant.ma] - Dz) | ||
--> | |||
== Scripts == | |||
With the maya scene open, now execute this mel script: [[LlSculpt_mel]] | |||
[[Image:Qlab sculpt.jpg|150px|left]] | [[Image:Qlab sculpt.jpg|150px|left]] | ||
The option to "Bake surface textures" will do just that - create one surface texture per prim, to be applied later. Unfortunately, our Maya ant has no interesting textures (he's white) but we do capture his lighting (and shadows). You also want to click "Generate Primscript," which creates a file describing the scene. | |||
The next bit is tedious. First, create a prim called "qDynaPrim". Into this, place all the textures above together with the following scripts, which you'll want to buld upload: | |||
* [http://www.qarl.com/qLab/pile/ant/prim prim] | * [http://www.qarl.com/qLab/pile/ant/prim prim] | ||
Line 27: | Line 30: | ||
* [http://www.qarl.com/qLab/pile/ant/shape shape] | * [http://www.qarl.com/qLab/pile/ant/shape shape] | ||
The scripts were generated with my qLab code - which may explain why they're a bit funny. | |||
Now create another prim and call it "ant maker" (this name isn't terribly important) and put the "qDynaPrim" into it (THIS name is important). Put the [http://www.qarl.com/qLab/pile/ant/primscript prim script] into it, also. | |||
This "primscript" will read your primscript file - rez copies of the "qDynaPrim" - and send them commands to control their shape/position/appearance. | |||
Now you need only to invoke the primscript command (which listens on channel 500). Create a notecard containing the primscript, get its UUID, and say: | |||
<pre>/500 primscript -script 32fad6a2-630e-aaf0-2659-817ea00b1052</pre> | <pre>/500 primscript -script 32fad6a2-630e-aaf0-2659-817ea00b1052</pre> | ||
course you'll want to replace that UUID with your own - especially if you want to make something OTHER than ants. | Of course, you'll want to replace that UUID with your own - especially if you want to make something OTHER than ants. | ||
Hope you enjoy. | |||
[[Image:Qlab_bad_ant.jpg]] | [[Image:Qlab_bad_ant.jpg]] |
Revision as of 18:46, 20 June 2007
(this is bare bones template for communal work - please, PLEASE, feel free to rewrite every word here. in fact, the first person to do a major clean-up becomes my new best buddy. an original copy of the tutorial (complete with graphics and witty banter) is available at qLab ALSO - if you feel so inclined, feel free to improve upon the codebase here.)
Overview
The idea here is to take an entire Maya scene, modeled with NURBS, and import it directly into Second Life complete with surface textures, baked lighting and all position/scale/rotation information. It builds upon the maya exporter we released with the initial sculptie launch.
First-up in an example Maya scene: here we have a generous contribution from Bret St. Clair, his ant: ant.ma
Scripts
With the maya scene open, now execute this mel script: LlSculpt_mel
The option to "Bake surface textures" will do just that - create one surface texture per prim, to be applied later. Unfortunately, our Maya ant has no interesting textures (he's white) but we do capture his lighting (and shadows). You also want to click "Generate Primscript," which creates a file describing the scene.
The next bit is tedious. First, create a prim called "qDynaPrim". Into this, place all the textures above together with the following scripts, which you'll want to buld upload:
The scripts were generated with my qLab code - which may explain why they're a bit funny.
Now create another prim and call it "ant maker" (this name isn't terribly important) and put the "qDynaPrim" into it (THIS name is important). Put the prim script into it, also.
This "primscript" will read your primscript file - rez copies of the "qDynaPrim" - and send them commands to control their shape/position/appearance.
Now you need only to invoke the primscript command (which listens on channel 500). Create a notecard containing the primscript, get its UUID, and say:
/500 primscript -script 32fad6a2-630e-aaf0-2659-817ea00b1052
Of course, you'll want to replace that UUID with your own - especially if you want to make something OTHER than ants.
Hope you enjoy.