Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Maya 2009 Question (Related to Texturing)

Little Ming
The Invisible Man
Join date: 31 Mar 2005
Posts: 84
07-30-2009 13:09
I'm working on a project that involves creating multiple surfaces and linking them together. What I am trying to accomplish is a way to use the Edit NURBS > Attach Surfaces command and retain the textures applied to the individual surfaces. Example being...

I have 3 boxes. One is red, one is blue, one is green. I have them stacked on top of each other, lined up in a way they will attach without any real change to the surface. I first select the red box, then the blue one and click attach since it won't let me attach more than 2 NURBS at once. This unfortunately results in the blue object becoming red and sharing the texture of the original object. The desired result is to keep the red object red, and the blue one blue, and the green one green while making them all one object by attaching them.

Is this possible?
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
07-30-2009 23:00
Why do you need to attach them in the first place? What's the goal here, exactly?

Just so you know, there's no such thing as attaching "without any real change to the surface". If you combine two surfaces into one, you're changing them both.


In any case, you can't apply two materials to a single NURBS surface. What you CAN do is create one material that looks like two (or more). The simplest way to do precisely what you asked about is to create a simple ramp, with three colors in it, and apply it to the single surface. Easy.

In addition to just colors, by the way, you can also ramp any other attributes you want. So, for example, if you want the red section to be more reflective than the blue section, simply apply a ramp to the reflectivity channel of the material. Typical alpha mapping methodology applies, to govern the values. White is maximum, black is minimum, shades of gray are in between.

You can even ramp image files, to give different areas of the surface entirely different graphics. Tie the output of an image file to the color input of a section of a ramp, and the image will appear just on the corresponding section of the surface.

The possibilities are endless. Ramps are EXTREMELY powerful, and deceptively so, considering what inherently simple things they are. Learn to use them, and use them well.

Of course another option would be just to render the three boxes as separate textures, and then combine the images in Photoshop afterward.

There are also literally hundreds of other ways to proceed, depending on what exactly you're trying to accomplish. I can't really make a recommendation for the best way to go without knowing the end game.
_____________________
.

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.
Dante Breck
Spellchek Roxs
Join date: 29 Oct 2006
Posts: 113
07-31-2009 08:14
Chosen do you know the correct process to apply multiple projections to a single surface? For example lets say I want a brick wall with cracks in it, grafitti overlayed, and perhaps some weeds etc. I know how to project the first texture but trying to figure out how to project multiples is going to cost me all of my hair and I've been unable to find any examples.

Good tip on the images in a ramp, I wasn't aware of that capbility but it made sense as soon as you mentioned it.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
07-31-2009 12:57
Again, there are a number of ways to proceed. The most common would be to use a layered shader. Here's a fairly decent overview of how layered shaders work, if you've never used one before: http://caad.arch.ethz.ch/info/maya/manual/UserGuide/Rendering/RenderingTask/Look_Surfaces.fm4.html The concept is the same as using a layers in Photoshop. You can put any material or texture you want on each layer, and control how they blend.

Another option would be to use spotlights as projections. If you tie an image file to a spotlight's color channel, you get a slide projector. (This works with movie files, too, by the way, if you want a movie projector for an animated scene.) Shining one light on top of another will blend the two images, of course, rather than overlay them, but depending on the effect you're going for, that might be OK.

And of course, you can also simply layer your images beforehand in Photoshop, and project the resulting single texture in Maya, instead of projecting the individual images as separate textures.
_____________________
.

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.
Little Ming
The Invisible Man
Join date: 31 Mar 2005
Posts: 84
08-01-2009 02:22
The real objective is simple. In order to create low prim designs I need to keep my objects as connected as possible. One of the goals I am trying to achieve is creating the illusion of two seperate objects by linking them with a transparent one, thus when it is exported and textured, my one object that looks like it has a line between the two, suddenly looks like two objects.

I'm not sure if there is an easier way to accomplish the same effect without using transparency in the texture, but I do know when linking NURBS together they must be linked in a continuous line path. Unfortunately that means that when I try to link objects like this to make them one, I cannot simply apply transparency to the object linking them.

If there is no easy way to accomplish this then that's that... But if there is it'd be appreciated :)

For example, say I wanted to make a 1 prim table with 4 legs. The table, and all 4 legs need to be connected. Unfortunately when connecting the legs to the table They eventually connect in a fashion like |\| the line in the middle representing the connection. Idealy what I have tried in the past is linking them so they link like |_|. While my true desire is not to create something as simple as a table, it does make a great place to start to learn the technique.

Either way, my goal is to make that connecting line transparent.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
08-01-2009 10:20
Little, it sounds like you're expecting to export your geometry from Maya to SL. How do you hope to do that? If you're talking sculpties, you're far better off deforming existing primitives (spheres, toruses, cylinders, planes) than combining surfaces together. It's far too easy to end up with geometry that won't work when you go around combining things. And if you're talking about exporting actual prims, then you shouldn't even be using NURBS in the first place. Or am I misunderstanding you?

If all you're talking about is exporting textures, not geometry, then I'm even more confused. I just don't get why you're proceeding in the manner you are.

Let me try to address some of your points, and offer some alternative suggestions.

From: Little Ming
In order to create low prim designs I need to keep my objects as connected as possible.

Why?

An object made of a thousand little components in Maya could easily be just a single prim in SL, or vice versa. For example, in Maya, if you really wanted to, you could make a brick wall by stacking hundreds of actual brick-shaped surfaces, with a mortar-shaped surface to appear to hold it all together, and then render the whole thing to a single texture, to be applied to a single cube wall in SL. Or, to go the other way around, you can easily create just a single texture in Maya or Photoshop that will get split across a bunch of different prims in SL.

