Quantcast
Channel: Modeling – CG Masters
Viewing all articles
Browse latest Browse all 28

What To Know When Creating Next Gen Assets

$
0
0

 Written by Guilherme Henrique

next gen asset creation

 

● References

● When to use triangles

● Getting ready for sculpting

● Thoughts on retopology

● What makes a good UV unwrap

● Getting good normals from a bake

● Next gen texturing

● Resources (LOTS!)

 


 

Do you wanna make your very own Gears of War?
Well skip this page then and try asking Google as today we’ll be learning the workflow of making a next gen asset!

 

For a long time I had problems trying to do stuff for games e.g.

1 – The bakes would never go as I expected
2 – I didn’t understand how I should have been setting the normals of my models
3 – How to make a proper UV layout or how I should’ve modeled my low polys.
etc, etc.

 

When we are used to working on rendered stuff, making art for realtime processing seems like a whole new undiscovered world, and hopefully, for those who still are kinda figuring out how to make all the things work, today I’ll be trying to clear all the mystery!

A few years ago I started to work in a game studio focused on advertising, and with that, my curiosity to finally understand how everything works started to grow, and after that, me and a co-worker friend decided to raise the level and start our own business, then I found myself in a situation that learning how to properly create game content was going to be vital to the success of our work, and with what I’ve learned, now here I am spreading it to you ;)

Hope you find it useful!

The model I’ll be using to explain the main concepts of the workflow is a tombstone I recently did for a game I’m working on, here we’ll be going from modeling to loading the asset in BGE

So take the kids out of the room and lets start!

 

STEP 1 – REFERENCES

 

Yeah! I think that this should be worth a mention: You’ll only make a good model if you have good references, so the first thing I did was to dive into Google search for heart-warming graveyard pictures.
A good tip here is to use Pinterest to search your references, sometimes it can be even better than the Google search engine (if you can imagine that)

Green-Wood Cemetery

 

I won’t go deep on detail into this since I really can’t stand looking at more tombstone pictures.

OK, NEXT.

 

STEP 2 – MODELING

 

You can start this step in many forms, there are people who like to use apps like Zbrush and build the entire model from scratch inside it, others prefer to make a base mesh to sculpt it later, and people like me, who don’t give a damn about anything.

In this particular asset, I did a bit of an unusual workflow that ended working really well, so I think I can call it a “technique”.

As the visual style is still in development I have a certain freedom to experiment. At first my idea was to try to make a clean looking low poly asset, so my modeling was entirely focused on shapes and readability, silhouette plays a big role when working with assets, so try to focus your attention to it whenever is possible!

 

image23

Guidelines & Tips for low poly modeling:

As long as your model is not going to be animated or deformed you don’t have to worry about having tri’s (get used to hearing “tri’s” (short for triangles of course) a lot! – aint no time for 3 syllables when there’s baking to be done!). Wise use of tri’s (see there it is again!) can save you a lot on the overall polycount.

next gen asset tris

FAQ:
Q: Why are we able to use tri’s on game models?
A: First of all, when the Game Engine loads your model it automatically converts all your polygons into tri’s, since tri’s are the only geometry that a video card understands, so there’s no need to worry about using tri’s.

Q: Then why do people tell me to not use it?
A: It’s not because we can use it that we should do it (just like drugs kids!), sometimes having tri’s can be very beneficial, but tri’s also can lead to shading errors, ruining all your hard work, also organic models do not deform well with triangles, since it breaks the polygonal flow of the topology, that’s why you can’t use tri’s on animatable organic things, and it’s also better to avoid when you’ll be planning to use subsurf (since this will give you strange crap in your mesh).

next gen asset smoothing errors

- First block out your details, then you worry about polycount/topology.

What does this mean?
Let’s take as example this damage on the tomb, to do that, I’ve first blocked the hole using the knife tool (K), then later I use the knife tool again to end up with the manifold faces.

next gen asset manifold

next gen asset

How to make sure you don’t have any manifolds left?
Easy:

 

  1. Select the face selection mode

  2. Go to: Select > Select Faces by Sides

  3. On the Tool shelf (T), select “Greater than 4″

 

next gen asset selection

- Use snap to vertices with merge on to optimize your mesh reducing unnecessary edge loops

next gen asset tri count

next gen asset snapping

These tips are aimed towards models that won’t be sculpted, or when you go to retopo your mesh

