Baking ID map in Maya

Hi guys,

Here’s a tiny little tutorial on how to bake ID maps in Maya without using a high poly.

The project we’ve been working on does not require any high-polys, since models are quite small on the screen, so the majority of tiny details would get lost. This is what I modelled really quickly using some simple primitives. Axe blade could do with some retopo,but I’m not too worried about it.

01

I wanted to use Substance Painter for texturing,and for that it’s always good to have an ID map which can be used for masking out areas you want to work on.

In case you might be interested, this is my UV layout. Make sure nothing is overlapping (unless you specifically want it to be that way).

03

Step 1: Assign bright simple lamberts to parts of your mesh which are meant to be made out of the same material.I was using these colours.

08

Step 2: After that to get the best results and no colour ‘bleeding’ issues, ‘explode’ your mesh. By explode I just mean reposition all the elements of your mesh, so that they don’t occupy the same space (for part of meshes that can be physically organized in that way; if you are assigning lamberts to some particular polys instead, you don’t need to explode your model).

09

Step 3: Do not freeze those transformations 🙂 You want to be able to put your mesh back together once this is done. Duplicate your exploded meshes (you can group them together and after that make a duplicate of the group, just for the organizational reasons). One group will be your ‘source’ (or fake ‘high-poly’),the other one will be your ‘target’ (or fake ‘low-poly’). For the group containing the ‘low-poly’,assign a grey lambert material (optional).

04

Step 4: Now, open Transfer Maps window.

05

In there, the first thing you will see is Target Mesh section, this is where you add your ‘low-poly’. In the outliner, select the right meshes and click Add Selected. Do the same thing for your fake ‘high’-poly group – add those to the source section. Just make sure you are putting the right meshes in (the coloured ones).

Step 5: I prefer baking with MentalRay, so I uncheck use Maya’s common settings. My settings for Mr are as follows:

07

Pay attention to Fill texture seams – this is what they call ‘edge-padding’. It means that Maya will add 4 extra pixels around the edges of your UVs, so that you don’t get ugly black seams. The larger your map is, the bigger this number should be. I have it set to 12 for 20148 maps usually.

Step 6: If you look at the picture showing my target meshes, you will notice on the right there is a drop down menu for each of them. Ideally, you would want to use the so-called envelope option: it is a fake duplicate of your low-poly mesh, also known as ‘cage’ in other applications, which shows Maya where to do the sweet sweet baking, cast the rays and do other sorts of black magic. Ideally, you want your low-poly and high-poly meshes covered by your envelop completely, without any verts protruding anywhere from the pink surface of your cage. For this set-up, I had it set to 0.5 for all of my low-poly meshes.

Don’t forget to set your save path for the bake file. I usually work with tgas. It’s something we got taught at school, and I haven’t really felt the need to use any other format. Up to you.

Step 7: Now you can bake. This is what I got. Was able to use this baby in substance Painter without any problems.

10

This is what we currently have in the game (Ethan is using a super fancy gradient shading system which is a game feature I hope the programmer I’m working with can write a tutorial about soon):

11

Cheerio,

EJL out.

 

Advertisements
Posted in tutorials | Tagged , , , , , , , , , , , | Leave a comment

Create a cloud animation in Maya to use as 2D sprite-sheet in Unity 5.

  • Create some spheres in Maya;
  • Arrange them to look cloud-like, intercepting spheres is okay, since I’m after a stylized look;
  • Assign a shader of your choice, mine is a toon shader;

