Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 05-12-2007, 11:35 PM   #1
gubar
Registered User
 
Join Date: Mar 2007
Posts: 1,055
Thanks: 2
Thanked 59 Times in 56 Posts
Default How do you properly attatch a alpha via projection and layered texture?

Hi,

been trying many ways... from the file to the material (blinn)... from the material to the layered texture alpha... copying the projection, and trying to hook it in through there (several ways to do it, none obvious or working properly).

The closest I can get, is that I can manipulate the placement node, and see my text... but when I render, it's in a different place - something to do with my alpha not moving with my image (the text that I'm projecting is white too).

Anyone able to help?

thanks,

gubar
gubar is offline   Reply With Quote
Old 06-12-2007, 12:43 AM   #2
Mayaniac
As Zbrushiac sounds stupid!
 
Mayaniac's Avatar
 
Join Date: Nov 2007
Location: Derby
Posts: 1,241
Thanks: 23
Thanked 33 Times in 30 Posts
Default

I'm not quite sure what your getting at, but it sounds like your using one image as your Color image, another as the Alpha image. You shouldn't do that, they should all be one image.

If your trying to project an image you probably wont have to much luck, projections can be Ugly and take time to set up, and if you move your Object the texture doesn't follow.

I would use "Normal" as my option for 2D textures. Then it should map to your plane just fine. I just through a quick test together in Maya and it works fine.

So, make sure your Alphas are created correctly, and don't use a projection unless you have to.

Post back if it's still not working.

__________________
www.stevenegan-cgi.com

"Your weapons are no match for ours! People of Mars, surrender!"
"Um, this isn't Mars. This is Earth."
"Earth? Earth-with-nuclear-weapons Earth?"
"Yes."
[long pause] "Friend!!"
Mayaniac is offline   Reply With Quote
Old 06-12-2007, 12:49 AM   #3
gubar
Registered User
 
Join Date: Mar 2007
Posts: 1,055
Thanks: 2
Thanked 59 Times in 56 Posts
Default

Hi thanks for taking the time to post.

It works fine with a mapped texture. However, I am projecting the texture because it is comprised of text so its aspect ratio is important, and the object is oblong; making non-square textures that preserve their proportions is not easy with maya, unless you just make a square texture and leave a lot blank, thich is not efficient (though I'd be happy to be shown a way to make a rectangular texture easliy).

The reason I have made two files is because I tried it with one, and it doesn't work - the 3d projection node does not have the expected input to take an alpha for some reason. So you try and hook another file into various inputs... I've been at it for a good few hours.

thanks for having a go,

gubar
gubar is offline   Reply With Quote
Old 06-12-2007, 01:08 AM   #4
Mayaniac
As Zbrushiac sounds stupid!
 
Mayaniac's Avatar
 
Join Date: Nov 2007
Location: Derby
Posts: 1,241
Thanks: 23
Thanked 33 Times in 30 Posts
Default

Hmm, i see what your saying, but i think i know of a way you could do this, and keeping your Images Hight/Width ratio.

So, let me give you an example of what i think your trying to do:

Lets say you modeled a Bar of Soap (or something else that was oblong in shape) and you are trying to project text onto the side of it, but don't want it's funny shape to ruin or warp the text.

Does the above sound like what you are trying to do?

If so i might have a cure, but it's hard to discribe. I would have to post a couple of images for you to follow. (which i wouldn't mind doing) but i don't want to do it if i'm not talking about the right thing..... you know what i mean?

Anyhow, post back if you now what i'm talking about and also correct me where i'm wrong.

Have fun!
__________________
www.stevenegan-cgi.com

"Your weapons are no match for ours! People of Mars, surrender!"
"Um, this isn't Mars. This is Earth."
"Earth? Earth-with-nuclear-weapons Earth?"
"Yes."
[long pause] "Friend!!"

Last edited by Mayaniac : 06-12-2007 at 01:14 AM.
Mayaniac is offline   Reply With Quote
Old 06-12-2007, 09:38 AM   #5
gubar
Registered User
 
Join Date: Mar 2007
Posts: 1,055
Thanks: 2
Thanked 59 Times in 56 Posts
Default

Hi Mayaniac,

that sounds pretty much what I'm going for. I'm modeling a VCR which is rectangular as viewed from the front.