BUT, “Hey Mr. Guilherme, what if I did my model that way? It’s really awesome, but I really want to sculpt it and don’t want to redo it from scratch.”

 Well, so let’s suppose you found yourself in that situation above, (curiously the same as mine in this model), what hack can you do to work around this?

In Blender we have an awesome modifier called “Remesh”, with it, you can take your messy modeling full of tris & weirdness and convert it to a awesome sculpting friendly mesh!

next gen asset sculpt ready

For meshes that will be sculpted, you just follow the well known & established subdivision modeling pipeline.

Before sending your models to be sculpted, make sure your base mesh has even face topology:

next gen asset even topology

(In softwares like Zbrush, 3D-Coat or Blender, even topology is a thing that’s not necessarily required anymore) -future, folks-
With Blender we have Dynamic Topology, with it we can just sculpt our soul out without a care to mesh resolution, as it will be dynamically adjusting to your needs ;)

 

STEP 3 – SCULPTING

 

This is where things get interesting, you take your boring model and transform it into an awesome organic devil!

My tool of choice is mudbox, I’ve always used it, so it’s a natural choice for me, but the foundations are the same.
In Blender we have Sculpt mode, where we can do this very well too, the tool is only a matter of preference, find what fits best for you (especially in your budget and hardware)

next gen asset sculpting

With models like that, I usually start adding sufficient subdivisions to a level high enough that I can sculpt small details, since in this case I just want to detail it, not use as a base mesh for a megalomaniac sculpt.

After that, I start using some brushes that seem interesting to break a bit of the flatness and add some damage.

Then stencils come in handy, to do the “R.I.P” and the phrase, the best way to make a fast and clean sculpt was to create a stencil in Photoshop to use as a…. stencil?…(!) to carve the details, this way in just a few minutes you can come with some really complex sculpt models. (Try to make stencils of skulls, statues, etc and use in your work! lots of details in a really short amount of time)

 next gen asset sculpt stencil

 

You can use as well some other stencils, as bricks, rocks, cliffs and so on to add texture to your sculpt, look how a sculpt can be improved with that:

next gen asset stencil applied

 

You can grab some top notch alphas for your state-of-the-art sculpting on Pixologic Download Center (for free!)

 

STEP 4 – RETOPOLOGY

 

So you have your high poly sculpting, it would be great if you could just throw that in a game engine and force it to run on your best buy laptop, unfortunately, the world is not that blue, (yet), in order to maintain the detail level of your sculpting but with low resources usage, you’ll need to use a low poly model.

next gen asset

Why retopology?

Since you sculpted, your model probably changed a lot from the shape of the base model, if you try to bake a normal map using them, you’re gonna have a bad time.

In order to fix this, we have retopology, where you basically redo all the modeling following the newer shape of the sculpting.

It sounds terrible, and it actually is! :D

next gen asset retopo

But we have some tools to ease this burden, we can snap our mesh to the sculpt making life a lot easier, and we have some other tricks that will be discussed below:

Decimate: An algorithm that will try to merge surrounding vertices without changing the overall shape.

Pros:

● Fast

● Works well with organic (not for anim!!!)

● In some cases, can reduce drastically the polycount while maintaining the shape

● Can be very accurate to the silhouette if not used in an extreme way

Cons:

● Will give you a poor topology

● Tons of triangles (no good for animation-ready models)

● A handmade retopo usually will give you better results

● If used in an extreme way, can cause artifacts in the mesh

● Harder to properly unwrap and texture

● Transforms you into a lazy guy

 

next gen asset decimate

There are a reasonable amount of softwares that can do that, some better than others. Zbrush, Mudbox, 3D-Coat, Blender, all have their Decimators, so it should be easy to try them out.

A Standard Procedure:

If your base mesh doesn’t differ that much from your sculpting, you can just tweak your base mesh to become the low poly, this is still valid if you did some kind of hard surface modeling and will bake from that, you can just duplicate your high poly and delete some edge loops until you are happy with it.

next gen asset

 

You can look at the concepts depicted in the Modeling part, the same guidelines there serves here as well here.

Plugins to optimize Retopo Workflow:

A great manner to enhance your productivity (not only in retopology) is the use of addons/scripts to aid in development. Why do you think big studios have large R&D Teams? ;) In Blender we have the awesome RetopoFlow addon by CGCookie

Always look for new ways to improve your workflow, hopefully you can even save a bit more time to sleep at night!

Tips:

- If you don’t want to have errors in your bake, it should be good practice to put some bevels on the extreme corners that go from 90 degrees, as the normal rays are cast through the average angle of the surrounding vertices, if you have normals that are facing perpendicular, this will cause gaps in the projection, causing that famous error in your edges :D