Intercepting Maya cloud spheres

  • Key frame some slight movement for all the frames;
  • Set up the camera: you need to create a separate camera and lock it into the position (look through selected) (move it to where you want it to be it and then lock its attributes, so that you can’t move it any more);
  • Make sure the environment of your camera is set to black, and in the Render settings you have Features : Framebuffer : Premultiply checked. If this is still giving you some bad outlines around your object when saving as .png, you can change your Renderer to the older legacy one.
  • But the best thing to do is to change the quality setting to Production. This will ensure positive results. The render itself might look jagged, but if you look at the alpha – it is nice and smooth. You can do it by going into Presets: Load Preset : Production. In my case, the render time didn’t change significantly because the scene is so simple;
  • In your Common tab, change the File Name Prefix to whatever you want your rendered images to be called. Change the image format to .png. You could be using any other format, but since I’m making a sprite sheet, I didn’t want to bother myself with .tga.
  • Frame/Animation ext is what you want your naming convention will be. I usually go for ‘name_#.ext’. Frame padding is set to 2, it means that my images will be called ‘name’_01.png, ‘name’_02.png, etc. Frame padding of 3 means having file names with 001,002,003 at the end.
  • Change your Frame range to however many frames you want to render out. I set mine to By Frame of 2, since I had 30 frames in total, and I only wanted to render every second frame. I checked Renumber Frames, since I didn’t want my frames to be rendered in odd order of 01,03,05,etc. I changed my start number to 1, and By Frame to 1, meaning that it will be adding new rendered images in the right order of 01,02,03,04, etc.
  • My image size was originally set to 640 by 480, but later on when packing my texture sheet, I realized this was too big, and I had to change the size of my images manually. You can avoid that by figuring out the required size beforehand. Take into consideration the screen size of the device you want your sprite to be displayed on. I figured since we are working with tablet games, 320 by 240 would work just fine for me.
  • After that go to Render menu : Batch render. Hit Batch Render and Close. And wait. At the bottom of the screen Maya will be showing you updates on the progress. By default, everything will be rendered into the Images folder of your project. You can jump in there, and see how Maya is adding more and more rendered images, one by one. Kinda cool!;
  • Once everything is done, we need to create a sprite sheet to use in Unity. It saves some resources, but in theory we could do it without any texture sheets, and just use the rendered images;
  • I will be using Texture Packer. You can use it for free for a certain period of time, so check it out. You can pack your renders in Photoshop, as well, although I have been struggling with that, and getting one or two sprites slightly jumping sideways, which means they were not perfectly aligned;
  • In Texture Packer, select the preset for Unity. Drag your images into the window. I had to change my scale in Scaling variants (set it to 0.5). I set Trim Mode to none to avoid any jumping in the animation. All of the padding options were set to none, this will be useful later on when I cut my sprite sheet in Unity;

Texture Packer Settings

  • There is a good option called Shape Outline, which can show you what your grid looks like. Don’t forget to turn it off before saving the file. After that when you are satisfied with the result, click Publish, and specify the location of your texture files for the Unity project you are working on. This is not entirely necessary, since I’ve found this option doesn’t work really well for me. It creates an additional file in that folder, which is not recognized by Unity (in my case), and I have to manually delete it once inside the project. But the texture sheet will be rendered out for you with no problems, and the next time you open the project, you will see it in the folder you’ve saved it to;

Ho

  • In Unity, click on your .png, and in the Inspector change its Texture Type to Sprite. Now, you can create an Empty Object in your scene Hierarchy tab, and drag the .png from your Project tab right onto it. You will see there is an object at your starting coordinates (0,0,0) which, surprise!, looks like your .png. Awesome sauce, we are nearly there;
  • Now we need to tell Unity this is not just any file, this is a file containing lots of pictures. Go back to the Inspector and change the Sprite Mode to multiple. You can play around with Pixel per Unit option later, it basically changes the size of your sprite. I tend to leave it as is;
  • Click on Sprite Editor. Now, since we know what size our images were originally, we should be able to do Slice : Grid by Cell Size. Hit Slice. Hit Apply;
  • Now, we need to create a new Animation Controller for our sprite. In Hierarchy, click on the Object we created earlier. Click on the arrow, open it up and click on the object hiding inside. In your Inspector, click on add Component. We need to go to Miscellaneous : Animator. Rename it to ‘your .png name’_animator. Now, with the same object still selected in Hierarchy, go into Window Menu : Animation. If you have the right object selected, you will see a window prompting you to create a new animation clip. Awesome, hit Create, name it to something like ‘your .png name’_animation;

Unity animation window

  • The next step is to go into your Project, find your .png file, open it up (click on the arrow next to it), you will see all of your individual frames. Now, grab all of them, and drag them into the time range of your animation window. Sometimes you might have to reselect your object in the viewport again… Okay, all of your pictures are on the time slider now, and it should look like this:

