Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Maya & Nurb Cylinder??

Bill Schmo
Registered User
Join date: 16 Aug 2006
Posts: 53
02-25-2008 11:45
ok im a maya noob, sculpty noob, whatever and i got a problem.. i was trying to create a sculpty useing the tut for maya, the first time i did exactly as the tut said too and it worked great. problem was the object i wanted to create was more like a cylinder then a sphere so after going threw the tut i started over but used a cylinder.. going good, moving right along then BAM cant export.. fiddle with it a bit and found that if i delete the endcaps it will export.. yay!!!! no not realy.. in SL the cylinder has a seem all the way down one side that is wide open... grrr

is there any way to stitch it up?

can i only use spheres to start off?

am i missing something, lol?

thanx in advance,
Bill
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-25-2008 12:17
You should be able to export a NURBS cylinder just fine. What exactly happens when you try?

Also, what did you mean by "delete the end caps"? Can you be a little more descriptive? That could mean a number of things.
_____________________
.

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.
Bill Schmo
Registered User
Join date: 16 Aug 2006
Posts: 53
02-25-2008 12:57
From: Chosen Few
You should be able to export a NURBS cylinder just fine. What exactly happens when you try?

Also, what did you mean by "delete the end caps"? Can you be a little more descriptive? That could mean a number of things.



hehe.. a lil confusein :)
the end caps were the top and botom of the cylinder i believe it was the 1st -3rd vertices.. for some reason they werent part of the cylinder and llsculpt.mel script was giving me a error about textures (error: object list must contain a surface and texture) or somethgn to that effect (honestly im thinking that might have been caused by me doing something else wrong.. My main issue is the seem down the side of the cylinder.. deleteing the ends made the prim more like a torus which is fine ( looks better then just bowled like it was in maya anyway) when i get home from work tonight ill try uploadin SShots.. might help a lil

(addendum)
I just went back into maya quick and just created a cylinder 32 spans 32 sections.. selected the center verts and made it an hourglass shape, then tryed to export useing the llsculpt.mel script button that i added to my shelf and it gave me the "error: object list must contain a surface and texture" and it created another small version of my object inside the one i made ??? i dunno, lol

ok its all sculptys i export from maya thats doing it.. im toast.. heres a SS of the offenders next to some made with 3dsmax, see the cracks, lol
Image -->
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-25-2008 16:08
Let me rearrange your post a little, to try to address one point at at time, since it's a little all over the place.

From: Bill Schmo
ok its all sculptys i export from maya thats doing it.. im toast.. heres a SS of the offenders next to some made with 3dsmax, see the cracks, lol
Image -->

I'll take this one first, since it's the easiest to address.

From the screenshots, it looks like you just need to rotate your sculpt map 90 degrees. Make sure you have Correct Orientation turned on when you export from Maya.

I'd also suggest you set your world up axis to Y if it's not that way already. SL uses Z-up, so it's tempting to set Maya that way too, to make it "match". However, the sculpt exporter script is configured to work with Y-up, since that's the Maya default.


From: Bill Schmo
My main issue is the seem down the side of the cylinder.. deleteing the ends made the prim more like a torus which is fine ( looks better then just bowled like it was in maya anyway)

You shouldn't be deleting anything, but we'll get to that in minute. Let's talk about the sculpty shape first. If you're going to be using cylinders as your source objects, you should also be using cylindrical sculpties in SL, not the default spherical ones. You can change the sculpt type with a script.

llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "uuid", PRIM_SCULPT_TYPE_CYLINDER]);

See the sculpty wiki for more info on that.


