Monday, October 8, 2012

Adding a 2nd Material slot for an asset (like glass!) for UDK

The goal here is to create a 2nd Material slot for our object so that we can create 2 materials inside of UDK - 1 for our regular texture / material for our asset, and the 2nd material for glass.

To begin with, I have an Iron Lung asset I want to add glass to. Here's the asset inside of 3ds Max:



Notice I have modeled the glass and it is simply floating in place with a standard "blue" material I slapped on it. The rest of the object is unwrapped and attached properly. I now have 2 objects in the scene - one for the glass, and one for everything else.


I also have UV'd both the regular prop, AND the glass as though they were separate. Here's the Iron Lung UVs:


And here are the UVs for the glass:


Next up - Attach everything together so that you now have ONE asset, with both the "regular" prop and the glass attached. When this happens, if you add another Unwrap UVW modifier, you will see both "parts" UV's on top of one another. Don't panic - this is fine:


The last step to get it to work "right" is to select all of the Polygons of the glass (or Elements) and Assign a brand new, random texture to the faces. It doesn't matter if it's your "proper" glass texture, or a picture of you from Facebook - SOMEthing needs to be applied to the glass. You can wait for final textures once it's in Unreal, but an actual texture needs to be applied. A colored material slot won't work. Here I've gone ahead and applied a random picture on my desktop to the faces of the glass:


Export the model from 3ds Max just like normal, and import into UDK the same as you normally would. If done correctly, when you open the asset up inside of Unreal, you should see 2 material slots as opposed to the traditional 1. One will be for your glass, the other for your asset. Simply UV, texture, and create materials accordingly for both material slots and plug them in to the necessary location:



And just like magic, you should now be able to create a sweet material for both of your different material slots. Huzzah.




Saturday, October 30, 2010

Excellent materials and specular tutorials! Must read!

Here are a few blogs / posts around the intarwebs you should bookmark and check out.  Some great info on materials and specularity!

http://www.philipk.net/tutorials.html

http://www.manufato.com/?p=902

Wednesday, June 23, 2010

Great texture tips

Check out these great writeups on some excellent texture tips.  These are an oldies but goodies!  Bookmark!


http://features.cgsociety.org/story_custom.php?story_id=4678
http://www.game-artist.net/forums/spotlight-articles/42-tutorial-hard-surface-texture-painting.html




Remember - you can always find great texturing tutorials over at 3dmotive.com!

Friday, April 16, 2010

Wealth of information regarding High Poly modeling and normal mapping theory

You will want to bookmark these links!

http://wiki.polycount.com/wiki/Normal_map

And here's another awesome wealth of info as well.

Click me!


Ever want to learn more about high poly modeling? Be sure to check out friends over at 3dmotive. They've got some good ones too! Go learn!

Wednesday, April 14, 2010

Creating a 2nd UV channel and setting up your lightmaps in Unreal

Having a good, clean 2nd UV set is ideal for setting up a high quality lightmap inside of UDK.

I have created a video posted over at 3dmotive to help you with the process of copying your first UV set into your 2nd UV set, as well as some "do's and don'ts".  You can find this tutorial here:

http://www.youtube.com/watch?v=BY-nKxyHKRc

Hourences has also saved me the trouble of completely re-writing this tutorial.  This will guide you through additional steps and the process behind setting up your 2nd UV channel and lightmaps inside of Unreal.  (FYI, there is no reason to apply a material to that second UV channel when it comes to lightmaps...)

You can find his written tutorial here:

http://www.hourences.com/book/tutorialsue3lightmap.htm

Bookmark these!

Monday, March 15, 2010

Don's Workflow steps for making a high poly game asset.

I am constantly bombarded with issues of "My normal map bake didn't work!" or the final result being messy.  If you want to succeed at baking normal maps, start with these step-by-step rules FIRST, and if you decide to deviate from them, have a good reason for doing so.