Unity animation window_with rames

  • Samples is your frames rate, the higher the number, the faster your animation will run;
  • In theory, Unity should have done an automatic assignment of your animation to your animator. If you hit play, and nothing happens, it means you might need to assign it manually. Find your animator in Project, double click on it. Now, all you have to do is to drag your animation file in there. On this picture, you can see the two are connected. You need the same result. For that, you might need to right click on the Entry, and select Make Transition, and drag it onto your animation;

Unity animator window_make transition

  • Now, when you hit play, you should be able to see Unity cycling through your frames;
  • There is a lot of other things you might need to readjust, you might want to attach a script that makes your object go left or right (you could also create another animation clip for that and animate the position values of your parent object), or make it follow the camera, etc.
Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Rendering with Maya Toon and Outlines tutorial.

Hello! Long time no see!

So, I found this beautiful tutorial on toon shading in Maya yesterday How To Render Cell Shader and Outlines in Maya. Why am I doing toon shading? Because you never know when you might need it, so it’s always good to know how to make it work in Maya. For instance, you might be working on a game, and want to make some 3D elements, and render them in 2D, and use them as your sprite-sheets later.That was where I got this idea from originally, I started rendering out some cloud animation for a game I’ve been working on.

While this tutorial is amazing, I thought it would be good to some it up here, so that maybe people with limited Internet can just follow my instruction. Plus, after completing the tutorial,I ran into a couple of problems,my outline render looked either extremely ugly, or wouldn’t show up at all. This tutorial is quite simplified in case you’re new to Maya.

So, we will start with absolutely any scene,and any model. Whatever you feel like,I grabbed a Dota2 model

  1. Assign a toon shader to the objects you want to look cartoony. You can do that by going into your rendering tab (on the left there’s a markdown menu under your ‘File); from there go to Toon : Shaded Brightness Three Tone. Render it with Mental Ray, see what it looks like. To change your rendering system to MR,go into your render setting, it’s easily done from there. It’s the 4th icon here,and the first one is your rendering window,from there you can render you scene. For more info you can always go to the Autodesk website.

mentalray

exampleScene_start

2. Play around with your light  (you’ll notice that changing your light angle changes the way your object is shaded) and with the ramp of the toon shader. It’s easy.Go into your attribute editor for one of the objects with the shader created, and then to the Color section.

Toon Shader

If you click on the circles at the top of the ramp, you can change the color of this particular part of the shader. So, in this case, we have the brightest part light pink, and the middle value is pink,and the shadow is red. Each of the dots has its own interpolation associated with it. None means you get this hard edge when one color transforms into another. You can see what other interpolation types do, I sometimes use smooth.

You can also drag the circles left and right, to change the overall appearance of the shader (make the spotlight tighter,etc.). You can also introduce new dots (new steps) just by clicking anywhere on the ramp.You can also delete them by clicking on the little squares at the bottom.

3. Now let’s set up another Render Layer. Go to your channel Box, below you will find 3 tabs, one of which is called Render. In the Render tab you will see 4 icons, click the 4th one,you will create a new empty render layer. Select your objects in the viewport, right click on the newly created layer : add selected objects.

render layer

Let’s quickly talk about the icons opposite to layer names. The first one: if it has a green tick, it means this layer will be rendered when you hit your render button. The second one: if it’s green, your renderer will be using the last rendered image. So, if you’ve changed your scene, but still getting the same old render image, don’t freak out, and see if this option is turned on.

If you haven’t rendered anything from that layer yet, it will be greyed out. The last one takes you to your render settings.

4. You need to assign your object/s to this new layer. select them, right click on the new layer : Add Selected Objects. After that we will need to create a material override. It means that this material will be applied only to this layer, and will not affect your main Master Layer with all your cool shaders that have already been set up.

Do a right click on the layer again: Overrides : Create New Material Override. Assign a new Surface Shader. I usually set its Out Matte Opacity to Black in the Attribute Editor after that.

material override

5. Now you want to click on that 3d icon opposite your newly created layer. It will take you to your render settings. Go to Features tab : Contours. Now, the next step is quite important. Before clicking on Enable Contour rendering, right click it. Click on Create Layer Override. Without this setting, contour rendering will be applied to all of your layers, and we might not want that.

Check Enable now. Click Hide source, make Flood Color white.

