Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   need some help with projections (https://simplymaya.com/forum/showthread.php?t=9073)

NightPhantom 23-11-2003 04:19 AM

need some help with projections
 
Hi,

I'm trying to apply some texture to this mug I just modeled. I have a layered shader asigned to the surface. On the lower layer I have a blinn material for all the white stuff. On the upper layer I have a planar projection for the Cobra. This projection has a file texture attached to it (that's the red cobra file of course), and a 3D placement node (or whatever you call those "place3dTexture"). I moved it arround to fit the place where I wanted the cobra to be on the cup, and from the outside it looks just the way I want it, but then when I looked inside I realized that the projection also afects the inside wall of the cup (I noticed it bc I saw its reflection on the other side of the cup).

Now, I figured I could just reduce the depth for the projection or something to prevent it from going as far as the inner wall. But I can't do that because the surface is curved, so if I change the z axis for the projection in any way it would either but the picture in the middle or at both sides. I thought of using cylindrical projection intead of planar, but I don't think that would work either, what I would need is a semi-circle projection.

Any ideas???

Here are some images,

http://helios.acomp.usf.edu/~acosta2/mug1.jpg

http://helios.acomp.usf.edu/~acosta2/mug2.jpg

http://helios.acomp.usf.edu/~acosta2/mug.gif

Thanks for your help.

mtmckinley 23-11-2003 04:32 AM

You could try having multiple materials for the glass, one with the image, one without. Apply the image-less material to the faces on the interior. It doesn't appear to be a flat surface, so I would think that should work.

NightPhantom 23-11-2003 05:41 AM

Oh, yeah, I forgot to mention I'm using NURBs, so I can't apply a material to only some faces (or at least I don't know how to do that if it is possible). I think the closest thing I could do is cut the surface in two and then apply white only to the inside and picture to the outside, but I would rather stay with one single surface (and also with NURBs).

Is there anyway to fix that problem with a single NURB surface?

Thanks.

mtmckinley 23-11-2003 06:18 AM

hmm, i think you can apply materials to different surface patches... not sure. i've not tried with nurbs in some time.

fredriksson 23-11-2003 03:54 PM

Try cutting the surface in two. If that isn't desirable, try making the texture taller with nothing at the top and place it uniformly over the cup without having it as a projection. Then tweak coverage and translate frame (remember to turn wrap off). Good luck.

fredriksson 23-11-2003 03:56 PM

Or just apply two different materials to the surface patches (as per Mikes suggestion, I just checked, it works).

NitroLiq 23-11-2003 08:17 PM

1 Attachment(s)
NP, you can solve the problem with your initial setup. Here's the step-by-step:

1. Create your two surface materials...one for the white porcelain surface of the cup and one for the cobra label. You can also create your layered shader for later use.

2. Create your cobra texture in photoshop with an alpha channel and save out as targa or tif.

3. Load the file texture (as normal, not projection) into your label material's color attribute. Make sure it only goes to the color attribute as I think Maya's default is to connect both color and transparancy if it sees an alpha channel. If that's the case, delete the connection to transparancy. Go ahead and assign the label material to your mug. The texture should be covering the whole mug object.

4. Click on the file texture's 2D placement node and choose interactive placement. Click on the mug and you should see a red curve with u and v and various points for selecting. This can get a bit tricky, but mmb + click/drag on the various points you see on that to place your cobra texture where you want it. I usually use this to adjust the label's height and how much it wraps around the object. If the cobra is upside down, go into the 2D texture node's attributes and rotate it or the UVs...whatever works.

5. Ok, when you've fine-tuned the placement of the cobra label, go into the file texture node's color balance > default color and change it to white. Next we're going to set up its transparency.

6. shift +mmb + drag and drop the file texture node on top of the label material. This will open the connection editor. Connect the Out Alpha to Transparency rgb values. You should now just see your cobra label if you do a render.

7. Now we can start hooking things up to the layered shader. MMB + drag the label material on to the layered shader's color attribute. Click once in the layer area to create another layer. Now mmb + drag the other material (the white porcelain mug surface) onto the color attribute for the new layer. If you render you still won't see a change so we can fix this with another connection.

8. MMB + shift + drag/drop the file texture node on top of the layered shader node. This time connect Out Alpha to Inputs [0] transparency RGB.

9. That should be it. Assign the layered shader to your mug and see what happens. I've attached a simple scene for you to look at using the above method.

Good Luck!

NightPhantom 24-11-2003 01:20 AM

Yes! :beer:

That did it :D Thanks NitroLiq. Not only it don't show inside the mug, but it actually made the whole thing look better that before. Here are some pictures:
http://helios.acomp.usf.edu/~acosta2... mug fixed.jpg

I did tried using the method recomended by mtmckinley and fredriksson. In my UI it looked like it was working, and I was about to come back and thank you for the sugestion, but then I rendered and all I got was a white mug and an error message saying something like surface patch rendering is nor suported by NURBS :( . Is that normal? :confused: could it be that I did something wrong/missed something/the instalation of maya is corrupted on this computer?

Well, anyway, thanks guys :thumbsup:

mtmckinley 24-11-2003 01:44 AM

ah, I recall in 4.5 that it had that message also. I was thinking it was corrected in 5.0+ Ah well. Glad to hear you got it working. :)

NightPhantom 24-11-2003 04:32 AM

Quote:

Originally posted by mtmckinley
ah, I recall in 4.5 that it had that message also. I was thinking it was corrected in 5.0+ Ah well. Glad to hear you got it working. :)
It might have been corrected in v5.0 because I'm using Maya v4.5 (I probably should have mentioned that before :p )

mtmckinley 24-11-2003 04:53 AM

that'd explain it. ;)

Cheers!


All times are GMT. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018