- Sometimes adding a little extra geometry can fix up hundreds of normal errors, don’t be afraid, 20 more polygons hardly will hurt you that much

 

STEP 5 – UV UNWRAP:

 

Yay, the step that everyone hates! Unwrapping means that you will take your model, and cut it like if you were transforming your 3D model into pieces of paper for someone to assemble, like papercraft.
People usually don’t like to unwrap because they’re not sure on how to do it, once learned (you’ll probably stay hating it anyway) but at least you will know what you’re doing!

What makes a good unwrap?
The essential factor on the UV quality is the correct placement of seams and the low distortion on UV Islands, at first this can seem a bit overly complicated, but in fact it isn’t!

next gen asset uv map

From here, we’ll see some tips and good practices to achieve a good uv unwrap/layout:

First step is to find places where the texture will differ sharply from its neighbours, take as example a television, the glass display has nothing to do with the plastic or aluminum case, then on the border between those two should have a seam!

Looking for places where we will have different materials is a good starting point!

next gen asset seams

Another thing is the angle, if your mesh has an edge with an angle with around 90 degrees or more, that could be a good place to put a seam too! But each case is unique, if you would unwrap a box for example, you wouldn’t put a seam in every corner, the less seams you have, the better it will be for you to texture it later, hiding seams can be annoying, so try to find smart places to have them!

In the end, the job of UV unwrap is to have a two-dimensional representation of your mesh, so you can texture it, and the job of the seams is to cut the model in a way to avoid distortion.

With that said, in Blender we have some tricks to ensure that those topics will be covered, let’s take a look:

Stretch:

In Blender we have this cool feature inside the UV Editor, with stretch we can see how much distortion our mesh has, and we can also see where!
To activate Stretch, you just need to open the Properties panel (N) in the UV Editor, and toggle on stretch.

next gen asset uv stretch

Now use it as a guide to see the parts that need more love, how you can tweak the UVs to fix stretching we’ll see in the next item:

Align/Straighten tool:

Instead of selecting the vertices and manually scaling them to align in an axis, we have a tool inside the UV Editor that can do it semi-automatically for us!
Just press (W) in the Editor to open the Weld/Align menu, then you can use Align auto to align the selected vertices in the axis they are!
With straighten you can select a chain of vertices and straighten it in a diagonal for example!

next gen asset align auto

next gen asset align

 

Pin Vertices: Key tool on the pipeline!

With pin vertices you can freeze the vertices that you already unwrapped, aligned and correctly stretched, that way, you can continue doing re-unwraps and the pinned vertices will not get unwrapped again! Awesome.

Just press (P) with the desired vertices selected, to unpin them, press (alt+P)

 next gen asset uv pinning

 Alright, we talked about the tools, now lets talk about concepts!

In a game asset texture map, you want to use as much space as you can, therefore it is REALLY IMPORTANT to spend extra time figuring out how to extract the maximum area from your UV space, the larger your UV islands are, the higher the resolution will be for that specific area, so it’s a good idea to put the main visible & detailed parts of your mesh into large chunks of the UV.

A thing that I do with my UV’s that I think helps a lot with using your UV space a bit more optimally is to select all the uv’s and scale them up!

Now, find a way to fit all the islands back in! ;)

This is funny and I swear, it’s my favorite part! It’s just like a puzzle.

A technical detail valid to take note: When you unwrap your mesh, the place where you have the seam will have its vertex count duplicated when read by an engine!

If you have ever used an edge split modifier you will know what I mean, with edge split, we use it to have sharp edges, but in the end what it’s doing is just splitting your edges (as the name said, duh), and you end up having 2 vertices at the same place. The logic behind the seam is similar, so it’s widely recommended over the internet to have sharp edges in the UV seams, this can avoid a lot of bake errors, trust me! (Here’s a quick video from Handplane with further info on the subject… )

 

In Blender to create sharp edges we can follow these steps:

First lets create your final seams. Clear them all with ctrl + E > clear seam with all edges selected.
This is just so your seams correspond to the islands you have in the editor!
From the UV Editor, go to UVs > Seams from Islands.

Now we need to sharpen those seams, go to Edge select mode with a seam selected and use Select Similar (Shift + G) > seam.
And just make these edges sharp by pressing Ctrl + E > Mark Sharp.

To make that actually sharp, now you’ll need to use an Edge Split modifier, just select it, uncheck Edge Angle, and leave Sharp Edges. ;)
Then all the rest should be set to smooth.