6. Now we need to enable Contour rendering on our shader. Go Window : Rendering Editors : Hypershade. Find your solid shader in there (the white one). Middle mouse drag it into your Work Area. Look for the icon below Window. It will show the output connections of your shader.

input nodes

We need to get to surfaceShader1SG. Go to Attribute Editor : Mental ray : Contours : Enable Contour Rendering. You can play with the width settings here.

Now try and render! Oh no, you can’t see anything? Go into your Quality Tab for Render Settings, and change Sampling Mode to Legacy Sampling Mode, make share you create a layer override for this as well, otherwise your Master Layer will get affected, we don’t want that. You should be able to see some positive results after that.

7. To get better looking results, you will most likely have to play around with the Settings like Contour : Width (for surfaceShader1SG), and the settings for your Render. Also, notice you will be getting different results changing the number for Normal Contrast. I have rendered two different outlines with it set to 25 and something close to 60. Another work around would be having a couple of different shaders, that would give you more control over tricky geometry heavy areas of your mesh. You will just need to change your Width settings to smth smaller. Below are my settings for this scene.

contour settings

More info on Draw By Property 

8. Combine the toon shader render with the outlines one in the Photoshop. Multiple the outlines on top of the layer with flat colour.

Spending enough time tweaking those settings I’ve mentioned before would give you really cool results. For the purpose of this tutorial, I wasn’t trying to create anything specific, just wanted to show you a way in which it can be done. Also, with this technique, you can render out your wire-frames! Just check Around All Poly Faces in your Render Settings.

Final result:

exampleScene_final

This is another example of the same technique,was a bit easier to set up, and it looks much ‘cleaner’.

bridgeFinalRender

Posted in Uncategorized | Tagged , , , , , , , , , , | Leave a comment

Artsy thingies

Hello, dear friends! Or strangers. I’m not sure how useful posts like this can be,but whatever.Let’s say this was an art test (I’m not admitting anything). The last time I was using Unreal was last year. I never got to play around with it much, as I was mainly doing modelling. So this task was a pretty big deal for me. Here’s the ref pic I was supposed to get my inspiration from:

ref pic

The style of this thing was meant to be much closer to stylized than realistic. Which is confusing. It’s good when it’s strictly a, or strictly b.

So,this whole thing has been done in a week in my spare time. I think I spent the majority of time sculpting in Zbrush and retopologizing (some never learn). Here’s what this (some of it) looks like in Zbr:

BPR_Render

Nothing too fancy,no extreme texturing, just a couple of cracks here and there. I really like using Clip Curve and MalletFast2 brush for making rocks,they seem to work the best for me.

The majority of texturing was done through baking in Xnormal. For rocks I always use curvature maps,as they highlight edges quite nicely. Grass was no easy task, as I have never ever done any foliage before. So it was tricky and fun, but all you have to do is draw some grass first, then in Maya create a plane,and arrange your textures the way you want,do not forget to save your tga in 32 bits/pixel mode,that transparency needs an additional channel. Used Maya for baking AO.

Here’s a texture sample. I must say Unreal eats colours. As soon as you introduce some roughness (less than 0.9),say goodbye to your diffuse. So this is a very exaggerated sample (and still wouldn’t really show up on the screen):

texture sample

In Unreal I spent 4 hours trying to set up the skysphere the way I wanted. I wanted a milky-looking day.  It is a nightmare,but it is achievable once you know what you’re doing.

After that I had to set up all the shaders. Check out Fuzzy Shading networks in Unreal (it’s just a node you feed into your shader). It makes grass look like it has some variations on hues. Used the same system for rocks, it can give them that additional highlight on the edges.

Setting it up is a matter of put a number and see what happens. So have fun with it 😛

So,I guess,I’ll post 2-3 early pics,and the latest update.

HighresScreenshot00006 HighresScreenshot00007

And the version I’m quite happy with (for now xDDD need to fix things,make moooar things):

HighresScreenshot00006 HighresScreenshot00012

So yeah. Not sure what’s gonna happen next,I know I’m competing against one of my classmates for this position,which is unfortunate.But I’d be happy if he got it, he’s a good artist.

Posted in Uncategorized | Tagged , , , , , , , , , , , | Leave a comment

I must be missing TWD

Hey guys!