There's no need for a 1:1 match.

But again, perhaps there's something I'm missing in your description of what you're trying to do. I'm guessing that there is.


From: Little Ming
One of the goals I am trying to achieve is creating the illusion of two seperate objects by linking them with a transparent one, thus when it is exported and textured, my one object that looks like it has a line between the two, suddenly looks like two objects.


If that's all you need to do, there's an infinitely simpler way to proceed. Just give the texture an alpha channel that is black in the part you want to hide, and white everywhere else. You can do that either with a ramp in Maya, or by just painting it in Photoshop.

There are drawbacks to this approach, though. One is alpha sorting. Put the object next to a window, and it's going to interfere with it. It might even interfere with itself, depending on how the various parts of the geometry are set up. Another issue is there might be visible holes, again, depending on how the surface is shaped.

This is why most people who want to make a sculptie appear to have multiple parts use the "loaf pinch" technique. Take two parallel rows of vertices in the middle of a surface, and collapse them to a pair of single points. You'll have what appears to be two surfaces connected by a single line. In SL, that line won't be rendered, so the two surfaces will look like separate objects.

Most people who use this technique are using polygonal modeling, but it works with NURBS, too. You just need to triple-up the isoparms in areas where you want sharp corners.

If you'd rather use polygons, so you don't have to triple up those corners, you can, with Logan Baur's technique: /8/c9/304304/1.html#post2345381 . If you do this, just be sure either to double up the UV's the same way you doubled up the vertices, or else merge the overlapping vertices, before you start texturing (but AFTER you've exporterted your sculpt map), or else you'll end up with a bunch of black in the texture where the vertices overlap.

Another way to proceed, depending on if the object you're trying to make is capable, is simply to hide part of the geometry inside another part. For example, with your table, you could put the part that connects the legs together inside the tabletop. That's not how I'd make a table, myself, but if you're determined to do it as a single sculpty, that's one way to go. There'd be no transparency necessary, at least.


From: Little Ming
If there is no easy way to accomplish this then that's that... But if there is it'd be appreciated

For example, say I wanted to make a 1 prim table with 4 legs. The table, and all 4 legs need to be connected. Unfortunately when connecting the legs to the table They eventually connect in a fashion like |\| the line in the middle representing the connection. Idealy what I have tried in the past is linking them so they link like |_|. While my true desire is not to create something as simple as a table, it does make a great place to start to learn the technique.


If I were going to make a 1-prim table, I'd do it like this:



Sorry, I missed a few steps in my screenshots, but I think there's enough there for you to get the idea. I forgot to take pics as I was going, and then I couldn't undo far enough to get the first two. I didn't feel like redoing it, so here it is, in written form:

1. Start with a 32x32 NURBS plane.

2. Move the following columns of vertices very near each other, if not right on top of each other. These will become the corners of the legs. Columns 2, 3, & 4 will form the first corner, columns 5, 6, & 7 will form the second, and columns 8, 9, & 10 will form the third. Do the same with the opposite end of the plane, starting with columns 31, 30, & 29, then columns 28, 27, & 26, and finally columns 25, 24, & 23. (Note, if you turn on mirroring in the Move tool settings, you can do both ends at once, for perfect symmetry.)

3. Grab column 1, brung it downward, and then move it directly under your 2,3,4 corner. Do the same with column 32, to bring it under your 32,30,29 corner. (Again, if you have mirroring turned on, both ends will move at the same time, saving you time, and creating perfect symmetry.) Now grab column 1, corner 2,3,4, and corner 5,6,7, and rotate the whole bunch, to form the basis of the first leg. Column 1 should be just about touching corner 8,9,10 when you're done.

4. Here's where the screenshots begin. Move rows 2, 3, & 4 very near, or directly on top of, each other. Do the same with rows 31, 30, & 29. Then move rows 1 and 32, to form the height of the table.

5. Form a few more corners with columns 11,12,13, and 22,21,20. Move these new corners very close to their neighbors, at the edges of the legs. This will allow you to bring the middle part, between the legs, upward, with minimal geometric distortion.

6. Bring that middle part up at both ends, and you're done.

Geez, that was a lot of writing. I should have just redone the Maya work, to get those missing screenshots. The table took me 2 minutes to make; the writing was more like 15. Oh well. :)

I'm sure if you were to reexamine you're approach to whatever it is you're really trying to make, you'll find that all that transparency is totally unnecessary. There's virtually nothing that can't be made simply by deforming primitives, just like how this table was 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.
Little Ming
The Invisible Man
Join date: 31 Mar 2005
Posts: 84
08-04-2009 00:50
The loaf pinch technique sounds like it might actually work better for what I'm wanting to do. One problem I've encountered with working with primitives over NURBs though is the end result is -vastly- different than what I created in Maya. I do not know how to efficiently use primitives to get the desired results for exporting to SL.

I love the tools for working with Polys and can achieve far better looking designs with them, I just have never had any luck getting those designs to look as accurate as NURBs do in SL...

If you have a secret to exporting with polys to get accurate results I might be able to achieve my goal using the loaf pinch and polys much easier than I could with nurbs.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
08-04-2009 03:24
The Maya sculpty exporter is optimized for NURBS. It has trouble understanding polys, due to the way it samples surfaces. If you really want to use polys, Logan Baur's technique works well. Here's that link again:

/8/c9/304304/1.html#post2345381/8/c9/304304/1.html#post2345381

Another option, if price is no object, is to get the SLTK Pro plugin for Maya. It claims to support both poly and NURBS based sculpties equally well, and with equal ease. It does regular prims, too. I haven't used it, so I can't comment on how well it works. The pics and videos look very impressive, though. You can find it at http://www.simtools.jp/sltk/en/index.php
_____________________
.

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.