There are more than enough ways to skin a cat, but these methods work for me and I very rarely ever have any issues with my normal maps or high poly objects.  ALWAYS be saving versions and iterations of your files.  3ds Max has a mission to crash on you when you least expect it, so SAVE OFTEN.  This list assumes you are using UE3 or UDK as well.
  1. Block in your high poly object FIRST.  It's a lot easier to get the silhouette and scale issues taken care of before you start committing to making high poly work.  This is a rough pass to block in the overall shapes and scale of the majority of your surfaces.
  2. Make an awesome high poly object, keeping the Turbosmooth modifier on your stack when using it.
  3. Finish it up with creative details as needed.
  4. Make a new layer in 3ds Max and add all of your high poly to it.  Name it Original High or something so you can keep track.
  5. Select ALL of your high poly work, hold down Shift, and Move it in a direction in Orthographic view to copy all of it.  This will make it easier later when we want to rebuild our low poly.
  6. Now that you have a second version of your work, add this to a new layer in Max and call it Exploded HIGH.
  7. Hide the Original HIGH layer.
  8. Next up, "explode" your high poly pieces into manageable, individual chunks.  This step is to address each chunk of what pieces you will be making a low poly object out of eventually.  Obviously the more pieces you have the more triangles the final versions will be, but the more accurate it will be to the final object.  Use according to your discretion and budget.
  9. Next, copy each of these chunks (Control+V) and remove the turbosmooth modifier from each of them.  As you are doing this, add each of these new objects to a new layer named Exploded LOW.  This way, we can use the geometry we created from our high as the base for what will be our final low poly objects.
  10. Clean up all of the edge control edges from your newly created low poly objects, and attempt to match the silhouette of the low according to the high poly.  Remember - the closer you can match them, the more likely you are to get a better normal map.  Keep your triangle budgets in mind.
  11. When you are done at this point, you should have 3 layers - Original HIGH, Exploded HIGH, and Exploded LOW.  The exploded layers should contain two types of objects - a nice clean high poly model and a low poly object underneath of it matching the silhouette as best as possible.
  12. Make sure you are addressing any polygon with more than 4 vertices.  If you don't do this, Unreal will do it for you which can be bad.  Avoid Ngons or "T-bones" as well.
  13. Once all of your low poly objects are complete and you have closely matched the silhouette as best as possible, hide the Exploded HIGH layer.
  14. Now that you have JUST the exploded low poly objects onscreen, select ALL of them and Right Click > Convert to Editable Poly just to ensure there are no modifiers left behind.
  15. UVW Unwrap each of your individual low poly pieces.  As you go through unwrapping each of them, move your UV chunks randomly off to the side anywhere in the UV window.
  16. Select ANY of the low poly objects and use the Attach function to attach ALL of your low poly objects together.
  17. Now you should have 1 single low poly object.
  18. Reset X-Form on the object.
  19. Select every face and make sure it has Material ID #1 only as well.
  20. Apply an Unwrap UVW modifier again and pack your UV's. The usual rules apply about UVW mapping.
  21. Once your UVs are packed, make sure you don't have ANY inverted or overlapped faces on the 0,1 space.  See my blog below for how this process works and some workarounds for overlapping / inverted faces.
  22. Collapse to an Editable Poly.
  23. Unhide the Exploded HIGH layer.
  24. With your low poly object selected, bake normal maps as normal selecting all of the objects in the Exploded HIGH layer.
  25. I prefer the Catmul-Rom filter with Supersamples turned on, using Max 2.5 Star for tests, and switching my Supersampler to Hammersley for my final bakes.
  26. Once you have baked everything, it is safe to hide the Exploded HIGH layer.
  27. From here, I duplicated the low poly object one more time into a NEW layer called Final LOW and move it off to the side along the same axis of my Original HIGH geometry.
  28. Explode your single object back out into individual pieces once again.  I highly suggest the "Explode!" script that I have listed below in this blog.
  29. Apply your normal map to the object and check or any weirdness or smoothing on the pieces of this object.
  30. The reason for re-exploding our object back out, is that now we can easily use the Align tool in 3ds Max, unhide our Original HIGH objects and quickly align our newly exploded low poly pieces to the original high poly model without having to re-create it with element mode.
  31. Once all is aligned, hide the Original HIGH layer and you are done.  You should have a perfectly aligned normal baked low poly object in the same worldspace as the original high.
  32. As an added step, I will copy all of the re-assembled low poly pieces into yet another layer, and call that Final Collapsed LOW and attach all of the final finished geometry together before baking AO / exporting it to the game engine.
  33. Drink a beer. Make some textures.


Friday, February 19, 2010

Accurately offsetting overlapping UV chunks in 3ds Max


In many cases when baking textures, (AO, normal maps, etc) 3ds Max sometimes doesn't like the idea of overlapping UVs.  The following steps can show you how to quickly identify your overlapping faces, and accurately move them outside of the UV space required for baking.


The thing to remember is that it won't matter if your UV islands are outside of the box when rendering or putting this into a game, because of how the UV coordinates tile.  BUT, when baking, sometimes you can get bad results if your faces are overlapped in the 1,1 UV space.



Step 1 - Save and backup your work always.


Next, you should identify what faces in your mesh actually ARE overlapped.  Remember - at least ONE of your UV islands should still be in the UV window, but all the other overlapping copies can be moved outside the UV window.