From: Bill Schmo
the end caps were the top and botom of the cylinder i believe it was the 1st -3rd vertices.. for some reason they werent part of the cylinder and llsculpt.mel script was giving me a error about textures (error: object list must contain a surface and texture) or somethgn to that effect (honestly im thinking that might have been caused by me doing something else wrong..

I saw that error once, myself, but I don't remember what the cause was. It wasn't anything difficult to solve, though. I do remember that.

In any case, you shouldn't be deleting vertices from NURBS surfaces, ever. NURBS don't behave like polgons. You can't simply delete a component, and then expect the surface as a whole to remain functional. NURBS are not made of individual faces, fixed in absolute space, like polygons are. Every NURBS surface is one unit, a singular entity, mathematically interpolated from control points. Remove any component from the equation, and you throw the math all out of whack, to yield wildly unpredictable results. Don't do that.

Once you've created a NURBS surface, do not touch the delete key unless it's to delete the entire surface. Consider all components sacrosanct. You can move control vertices around any way you like, but you cannot remove them.


From: Bill Schmo
I just went back into maya quick and just created a cylinder 32 spans 32 sections..

That's way too many. Remember, we're not dealing with straight-faced polygons here. NURBS surfaces are curvy. You want the resulting sculpty, which will be polygonal, of course, to be able to have some prayer of emulating the surface shape accurately. With that in mind, it's never a good idea to go above 16 sections and 15 spans in your NURBS surface.


From: Bill Schmo
selected the center verts and made it an hourglass shape, then tryed to export useing the llsculpt.mel script button that i added to my shelf and it gave me the "error: object list must contain a surface and texture" and it created another small version of my object inside the one i made ??? i dunno, lol

I'm not sure what's causing that error. Sorry. As I said, I've seen it happen once, but I don't remember what I did that triggered it. It was only the one time in all the countless sculpties I've made, so there was no good reason for my brain to make too careful of a note of it, I guess.

In any case, I can't imagine why a secondary object would be created, let alone a smaller version. Either there's something wrong with your copy of Maya, or your copy of the llSculpt script is somehow broken, or you're doing something strange in your work flow.

Testing the script is relatively easy. Just cut and paste a new copy from the wiki, and run it in Maya. If that solves the problem, then delete the shelf button you've got, and replace it with the new one.

Reinstalling Maya would be pretty easy too, although it would be a bit of a pain, obviously.

That just leaves option 3, user error. Try this:

1. Create a NURBS sphere.

2. In the channel box, click on the makeNurbSphere node. Set the sections to 16, and the spans to 15.

3. Export the sphere as a sculpty.

Did it work? I'll bet it did.

Assuming the above worked, now do the same thing, with a cylinder instead of a sphere.

If that worked too, now try it with sphere and/or cylinder that you've deformed in some what. Move some of the CV's around to shape the surface however you want. Just don't delete any components, and don't tear the surface. Whatever you do, keep it one contiguous whole, with 16 sections and 15 spans.

And don't forget to delete history, freeze, reset transformations, and delete history again, before you export. Keep your objects completely clean.

If none of this works, then I'm stumped for now. You'll need to describe exactly what you're doing in a lot more detail, every step included, before I can say for certain that it's not user error somewhere along the line.
_____________________
.

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.
Bill Schmo
Registered User
Join date: 16 Aug 2006
Posts: 53
02-25-2008 23:59
From: Chosen Few

That just leaves option 3, user error. Try this:

1. Create a NURBS sphere.

2. In the channel box, click on the makeNurbSphere node. Set the sections to 16, and the spans to 15.

3. Export the sphere as a sculpty.

Did it work? I'll bet it did.


well it worked half way.. i reinstalled maya (after uninstalling and removing all folders(including the ones in My Doc's)) then got a new copy of the .mel script loaded it up.. created the sphere, and it worked like a charm.. Tried creating a cylinder.. following all the same steps as the sphere, went to export and bam same as before "Error: object list must contain a surface and texture" im stumped as well.. i didnt edit the cylinder or the sphere and the sphere works and the cylinder doesnt.. im gonna go through it again and take a SS of the damn thing when it creates another mini cylinder maybe it will jog somehting in someones mind.. im at a complete loss here
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-26-2008 04:58
That's so strange, Bill. I can imagine your frustration.

Just so we're all on the same page, what exactly is your process for creating the cylinder? There are many different ways a NURBS surface in the shape of a cylinder could be made.
_____________________
.

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.
Bill Schmo
Registered User
Join date: 16 Aug 2006
Posts: 53
Success!!! i think, lol..
02-26-2008 11:15
or its one hell of a workaround for me anyway.. (If this was my problem all along i feel very stupid) Take a look at the SS of maya "create Nurb Cylinder tool" the one with the endcaps is where i was having issues (correct me if im wrond, please!) maya creates the nurb cylinder, then also creates the 2 endcaps seperate from the actual cylinder.. thats why the export script choked on my first atempts, then when i deleted the end caps from the model it exported fine (other then the orentation i didnt have checked)

so if im right, and the createNurb settings window was my problem could you tell me if what i have in the SS is right, hell the settings for all the NurbShapes would be great then when someone searches the forums for "Error: Object list must contain a surface and texture" they will find what might be the problem XD

i still havent figured out what the settigs should be for a cube either... i was thinking a ss of each of them would be helpful but alot of work to produce so maybe later
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-26-2008 13:54
Oh, that's what you meant by "end caps". I guess I should have realized that since that's what they're called, hehehe. Sorry about that. Somehow I thought you were deleting vertices from the side surface. Not sure where the confusion was there. I guess a screenshot of the settings box would have solved that right off the bat. I should have thought to ask.

Anyway, you shouldn't feel stupid. I didn't think of it either, and obviously neither did anyone reading since no one chimed in.

And don't think of it as a work-around. It's exactly the right thing to do. Settings boxes are there to be adjusted. You'll be screwing with them all the time on every tool you use. And you can always return them default, by hitting Reset, which is nice.

I do understand now where the error was coming from, and why it says what it says, if you're interested. Create a cylinder as you were doing it before, with the end caps, and then take a look at the hypergraph (Window -> Hypergraph). Notice the cylinder is actually three separate surfaces, in a group. The reason it told you the object needed a surface and a texture is because you had the group selected, not any of the individual surfaces. The group node is just a node; it has no physical shape or anything like that, so of course it has no surface or texture to it. Trying to export a sculpt map from a group node would be like trying to print a folder instead of a file in MS Word or something. It can't be done.

Pretty obvious in retrospect, but not so at the time, obviously.

Since we're on the subject of groups, for future reference, never group your sculpties. The exporter doesn't like that. Everything should be ungrouped.

To answer your question about NURBS cubes, the answer is don't use them. There's no such thing as "A cube" with NURBS. All it is is six planes in a group. It's useless for sculpties, unless your goal happens to be to make six separate planes in SL too.

If you want to make one solid cube, do it by deforming a sphere into a cube shape. If you want to make a cylinder shape that has a top and bottom to it, that also should be done by deforming a sphere. Here's a picture, showing stages of evolution from a sphere, to pill-like shape, to a cylinder, to a rounded cube, to a cube.



Note that each object is topologically just a sphere. But by moving and scaling rows of vertices, you can deform that sphere into all kinds of shapes.

The sphere becomes the pill when its three latitudinal isoparms above and below the equator are scaled to be the same size as the equator. The more isoparms you make that size, the more cylindrical the sphere becomes.

The cylinder in the middle has had all but two of its latitudinal isoparms scaled the same size. The very top and bottom ones are just a hair smaller to give some definition to the top and bottom corners. and they've been snapped into vertical alignment with the poles, to ensure that the top and bottom of the cylinder are flat.

From there, the rounded cube is made simply by grabbing vertical columns of vertices, and snapping them to the grid. The sharper cube on the right is made by moving side columns closer to the corners. Each corner is comprised of three columns, and in each instance, the closer the columns are to each other, the sharper the corner will be.

As you're probably starting to see, for 99% of sculpties, spheres are all you need. It's not hard to imagine how easy it would be to turn the cube into a pyramid, the pill into an hourglass, the cylinder into a serpentine pipe, etc. For most whatever you need, the sphere is your friend.

Every once in a while an actual cylinder, torus, or plane might be more desirable, but those circumstances are quite rare. That's why those shapes aren't even officially supported yet. It will be nice when they are, but it's not a necessity, so LL has bigger fish to fry right now. Spheres are by far the most versatile form there is.





EDIT: I just remembered what I had done to trigger that error myself. I accidentally had had a 3D texture placement node selected when I hit the Export button. Just like a group node, a placement node has no surface, so it's the same kind of mistake. If only I'd remembered that before, we could have saved some time. I would have told you to make sure you don't have any surfaceless (if that's a word) nodes selected, which would have led us straight to the Hypergraph, and you would have seen the group node. You'd think I would have realized that by the wording of the error alone, but evidently I'm not quite that smart. :)
_____________________
.

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.
Bill Schmo
Registered User
Join date: 16 Aug 2006
Posts: 53
02-26-2008 22:25
no dont feel bad b/c you couldnt think of the solution off the top of your head.. if i had a penny for every solution i came up with after the fact or the times i have said "oh yeahhh.... durrr" i could pay ppl to make me sculptys :-P

you have been extremely helpful.. if it wasnt for you and other in here like ya i'd of given up long ago.. i just hope that this post will find its way to the eyes of the next noober that falls into maya hell (it was almost like what i think a hazing would feel like, lol)

thanx again Chosen, im off to make a mess of the beta grid with sculpt texture testing, lol