next gen asset sharp edges

This is just my way to do it that has proven to work in my workflow, other people can have their own methods, but that is what has given me the best results so far.

So, it seems that you have your model ready to be baked!

 

STEP 6 – BAKE

 

And finally the most feared part of a pipeline, bake and hope that everything goes well, Baking is certainly one of the greatest headache magnets up to this date, you can spend a good time just tweaking values and… waiting……….78%……………

It took me a really long time to finally realize how to properly bake things without cheating in Photoshop and painting some “good normals”, so lets take a look at how this can be done:

The first thing you’ll need to know is how to properly export your low poly mesh.

Select your model > Export > Obj

blender obj export settings

Now here comes the secret: In order to have sharp edges in blender you’ll need the Edge Split modifier, but if you apply it your mesh will become split along the sharp edges, and this is not what we want.

So in order to export the mesh with sharp edges but still keep them welded together we can use these settings on the exporting menu!

So just export it with Smoothing Groups and Keep Vertex Order assigned, and dont forget to deactivate the edge split modifier when exporting, otherwise it will separate your mesh!

Now you have the low poly 100% ready to be baked!

Next thing you’ll wanna do before we hit bake is to create a Cage mesh.

FAQ

Q:”What is that?”
A: From Blender Wiki:
” A cage is a ballooned-out version of the lowpoly mesh created either automatically (by adjusting the ray distance) or manually (by specifying an object to use). When not using a cage the rays will conform to the mesh normals. This produces glitches on the edges, but it’s a preferable method when baking into planes to avoid the need of adding extra loops around the edges.”

So basically a cage is a “fat” version of your model, that will serve as a guide to the rays that the bake will be performing, using a cage can fix around 80% of your bake errors when setup right!

So let’s make a Cage!

Just duplicate your low poly mesh, enter in edit mode, then select everything and hit (Alt + S), this will perform a Shrink/fatten, with that you can “inflate” your mesh based on normals in a manner that simply scaling can’t.

next gen asset bake cage

 

To get the perfect bake, sometimes you’ll need to create a cage multiple times, using different sizes, until one of them just “fits perfectly”, worth the price!

So all right!

Now everything you need to do is to export everything to the baker of your choice!

For the tombstone, I’ve used xNormal, since for me it’s the faster baker for CPU that I have ever used, it’s very easy and straightforward to use:

  1. Load your high poly

  2. Load your low poly

  3. Add your cage

  4. Bake! :D

 

next gen asset xnormal

 

 Xnormal is a free bake software for Windows developed by Santiago Orgaz, you can download it from here.

You have an infinite amount of maps to choose here, some of them can be very useful for texturing, especially: Ambient Occlusion, Cavity and Curvature.

Ambient Occlusion is the ambient light shading, helpful for using as a base for texturing, you can also invert and/or tweak it and use it for endless things e.g. as texture damage, tear, and the list goes on.

next gen asset ao bake

Ambient Occlusion Map Example

Cavity is a more refined ambient occlusion, as the name suggests, showing up the model’s cavities, you can use it to define your model even further, and accentuate the sculpture, or invert it and use it for a million other things too.

next gen asset knald cavity bake

Example of a Cavity Map baked on Knald

Curvature is great to create highlights on the edges of your model or dirt, and is mostly used to add some edge damage, scratches and so on, as this is a creative process, you can literally use your imagination to use these maps to what your insanity leads to.

next gen asset curvature

Dual color curvature map from xNormal

Note that a Curvature can be a concavity and/or a convexity map, since both mixed together are the proper “curvature map”, that´s why we have two colors on this map, convexity in red channel and concavity in green channel.

With concavity you can use it as a mask in your image editing software of choice to create dust and accumulated dirt, and with convexity you can simulate worn edges for example.

next gen asset convexity bake

Convexity Map extracted from Knald

If you did everything right, you should have a pretty neat asset almost finished right now!

next gen asset normal

In case you’re still getting normal map errors, check out your model, and review the steps back.

If the errors persist, I have some tips:

Explode: This is a very standard technique in the field, sometimes you can be trying to bake a form that is very complex to deal with and your bakes come with errors as you may have some pieces that overlap the rays, so these meshes overlap each other resulting in artifacts projected into the mesh.

To solve that, you can explode your mesh, that basically consists in separating the objects that may be causing that overlap, as the only thing that matters when doing a bake is the textures, you do not need to worry about this, just find the best way to project your normals without intersections, and you should be fine.