After you have identified what faces actually are overlapped, the next step is to leave at least one UV island in the window, and move the overlapped faces off to the side.  One quick trick that I do, is simply click ONE of the UV islands with "Select Element" turned out, then HIDE that face so that we can manipulate the remaining overlapping UV chunks and have one "safe" UV chunk left behind.




With a single UV island left behind, the last step is to move the rest of the UV chunks off to the side.  To do this, follow these steps:




Be cautious to do it in that order, and avoid scrolling your mouse wheel or clicking anywhere else, as this dialog box can be finicky at times.  When you are finished, you should have one clump of overlapped faces off to the side, and if you Right Click > Unhide All, your original "safe" face should be left behind.  All done!



Wednesday, November 4, 2009

Introduction to 3ds Max 2010 - High Poly Modeling

Quick, free tutorial video I shot awhile back on the subject. You can see my full tutorial at 3dmotive, but here's a brief overview of the tools for the sake of my class:

http://vimeo.com/7430823

Wednesday, October 28, 2009

New video blog - Basic normal map projecting - Lesson 1

Check out the video for the basic introduction to the baking process for normal maps.  I cover the entire process from start to finish for baking high poly geometry normal map information down to a low poly.

http://vimeo.com/7305572

Sunday, October 4, 2009

Getting started with UDK - Bringing your mesh into the Engine

First and foremost, make sure you have downloaded the latest version of UDK.  It is free of charge, and can be found here:

http://www.udk.com

Next, our good friends at 3dmotive.com have provided an in-depth tutorial for the basics of importing content into UDK.  You can find the (free) video tutorial by following this link:

http://www.youtube.com/watch?v=iXoG2kNe5Ok

If you have questions, don't hesitate to ask!

-Don

Using and installing the Normal Map filters for Photoshop

For those of you using Photoshop, click here for the link to download and install the nVidia Normal Map filter.

Once installed, you should be able to run the filter in Photoshop as needed.  Here are the basic settings that I use to get started with normal map settings.  Feel free to adjust them as needed.




You can also download the xNormal filter here - http://www.xnormal.net/Downloads.aspx


Once you are inside of Photoshop, you will find the xNormal filter under Filter > xNormal > Height2Normals.  Here are some of my basic settings for "average" hand painted normal map stuff.  When playing with the amounts in xNormal, don't forget to keep clicking the "Update" button to see a preview of your changes.



Monday, September 28, 2009

Your Portfolio Repels Jobs.

If you are interested in setting up a portfolio or are currently wanting to improve your chances of landing a job in the Gaming Industry, this thread is required reading:

http://boards.polycount.net/showthread.php?t=39516

Script - Explode Elements back into individual meshes

Ever find yourself having attached a bunch of stuff together and wanted to go back and re-explode the mesh?
Do you hate having to find each individual Element and clicking "Detach" a thousand times?  This script fixes that.
  • MAXScript > New Script.
  • Copy / Paste the text below into the blank page.
  • Press Control +A to select all of the text.
  • Left-Mouse click and drag this into your custom Toolbar.
  • To rename your button / change the icon, Right Click the button > Edit Button Appearance...
  • To use - Select your mesh, and press the tool button and then press Detach! which will break all of your elements back into individual objects.
  • Rejoice and be glad.


(



(
(
rollout rolTest "Detach Elems"
(
   button btRun "Detach!" width:90 align:#center offset:[0, -2]

   function detachToNodes oPoly =
   (
       if (classOf oPoly != Editable_Poly) then
           throw "Wrong input in function: detachToNodes()"
       
       local iNumFacesLastElem = 0
       local baElemFaces = #{}
       local sName = ""
   
       while (true) do
       (
           baElemFaces = polyOp.getElementsUsingFace oPoly 1
           sName = uniqueName oPoly.name
           polyOp.detachFaces oPoly baElemFaces delete:true asNode:true name:sName
           
           if ((polyOp.getNumFaces oPoly) == 0) then
           (
               delete oPoly
               exit
           )
   
           if (keyboard.escPressed == true) do
               throw "** escape key pressed **"
       )
   )

   on btRun pressed do
   (
       local currSel = selection as Array
       
       for obj in currSel do
           if ((classOf obj) == Editable_Poly) then
               detachToNodes obj
   )
) -- End Rollout

createDialog rolTest 96 27 style:#(#style_toolwindow, #style_border, #style_sysmenu)
)
)
)

Setting up your prop for a decent render

If you want to showcase your model with a render from 3ds Max, there are a few things you can do to improve the overall quality of the render so that it doesn't look so bland.  These are some basic suggested settings that should get you started.  Once you are comfortable with these settings, feel free to tweak them until you get something that works for you.

