Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Complete noob needs help please

Shensisque Karu
Registered User
Join date: 7 Jul 2008
Posts: 3
05-07-2009 04:18
ok so i've decided my hands at sculpting, I'm using Autodesk Maya and have the script to export the objects I make.

However whenever i try to import an object into Second Life it is always completely distorted in the 3d image and even if I do import it, it only comes as a multi-coloured texture.
How do I make the object in Maya and import the actual object into SL without it becoming a texture rather than the actual sculpture?
Briana Dawson
Attach to Mouth
Join date: 23 Sep 2003
Posts: 5,855
05-07-2009 04:26
Take that rainbow texture.

Create a prim.

Go into the edit Objects tab, and use the pull down "building block type" and select SCULPTED.

That prim will change to a undefined sculpty.

Place your rainbow texture in the texture window of the Object Tab in the edit window that appeared for your sculpted object and it will take shape when it loads.
_____________________
WooT
------------------------------

http://www.secondcitizen.net/Forum/
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
05-07-2009 04:32
From: Shensisque Karu
ok so i've decided my hands at sculpting, I'm using Autodesk Maya and have the script to export the objects I make.

However whenever i try to import an object into Second Life it is always completely distorted in the 3d image and even if I do import it, it only comes as a multi-coloured texture.
How do I make the object in Maya and import the actual object into SL without it becoming a texture rather than the actual sculpture?

It _has_ to become a texture. Sculpted primitive shapes are determined by the Red, Green, and Blue values of each pixel of the 'sculpt map', that rainbow texture you end up with