(don’t forget to explode your high poly as well, after all, the low and high poly need to be exactly in the same space, right?)

next gen asset explode

Exploding pieces by scaling their center points (“alt + ,” to activate)

Tesselate: What you really need to care about when doing bake is your final textures, so be free to modify your low poly bake mesh in any way you think that should work to make a better bake.
A good idea is to do a simple subdivision on your low poly just to increase the vertex density, that way, the average of your normals will be much more accurate, and can save you in a lot of situations. A great video showcasing this technique, by Peter Kojesta

 

STEP 7 – TEXTURING

 

To texture this tombstone I’ve used dDo, a plugin for Photoshop which in my opinion is one of the most useful applications out there, you can almost get a mind-blowing next gen texture bundle with the press of a single key, amazing!

And if you want to give a try, they are offering their legacy versions for free! check it out!

next gen asset dDo

As in blender, we do not have a physically based realtime renderer yet (but it seems like the future for this year holds great things regarding this matter!), so I’ll show here the final model rendered in Marmoset Toolbag, using a PBR pipeline:

Riddley’s Tombstone by Guilherme Henrique on Sketchfab

With Unity and Unreal Engine recently becoming free, we now have a wider range of possibilities on PBR workflows, you have no more excuse to not learn it! (unless your desktop is awful, like mine.)

 

STEP 8 – SETTING UP ON BGE

 

And here, let’s take a look at how it should look in the BGE:

next gen asset blender

I’m just using a Diffuse (albedo + ambient occlusion), Specular and Normal map here, the lights plays a BIG role on the overall look in games in general, pay double attention to that!

FAQ:
Q: Albedo, what’s that?
A: Albedo is the base input color, just like a Diffuse.
The main difference between them is the lack of directional light or ambient occlusion in albedo, as is designed to work in a physically based environment, the directional light would look incorrect in certain light conditions, and the AO will be added later on a separated slot.

Technically and scientifically speaking: Albedo is the color of something with no influence of any light, or as if the object would be seen if it had perfect 100% white light shining through every atom of it. That’s why if you look at the albedo texture alone, it’s usually kinda flat.

Now, just add some meshes, some lights & magic and go make your own game!

 


 

Hope I could clarify some doubts about the general asset pipeline, and hopefully helped in our long quest for the perfect bake!

If you want to take a look on the other models I’ll be doing for the game and know a bit more about the game we are making, don’t forget to subscribe in our dev blog!
http://blog.meltinglogic.com

 

If you find this article useful, spread the word, share!
And keep extruding, Cheers!

Written by Guilherme Henrique

 

Some (mostly free) golden resources:

 

Free PBR Game Engines:

https://unity3d.com

https://www.unrealengine.com/

PBR Education:

Marmoset

Bakers and Texturing stuff:

http://www.xnormal.net/

http://www.quixel.se/dev/index

knald

Awesomebump

Mesh Decimators:

http://meshlab.sourceforge.net/

RETOPO >

CGCookie’s ReTopoFlow

Sculpting apps:

http://pixologic.com/sculptris/

http://www.blender.org/ (well, who knows :P )

Image Editing & misc:

http://www.gimp.org/

https://krita.org/

http://mypaint.intilinux.com/

Brushes, stencils, etc:

http://pixologic.com/zbrush/downloadcenter/alpha/

http://www.asilefx.net/catalog/product_info.php?products_id=120

http://texturearchive.com/ZBrush.aspx

http://texturearchive.com/ZBrush2.aspx

https://area.autodesk.com/mudboxcommunity/library

Environment Maps for IBL (EXR):

http://www.hdrlabs.com/sibl/archive.html

http://www.hdri-hub.com/free-samples

http://www.openfootage.net/?cat=15

Textures:

http://cgtextures.com/

http://mayang.com/textures/

http://texturemate.com/

http://freestocktextures.com/

http://www.textureking.com/

References & Inspiration:

https://pinterest.com/

http://bestcginspiration.tumblr.com/

http://www.itsartmag.com/features/category/inspiration-2/

http://www.3dtotal.com/index_tutorial.php

Great learning resources for game art:

http://www.polycount.com/forum/forumdisplay.php?f=43

http://wiki.polycount.com/wiki/Polycount

http://www.marmoset.co/toolbag/learn/pbr-practice

Sites to obviously put at bookmark:

http://www.cgmasters.net

http://blog.meltinglogic.com

http://www.blenderartists.org

 

Written by Guilherme Henrique


Viewing all articles
Browse latest Browse all 28

Trending Articles