So,what’s been happening here… Let me see. Landed a contract job for an animation college, that was pretty cool. I had to help them come up with some ideas for game design students’s briefs. And I love those kind of tasks. I just think: ‘Well,what would be useful and fun to do at the same time?’. I think they liked what I’d done for them,and there’s a possibility of me returning to that place as a tutor. But that’d be in October, and I need money now.

So,I’m moving to Tron tomorrow. My death trap job,as I like to call it, starts on the 6th of July. I’m definitely not ready. I can see myself drinking every day as I get home. I will definitely have to see a psychologist, as I have been having some pretty serious problems lately (well,compared to what it usually is).

Also,I got my first art test for a very cool-looking project thanks to two friends of mine. Yeah, I’m writing this while taking a mental break from the test. I have no idea how I’m gonna finish it on time,taking into consideration my plans for tomorrow. But hey, if I fail this one, at least it made me do some Zbrush,and I will have to go back to Unreal (I’m so not missing it after working with Unity for the last 7 months,god bless its digital soul).

Ah and yes. I was actually trying to make a Pikpok character look-alike. And somehow it turned into this. But I like this guy nevertheless. He’s cool,and he’ll be a part of my t-shirt collection for sure.

Mario The Baseball Player

Posted in Uncategorized | Tagged , , , , , , , , , , | Leave a comment

Abra…running out of titles xD

So,what are we going to talk about today? Have I talked to you about my recent reading adventures? I stumbled upon the website called The Church of Satan. Now, please, don’t get scared and run away xD Tbh a couple of years ago I wouldn’t have dared to open the link. But I think I’ve recently become more open to ideas. I know that a lot of things we’ve been told is total BS 99% of times, and if you want to say that something is bad, or someone is evil, you actually have to go and research that for yourself.

I’ve found out that the people who are members of this church are, first of all, atheists. They don’t believe in deities, and the one true god for them is human-being. They do not promote violence. They are fine with gay people, bisexual people, and asexual people. They do not promote child and animal abuse, as children and animals are innocent and pure. They promote indulgence,but not addiction, as that would mean losing control over oneself, and that is something to be feared. Pleasure and beauty is something to be desired. But it cannot be achieved by forcefully taking it. Also, standing up for yourself is encouraged. Not turning the other cheek. But one need to be kind to those who deserve it. People can get access to power based on their skills,not their titles.

You see, my point is: if this religion were called something else, I’m pretty sure millions and millions of people would join… They have a lot of points I really like. But for now I’m going to stick to my agnosticism xD I’m weird enough as it is.

Here’s a new picture to sweeten the post:

red hair girl_05

You can download the process pics on my Patreon page.

Also,if anyone’s interested who my main inspiration these days is… it’s this guy: Ilya Kuvshinov I think his works are stunning, I hope I can be as good one day!

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , | Leave a comment

Luck

Let’s just talk about luck. It can be good or bad. In my case it’s always…on drugs. I imagine my lady-luck being a hippy wearing pink heart-shaped glasses,always high and not knowing what the hell she’s doing. She,of course,is trying to help me,and guide me through the world of darkness,but it’s the same as if I were blind and had a service dog who was chasing cats all the time.

Currently,the situation is this: there is a very bad job waiting for me in another city. By saying this, I must admit although it sounds bad, it is a job, and it pays a lot. It’s a job my best friend’s mother offered to me.

Yesterday, I also got a reply from a lovely person about another job opp. It is within the industry. He seemed very keen and interested, and promised to get back to me as soon as he talked to their programme lead.

There’s also Phantasmal, who are waiting for me to confirm my availability.

There is another job opp,which I will be discussing on Sat. It’s a tiny project,but it pays for my rent for a couple of weeks.

Also,have I mentioned that I’m homeless and sleeping on a friend’s couch?

The problem is as follows: I need to somehow postpone signing the contract for the irrelevant job until I hear back from the other person. Because if I could land that other job, I’d be super happy and excited.

So my dear lady-luck,could you possibly stop getting high for a couple of days,and help me with that one full-time art-related job? Pretty please.

Here’s a picture for this post. I’ve started experimenting with styles,I think I’ve mentioned it earlier. This is based on a friend’s picture.I can never show it to her,because she’d most likely kill me. She is extremely beautiful irl 🙂

Holly

Posted in Uncategorized | Tagged , , , , , , | Leave a comment