Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Exotic Surface Problem with Maya Sculpties

Leben Schnabel
Registered User
Join date: 4 Jan 2007
Posts: 62
01-20-2008 07:12
Hi all,

after struggling with this for the best part of a week, I’m turning to you guys for help.

I’m working on an avatar with sculpty attachments. I finished a left leg consisting of 6 parts based on NURBS spheres: upper leg, lower leg, 4 toes.

For the right leg, I mirrored these NURBS objects in Maya using the standard “Scaling with negative value” method. Before exporting the NURBS objects to a sculptmap, I applied every caveat I could find in this forum:

- Ungrouped the objects
- Deleted history
- Froze Transformation
- Reset Transformation

I’m exporting with the latest Maya MEL script, using “Correct Orientation”. With the exception of the upper leg, the other sculpties have screwed up surfaces in game, although they look fine in the preview window.

The surface (see attached screenshot) looks weird. Not totally flipped, or hollow, as it can happen for a variety of reasons. Instead, depending on the view angle, parts of the textures seem to have sorting problems. The smaller toe sculpties have sorting problems as objects, too. The whole surface behaves in many aspects like an alpha surface, although it isn’t (including the usual misbehavior of alpha textures behind invisiprims). There seems to something wrong with the surfaces’ normals, but I don’t know what.

I experimented with these other measures to no avail:
- Made the normals visible in Maya to check their direction. They seem fine.
- Used the “Reverse Surface” function in Maya: no difference
- Mirrored and color inverted the sculptmaps in some combinations – no result

Any ideas on how to solve this would be much, much, appreciated.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-20-2008 10:49
From your description, it sounds like maybe your removal of history and transformations was incomplete. Try this:

1. Select all objects in the scene.

2. Edit -> Delete all by type -> History

3. Modify -> Freeze Transformations

4. Modify -> Freeze Transformations (Do this twice because Maya doesn't like it when you tell it to freeze transformations on objects that have been negatively duplicated. It gives you a purple warning at the bottom of the screen about this. I don't like having unadressed warnings on my screen, so I always do it twice. The warning doesn't happen the second time. I don't know for a fact that the operation doesn't complete properly the first time, but whether it does or it doesn't, it can't hurt to do it the second time. I don't like taking chances. When I get gray messages at the bottom of the screen instead of purple ones, I know everything's good.)

5. Modify -> Reset Transformations

6. Edit -> Delete all by type -> History (Be sure to delete history both before AND after freeezing and resettig transformations. You don't want any history in there on either end that could potentially interfere with the sculpty sampling process.)

7. Delete all previous sculpt maps and .primscript files from your output directory, and then re-export the whole thing.

I suspect the new sculpties will work now. If not, then I'm stumped for the moment.
_____________________
.

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.
Leben Schnabel
Registered User
Join date: 4 Jan 2007
Posts: 62
01-20-2008 12:23
Hi Chosen,

thanks for being ever vigilant, as always. :)

Especially Point #4 is interesting. I'll make sure to do that in the future.

As for my problem, I just seem to have found out what's happening, with the help of an in-world friend. The problem seems to originate in Turtle. When you mirror something in Maya and then render/bake it in Turtle, the Turtle renderer doesn't seems to like it. You can counteract this effect by enabling "Surface Back" in the bake options of the Turtle render configuration. But then something happens that causes the problem that I described:

Turtle adds a white alpha channel to the baked TGA texture (which it doesn't with non-mirrored objects)!

Which of course explains all the weird effects. D-oh!

I didn't suspect the texture at all, since I'm used to these kinds of problems when mesh normals are messed up somehow. And of course the TGA looked normal in my viewer at first glance.

Anyways, the moral of this particular tale of woe, kids: always check your TGA alpha channel ;)
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-20-2008 16:25
Very interesting, Leban. Thanks for posting this. I didn't know Turtle would behave that way. I've never experienced that problem myself, but I'll see if I can duplicate it. If I can't, then maybe it's a version difference. I'm using Turtle 4.0. What version are you using?
_____________________
.

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.
Leben Schnabel
Registered User
Join date: 4 Jan 2007
Posts: 62
01-21-2008 03:11
Chosen, I'm using Maya 8.5 SP 1 and Turtle 4.1

I tried to reproduce the problem with a fresh scene. It didn't occur there. In my actual work scene however Turtle generates an alpha channel even though the according checkbox is off.

I haven't found out yet in which modeling step the problem originates. It's for sure though, that the turtle renderer behaves differently than the "Maya software" one when it comes to mirrored NURBS objects in my scene. Where "Maya software" lights the mirrored object just fine, the Turtle renderer shows it strangely dark. When I delete the history, freeze and reset transformations of this mirrored object, the Turtle renderer lights the object correctly, too. However, when I then bake this texture, it's dark again and I have to set "Surface Back" in the baking options. This works fine, but the unwanted alpha channel is generated.

I'll post it if I should find out the actual reason for that behavior. It occurs in some other scenes of mine as well, so it doesn't seem to be overly exotic. For now it might be wise to check the alpha channel of Turtle baked TGAs before uploading.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-21-2008 08:08
Curiouser and curiouser. Yeah, if you can figure out what step is causing that, I'd be curious. Maybe it's something buggy in Turtle 4.1 that's not in 4.0.

It occurs to me that a way around the problem might be to bake to BMP instead of TGA. I don't think Turtle can do 32-bit BMP's, so in theory, this should prevent any accidental alphas. Might be worth a try.
_____________________
.

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.