1.  Start by changing the render filter to Catmull-Rom, and turn on the Global Supersamplers.  (F10 to bring this menu up, under the Renderer tab)  The settings below are the settings I generally use:


 2.  Next up, lets create a ground plane so that we can get some shadows for our object.  Start by creating a Plane, and place it directly underneath your prop.  It doesn't matter how many iterations or edges it has, and the size only needs to be a bit bigger than the object, so that any shadows that are cast onto it can fit.

3.  Once you have made the plane object, choose an empty Material slot in the Material browser, click the "Standard" button and change this to "Matte/Shadow", and apply this to your ground plane.  This material tells the ground plane to receive shadows, but will not be seen once we go to render the scene.


4.  The next step is to create a Light to shine on your object.  Under the Standard Lights, create a Target Directional Light and aim it at your prop.  Here you can adjust the color, multiplier, (which is the light brightness) as well as the Hotspot and Falloff settings.  You want to ensure that the beam fully covers your object.  These are my settings for my light:

 

5.  Once I have created my first light, I generally like to copy that light and have it pointing somewhat in the opposite direction.  (Select the light, and hold down Shift and drag it across to copy it)  This will ultimately be used to offset the light intensity and keep us from having pure black shadows.  This is a basic 2-point light setup.


6.  Once the two lights are in place, I will open the Light Lister (On the main Tool List, choose Tools > Light Lister)  From here, I can manually adjust my lights without having to go back and forth in the scene.


7.  With the light lister open, I will adjust a few things - I turn Shadows on for the primary light and increase the Map Size resolution, ensure there are NO shadows for the secondary light.  Also, you want to change the multiplier so that they aren't casting the same amount of light.  I generally do at least half brightness (or less) for the secondary.  I also give my lights a little bit of subtle color (don't over-do it!)

  

8.  That's it!  Frame your object and render.  Feel free to adjust any of the light brightness or colors to improve your renders...but you should have a nicely lit object in your scene with shadow casting.




Wednesday, September 23, 2009

Floating geometry VS. Closed geometry - Example triangle counts

3ds Max Workflow Video Tutorial 1

This is a tutorial video I made awhile back with a few tips and tricks to the interface for 3ds Max.  If you're looking for great 3ds Max tutorials - I cover a lot of this in my workshop document below, but if you prefer to watch a video instead, here you go!

3ds Max Workflow and Interface Tutorial Pt. 1

Monday, September 21, 2009

Create a simple Wireframe render for your 3d asset

1.  To begin with, save your scene as something else.  Call it "Wireframe_Render".  If something breaks, you can always go back.

2.  Select everything in your scene, Right-click > Convert to Editable Poly.

3.  Start by attaching all of your pieces together so that you have only 1 mesh.  You can do this easily by selecting any piece of your object and using the Attach function.


4.  Once everything is attached, create a new flat gray-shaded material and apply it to your object.  Give it a little specularity if you want for flavor.  To do this, open the material browser (hotkey M) and with your object selected, click the Assign Material to Selection button.


5.  Make a copy of your object and name it Wireframe_Object or something that you can remember.  To quickly copy your object, press Control + V with your object selected.


 6.  With your Wireframe_Object still selected, apply a Lattice modifier to it and adjust some of the parameters.  See the screenshot below for my settings.  (The Radius amount will differ depending on the size of your object)


7.  Apply a simple black material to your Lattice object, pose and render your image!  (Hotkey to render is F9)



Hope that helps!


Sunday, September 20, 2009

Free texture downloads! Visit these sites daily!

For your daily dose of free textures, visit these sites!

CGTextures.com

Mayang's Texture library

Keep in mind there is a daily limit on how much you can download, so get into the habit of getting all you can each day to build up your texture library!


Mental Ray - Ambient Occlusion walkthrough - 3dsMax 2011 and earlier

The entire AO baking process can be seen from the 3dmotive YouTube Channel here:

Click me!

When finished, you should have an AO map that looks similar to this one:




If it still doesn't work after watching the video, email me your questions and cite specific points in the video that don't make sense.

Photoshop "base" brush set

Here is a link to a Photoshop brush set I have collected over the years. It has a lot of good scratches, stains, and grime brushes all in one set.

To install, simply drag and drop this into your \\Program Files\Adobe\(Photoshop Version you have)\Presets\Brushes folder, and open it like you normally would in Photoshop to use the brushes.

Enjoy!


Modeling for Games - Week 1 Workshop notes!

For those of you interested, you can download the workshop notes that I cover Week 1 here!

Modeling for Games - Fall 2016 Syllabus

You can download the class syllabus for the Fall 2016 semester here! Click me!