Now, to make that into a 3d object, create a prim in Second Life (Right click, create, click, in a build-enabled area.), If there's a 'More' button in the window that pops up, click that, if there's 'Less' instead, then go on down and click the Object tab. Change the Building Block Type (Right top of that tab, it's a drop down) to Sculpted.

Now you'll notice a space came up filled with a rainbow texture. By default, this is an apple sculpt. Just drag your sculpt map into that spot, or click on it and select if fr/om your inventory.

Note that to make sculpts, you have to be careful all through the creation to not use any functions that change the topology. This means you can only manipulate the shape, not add or remove vertices. Otherwise you risk completely losing the ability to even bake a sculpt map, let alone get one that looks how you want.

Second Life sculpts are also limited in detail, the highest res square sculpt map you should use is 64x64 pixels. 32x32 is generally enough, but I believe that if you really know what you're doing, a 64x64 can offer a tiny bit more detail.

As for Maya specifics, I haven't used it in a long while, but others here have, so they'll help too, I'm sure.
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Drongle McMahon
Older than he looks
Join date: 22 Jun 2007
Posts: 494
05-07-2009 09:20
From: Keira Wells
Second Life sculpts are also limited in detail, the highest res square sculpt map you should use is 64x64 pixels. 32x32 is generally enough, but I believe that if you really know what you're doing, a 64x64 can offer a tiny bit more detail.
Better stick to 64x64, the officially supported size, as the meaning of 32x32 will change - http://jira.secondlife.com/browse/VWR-9384. See figure 4. The 32x32 will mean a 16x16 quad sculpt. Due to appear in 1.23 viewer according to last Linden comment there.
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
05-07-2009 09:39
From: Drongle McMahon
Better stick to 64x64, the officially supported size, as the meaning of 32x32 will change - http://jira.secondlife.com/browse/VWR-9384. See figure 4. The 32x32 will mean a 16x16 quad sculpt. Due to appear in 1.23 viewer according to last Linden comment there.
Update: I checked the SVN source for release 1.23, and the mod is there. LL hasn't released a binary RC yet, but they would have to make a conscious decision to pull the change for it not to be in 1.23.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
05-07-2009 09:44
From: Drongle McMahon
Better stick to 64x64, the officially supported size, as the meaning of 32x32 will change - http://jira.secondlife.com/browse/VWR-9384. See figure 4. The 32x32 will mean a 16x16 quad sculpt. Due to appear in 1.23 viewer according to last Linden comment there.
The reason, why we use a 64*64 image to transport a 32*32 faces sculptie is:

- assume you had a sculptie plane with 32*32 faces.
- Now you need 33 rows of 33 columns to get 32*32 faces.
- And since the sculptmap transports vertices not faces you need an image of 33*33 pixels to get your sculptie uploaded without loss... in theory

in practice there seems to be something with the way how openGL handles images (or the sl viewer, i dont remember). But fact is that images with pixel width/heights of power of 2 are handeld best. For the reason the next power of 2 images size, which can transport 33*33 pixels lossless is 64*64.

The only exception is with torus, which will need only 32*32 pixels due to stitching the top/bottom rows and the left/right columns. But i believe that even torus needs 64*64 images to get around interpolation effects see below...

For that reason you should use that image size (2times the number of faces in x * 2 times the number of faces in y). If you use smaller sizes, your vertex positions get interpolated and thus you loose precision. If you use bigger sizes, that doesnt matter, the image will be scaled down to 64*64 anyeays (as i was told, i dont know for sure that this is true)

And as Drongle said,there is an (upcoming) relation between oblongs and image size, which forces you to use the above formula (64*64 pixels for standard sculpties)...
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
05-07-2009 11:28
Once again, here are detailed basic instructions for creating a sculpty in Maya, and bringing it into SL.

From: Chosen Few
From: Chosen Few
NOTE: Steps 1-4 here are the setup steps for Maya itself. You only have to do them the first time. After that, the actual sculpty export begins on Step 5. So do 1-4 now, and then every time you export a sculpty hereafter, you can skip 1-4 and star directly on Step 5. Just don't skip them the first time, or it won't work.

1. Find the sculpty exporter script at http://wiki.secondlife.com/w/index.php?action=raw&ctype=text/javascript&dontcountme=s&title=LlSculpt_mel/sculpt.mel. Copy the text of the script from your browser window to a text file. Save the file as llSculpt.mel.

2. In Maya, open the Script Editor. You'll find the button for it all the way at the lower right hand corner of the screen. It looks like 3 stacked rectangles, a black one on top of two gray ones. Click the button, and the script editor will open.

3. In the Script Editor window, go File -> Open, navigate to wherever you saved llSculpt.mel, and open it. You can now either run the script directly from the editor, or save it as a button on the shelf, and run it from there. I'd suggest the latter. Step 4 explains how.

4. On the main menu bar (not the script editor's menu bar, the one at the top of the main Maya window), go Window -> Settings/Preferences -> Shelf Editor. The Shelf Editor dialog will open. Click on the Shelves tab at the top of the Shelf Editor dialog, and then click the New Shelf button near the bottom. In the Name field below, name your new shelf Second Life and press Enter. Then click on Save All Shelves, and close the Shelf Editor.

You should now see a new shelf tab near the top of your Main Maya window called Second Life. Click on that tab now. You'll see it has no buttons yet. We're about to add one.

Go back to the Script Editor. In the Mel pane, se|ect all the text from llSculpt.mel by pressing ctrl-A. At the top of the script editor, go File -> Save Script To Shelf. In the dialog that pops up, name your new shelf item llSculpt and click OK. You'll now see that a button as appeared under your Second Life shelf tab, called llSculpt.

Now, whenever you want to run the sculpty exporter script, you can just click that button. You'll never have to worry about performing steps 1-4 (unless a new version of the script becomes available, and you want to upgrade).

5. In your Maya scene, se|ect the sculpty object you want to export, and perform the following steps:

Edit -> Delete by type -> History
Modify -> Freeze Transformations
Modify -> Reset transformations
Edit -> Delete by type -> History

If you don't perform these steps, your sculpty will come out messed up. Its imperative that none of your objects for export have any transformations or history records on them. Maya must believe that the state they're in now is the state they've always been in.

6. Click the llSculpt button to open the Export Sculpt Texture dialog. Click the Browse button on the dialog to choose where you want to save your sculpt map(s), and to assign a name for the file(s). Set the X & Y resolution both to 64. Check the boxes for Maximize Scale and Correct Orientation. When you're ready, hit Export. Your sculpt map(s) will now be in whatever directory you specified.

7. In SL, upload the sculpt map(s) you just exported from Maya. Make sure you have it set to upload small textures losslessly. Otherwise compression artifacting will make your sculpt prims will come out lumpy.

8. Create a cube, and then on the Object Tab, change the prim type from Cube to Sculpt. Notice most of the numeric parameter fields on the object tab disappear to be replaced by a texture picker. Use that picker to assign your sculpt map to the prim.

If you did everything right, your object in SL should now look like your object in SL.


A few things to note:

1. If the sculpty doesn't look right in SL, either you didn't follow the above instructions properly, or you made the source object wrong in Maya. Remember, for sculpties, the best way to work is to make every object by deforming a NURBS sphere, torus, cylinder, or plane. Arbitrary objects won't work. Everything must have perfect topology, meaning each object must be a singular contiguous surface, unfoldable into a perfect rectangle. You can deform the shape to become anything you want, but don't tear the surface, and if you're using a sphere, don't open the poles. For best results, the surface should have 16 sectons and 16 spans.

2. The default topology for sculpties is spherical, but there are some other options, accessible in SL via the pulldown menu, just below the sculpt map field in the editor. These are torus, cylinder, and plane. If you plan to use them, your source object must match. In other words, a toroidal sculpy should start out as a torus in Maya. A cylindrical sculpty should start as a cylinder in Maya. A planar sculpty should start as a plane in Maya. Again, you can deform the shape as much as you want to become anything at all, but don't make any changes to stitching or opening/closing. The topology must remain intact. In all cases, 16 sections and 16 spans is the best resolution to work with.

3. As you start making more and more complex items out of sculpties, it won't be uncommon for one project to contain many different sculpt prims. It quickly becomes time consuming to upload all the maps, and apply them one at a time to each prim, and then try to place all the prims by hand so everything lines up. There is a more advanced sculpty exporter, which will generate baked textures and a script to instruct a program how to assemble the objects in SL.

You can find the advanced script and the assembly program at http://wiki.secondlife.com/wiki/Importprimscript

Be aware that the script makes use of the Maya software renderer to bake the textures, which is just about the worst renderer there is. I recommend allowing it to do its thing, just to make rudimentary placeholder textures, and then replace those textures later with ones baked by a better renderer. The best renderer on the market for this type of work is Turtle. If you can't afford Turtle, Mental Ray is semi-OK. It will give you better results than the Maya software renderer, anyway.

4. Keep in mind that because the maps are generated by translating XYZ positional data to RGB color data, the precision is somewhat limited. The maps are using 8 bits per channel per pixel, which means there are only 256 possible values between zero and whatever maximum you're using, for each vertex. The larger the distance between vertices, the greater the margin for error. A sculpty in-world will almost never be an exact mathematical duplicate of the model it was sourced from. It will be a very close approximation, close enough that no one will likely notice the difference, but it won't be totally identical.


If there's anything in there you don't understand, or if you need further assistance, ask away. :)
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Shensisque Karu
Registered User
Join date: 7 Jul 2008
Posts: 3
05-07-2009 12:00
Thanks alot for the help guys, I really appreciate it :)