Tuesday 10 October 2023

Maya Basics - Model & Texture a Cereal Box



In this super basic tutorial we show how to do very basic modelling and texturing in Autodesk Maya and Photoshop to create a Cereal Box. This tutorial is divided into two parts - the Maya part, where we create the box and UV it (above), and the Photoshop part (below), where we do the texturing. 

Model and Texture a Cereal Box - Part Two
In the video below we bring the UV map into Photoshop and do the texturing. 




Also don't forget, if you've never done any modelling or texturing in Maya before, to start with the Dice Modelling and Texturing tutorial

You can also follow the tutorial step by step below:

What You Will Learn
Cereal Box Texture Map from Turbosquid
By the end of this exercise you should be able to:
1. Understand and use the UV texture editor
2. Manipulate the image in Photoshop to fit the UV map
3. Apply the final image to the box and make it look pretty.


Work Method

Part 1 – Create the Box and Setup

1. Open Maya, Create a project, name it CerealBox, and set to it.
2. Import your photos of your box and place them in the source images folder.
3. In Maya, create a simple Polygon Cube in Maya with one face on each side.
4. Adjust the box so it has the dimensions of the cereal box you want to map. Most cereal boxes are roughly 12 inches tall, 8 inches wide, with a depth of roughly 2 inches
5. Press 6 for texture mode.
6. Select a two panel layout. In the left hand viewport, Panels/panel/UV Texture Editor. You should now see the persp view on one side and the UV texture editor on the other.
7. Select the box, go to Create UVs/Automatic mapping options. Apply the default settings and see what happens. In the UV editor, our UV map doesn’t look right. It still looks like an unwrapped cube – not an unwrapped cereal box. Why? We need to freeze our transformations first – Maya still thinks our box is still a perfect cube.
8. To fix this, select the box. Modify/freeze transformations.
9. Go back to Create UVs/Automatic mapping and try again. Now our UVs will correlate to the 3D view of the box. Auto mapping takes a snapshot of the six sides of the box.
10. Now we need to use move and sew in the UV Texture Editor to create a UV map that accurately reflects the actual geometry of the box.
11. In the UV editor, RMB and go to edge mode. Select an edge. The edge will go orange and it will correlate with another edge in the UV editor. We want to join these orange edges up together. But how? We can’t use the move tool.
12. What we can do is use the move and sew button to join them together to create one shell.
13. Keep selecting all the edges and use move and sew until you have the image of an unwrapped cereal box in the UV editor.
14. In the UV editor, Right click, select UV. Drag select all the UVs, use the move tool to move them all safely into the gray work area.
15. Now go back to object mode. We want to make a UV snapshot of our UV map. Still in the UV editor, go to Image/UV Snapshot. Select your size 1024. Set it to Tiff. Name it cereal_outUV. Hit OK.
16. In your images folder you should find the image.

Part 2 – Adjust the UV Map in Photoshop (note that this stage will not work if the dimensions of your cereal box photos do not match the dimensions of the box in Maya)

1. Open Photoshop and import the image. It will come in black with white lines.
2. Add a new layer, call it BG, and drag it below the UV layer. Make it green.
3. Go to the top UV layer and change layer type to screen. Now anything that is black will be transparent.
4. Above the BG layer create a new layer. Now we need to open up all your photos and import them into Photoshop. Select them all and import them.
5. If you don’t have any photos, Google “Cereal box texture map” and download a box layout (be sure to select one that has six clear whole parts. Apple Jacks are good. But in the end you can use any cereal box texture, as it can all be fixed in Photoshop)
6. In Photoshop, crop the box into six images, saving each one to your Source Images folder in Maya. Name them cereal_front, cereal_back, top, bottom, side1 and side 2.
7. Drag the images into Photoshop and adjust them so they fit the UV map, using the transform tools in Photoshop.
8. Where the images overlap each other, use the marquee tool to delete the overlapping edges. By the end, all your images should sit neatly on top of the UV map.
9. Save it in the source images folder as a JPEG cereal_texture_map.

Part 3 – Back to Maya

1. Open Maya and go to window/rendering editors/Hypershade.
2. In the Hypershade, create a new Lambert, name it cereal_box_Mat.
3. Double click on it, find the colour attribute, click on the checker flag, and attach the cereal texture map to the box.
4. If the textures still look weird, go back to the UV Editor, RMB select UVs, drag select all the UVs, and use the move tool to edge the UV map around until it sits correctly on the box.
5. Finally, RMB select edges. Drag select all the edges on the box, and bevel it.
6. Save your work. You’re done!


No comments:

Post a Comment