I want to project all of the text from the front, using an alpha channel to only project the text (the other layer will have to material's main texture).

I've tried maintaing the aspect ration but it's quite tricky... if you know how, that'd be great.

thanks,

gubar
gubar is offline   Reply With Quote
Old 06-12-2007, 02:09 PM   #6
Mayaniac
As Zbrushiac sounds stupid!
 
Mayaniac's Avatar
 
Join Date: Nov 2007
Location: Derby
Posts: 1,241
Thanks: 23
Thanked 33 Times in 30 Posts
Default

Ok, here goes nothing....

Select the Faces on the front of your VCR (the ones you want the texture applied to) and then change to your Front view, or the view that faces the the Selected faces.

Now before we go on. With the faces still selected go to:
Create>> Sets>> Quick Select Set...
Name it accordingly, and hit "Add to shelf"

Now you should have a button on your shelf that every time you click, it selects the faces on the front of your VCR.

Now with the Front faces selected and in the front view go to: Create UVs>> Planar Mapping (select the options Box) Now in the Option: Select "Bounding box" (not best plane.) and select "Camera" Now Also select "Keep Image Width/Hight Ratio" and also select: "Insert Projection Before Deformers." Then click "Project."

Now go to Window>> UV Texture editor.

You should see the UVs for the Front of the VCR which have not lost it's Aspect Ratio. Select the UV for the front of the VCR and move them of to the side, and then select the UVs for the rest of the VCR and move them of to the other side, then bring the Front VCR UVs back into the center. This will make sure that non of the text you apply to the front of the VCR appears on the rest of it.

Now in the UV texture editor go to: Polygons>> UV Snapshot...

Now the Snapshot options dialog box should pop up.
Just fill in the Details according to your preference.
Such as, 1024x1024 for the image size, and PNG for the format, also change the color value to blue or something equally as visible.
Now with the dialog bx still open select your VCR (in object mode) and then Click "OK" in the Snapshot Dialog box.

Open your UV snapshot in Photoshop, and make sure your text lines up the UVs.

Now save your Alpha image as a .Targa or .PNG

Now back in Maya open the Hyper Shade (Window>> Render Editors>> Hyper shade.)

Now in the Hyper shade, create a new Node and double click it to open the attribute Editor.
In the color channel click the checker box. when the "Create Render node" Dialog box opens. Make sure to select "Normal" not "as projection" or "as Stencil"
Then click the "File" node.

Now in the attribute editor, click on the small file icon next to image name to browse and select your image.

Now apply the texture to your VCR. Hit 6 on your key board to see the results.

Now you may notice that the image is showing up on the rest of the model.

Well thats an easy fix. Create a New node in the Hyper shade and apply it to the rest of the VCR (excluding the front.) This will keep things nice and clean while you complete the rest of the steps.

Now to achieve the effect that you are after you will need to create a Layered shader, and plug-in your textures.

To do this Open the hyper shade and crate a "layered shader" node. Double click it to view it's attributes. Now you should see a Red box with a small green Box inside of it. Now middle mouse button and drag the Base texture you want applied to the whole VCR into the Red box in the Layered Shaders attributes. Click the small x underneath the green box to delete it. Now Middle mouse Button and drag the Node with the Alpha image applied into the Red box also.

NOTE: Make sure that the Base texture is first followed by the image texture in the Layered shaders red box. This is very important if you want your Alpha image to show up.

Now apply the Layered shader to the Object. You wont be able to see the results in the view port any more, and will have to do Render to see them.

Now if the Alpha text is showing up on the model in any other place than the front of the VCR, Open the Hyper shade and select the base texture node, and in the hyper shad go to: Edit>> Duplicate>> Without network.

Now select the all the faces of your VCR (excluding the front) and apply this new Node.

NOTE: A quick way to select all those faces without selecting the front faces, is to use the Selection set you created earlier. Click on the Selection set button you put in the shelf, and this should select the front faces, now simply go to: Edit>> Invert selection.

Now this should give you the results that your after.

I hope this helped.

Take care
__________________
www.stevenegan-cgi.com

"Your weapons are no match for ours! People of Mars, surrender!"
"Um, this isn't Mars. This is Earth."
"Earth? Earth-with-nuclear-weapons Earth?"
"Yes."
[long pause] "Friend!!"
Mayaniac is offline   Reply With Quote
Old 08-12-2007, 10:24 AM   #7
gubar
Registered User
 
Join Date: Mar 2007
Posts: 1,055
Thanks: 2
Thanked 59 Times in 56 Posts
Default

Hi Mayaniac,

thanks so much for taking the time to do that for me.

I'm still running into problems though... I've decided just to make the texture all in one layer, which is annoying cause I wanted to use a procedural for a bump map (still could if I create it and turn it into a file texture I suppose).

Gotta say, as much as I love maya I think it's pretty lousy that doing something as simple as projecting a texture with an alpha is so unintuitive and complex... it really should be a no brainer. All that the projection node needs is a proper way to pipe your alpha through, doesn't seem like a lot to ask for.

Anyway,

thanks,

gubar
gubar is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.