Importing 3D assets and building levels in Unity

Welcome back to the Lunar Lander series of tutorials on unitycookie.com! In this Unity video we’ll be going over how to import all your custom assets, and use them to build up your game levels in Unity. We’ll also take a look at specialized mesh colliders for complex shapes, ambient lighting, faking a background, and few other nifty things that will really help with this, and future, game making.

Also, I’ve decided to go ahead and provide all the real, much awesomer, painstakingly-hand-crafted models that will be in the full Mine Lander game once I launch it. You can even feel free to use these models however you like, just please credit me is all I ask. Of course, if you created your own, more power to you!

What is covered in this tutorial:

  • - Importing custom meshes and textures
  • - Creating materials for your custom assets
  • - Advanced use of colliders for complex shapes
  • - Ambient light
  • - Building your Lunar Lander levels
  • - Adding your level to the “Build” menu

Play Lunar Lander:

Lunar Lander<>

Discussion

28 Responses to “Lunar Lander 02: Importing Assets and Building Levels”
  1. Posts: 5

    Finaly!!!
    I realy waited for 2sd part :)

    #
    1
    Mar 3, 2012 at 1:13 am
  2. awesome!!!

    #
    2
    Mar 3, 2012 at 5:28 am
  3. Posts: 35

    I must say Gabriel that “good organization” seems to be a very important in the building and set up.

    I think I may have a number of questions – mainly about optimization – after I go back and view the tutorial again, but right now a simple one:

    The built in “plane mesh” has 10×10 quads – so are there benefits or drawbacks to importing a plane with a lower poly density?

    And as the landing pads all have the same material, can they be combined/batched to reduce the draw calls?

    Only been playing with Unity for a month, but you and Patrick have made it so much easier!

    gryff :)

    #
    3
    Mar 3, 2012 at 10:20 am
    • Posts: 268

      Hi Gryff- definitely true that the built in “plane” is very slightly less efficient than importing your own, with less verts. However the extra verts are handy if you intend to use simple “vertex lighting”, which is the real frame-rate saver. In any case, it’s almost always better to just import your own, possibly even different sets with varying poly count.

      The landing pads should be automatically batched, yep!

      Good to hear the tutorials are helping :)

      #
      3.1
      Mar 3, 2012 at 10:50 am
  4. Great tutorials – i am seeing that there are times that changes are to be made to all say objects/shaders in the project window then over to the inspector side is there no whey to select all to make the same changes in 1 shot?or make the change and then duplicate it?as to be a time saver.The more about file managment and setup the better for without a good foundation or knowing the next level beneath the current one i would be lost in space.A landing pad with a powerstation on it___powerpad how much is a gallon of space fuel $15.99 …The more detail (deeper) on each item and why the better.The more i am learning.I am going to watch all the tuts and then start my game as i am new to unity still storyboarding with my 13 yr old son .

    #
    4
    Mar 4, 2012 at 7:36 am
    • Posts: 268

      Hi Ballistic- Actually, you are right! See, the things you can learn just by messing around with the engine. Looks like you can now (not sure when the change happened) select a variety of items, and any properties they share can be edited at once in the inspector. Super-duper useful! Thanks for the headsup!

      #
      4.1
      Mar 4, 2012 at 2:01 pm
  5. Posts: 13

    I’m gonna use this technique to remake asteroids!

    #
    5
    Mar 13, 2012 at 7:45 pm
    • Gary Parkin
      Posts: 33

      Let us know how you do on it. As I was watching version 3, I was thinking asteroids.

      #
      5.1
      Mar 14, 2012 at 11:44 am
  6. Gary Parkin
    Posts: 33

    I’m loving this. I tried the actual game and it doesn’t feel right. Too much gravity. I’ll have to watch #3 and see how to lessen it.
    Yes I AM old enough to remember spending all my allowance in quarters. :)

    #
    6
    Mar 14, 2012 at 11:03 am
  7. Posts: 6

    @Gabriel williams i didn´t understand why you are not using the original mesh of the astroid as the collision mesh. when you click “convex” of course the mesh looks strange, because it get´s changed into a convex shape. But if you disable the mesh renderer you will see that the original mesh of the astroid used as a collision mesh fits perfectly and also works when tested with objects. I put a picture in my gallery and look forward to your feedback.

    have a look:
    http://cgcookie.com/unity/images/collision-mesh-comparison/

    #
    7
    Mar 23, 2012 at 3:40 pm
  8. Posts: 268

    Hi Multitude-

    Collision meshes are best kept as absolutely, super, simple as possible. When they are non-convex or too many faces, it can make a significant impact on a game. In this case, it probably doesn’t really matter since there’s no dynamic/constant collision going on, you just hit and go kaboom, but just in case. It can make a big difference in performance!

    #
    8
    Mar 24, 2012 at 12:12 pm
    • Posts: 6

      Thx for your reply. that makes a lot of sense now. i didn´t understand why it has to be simple and convex. great tutorial – love the game!

      oh, one more question: is there something like spacescape for mac?

      #
      8.1
      Mar 26, 2012 at 8:28 am
      • Posts: 268

        Ach, I’m so slow to respond lately- spacescape for mac…not that I’ve been able to find, sorry :(

        #
        Mar 30, 2012 at 1:25 pm
  9. Posts: 5

    Regarding all the tedious word: why don’t you just use the new multi select/edit feature of v3.5?

    #
    9
    Mar 26, 2012 at 3:40 pm
  10. Posts: 5

    At 23m:12s you talk about your powerstation glow/ illlumination map which resides in the alpha channel and thats not visible but you can by clicking on the rgb button just right from the “preview” text in the same screen (right below in the inspector of the texture). Very handy!

    #
    10
    Mar 26, 2012 at 4:10 pm
  11. Posts: 268

    Janoonk- you are totally right on both counts! Way to call me out, haha ;)

    #
    11
    Mar 30, 2012 at 1:26 pm
  12. Keystar
    Posts: 1

    That was a great tutorial, it was really useful!! I was really interested by the different shaders, but I was wondering if there was a way to script your own shaders, such as a toon shader like you get in blender?

    #
    12
    Apr 15, 2012 at 9:53 am
  13. just don’t understand why, but to me it’s possible to watch just the initial 20 to 30 seconds, afterwards the video just stops -.- both “episode” 1 and 2, didn’t check the others but i’m pretty sure they wil do me this same joke! if i watch the video on youtube i find no problem at all!
    it’s not a big deal, but still it’s quite a pain (you know where) to jump from unitycookie to youtube everytime!

    #
    13
    May 15, 2012 at 10:42 am
  14. Dan Rod
    Posts: 2

    Nice work Gabriel, awesome tutorial! Providing we use our own assets, Do you grant permission for commercial use?

    #
    14
    Aug 23, 2012 at 9:10 am
    • Posts: 268

      Of course! :)

      #
      14.1
      Aug 23, 2012 at 10:44 am
      • Dan Rod
        Posts: 2

        Thank you for quick reply. Keep up the awesome work! :)

        #
        Aug 23, 2012 at 11:02 am
  15. Posts: 2

    Hi Gabriel – awesome tutorials so far. I was hoping to be able to make my own models to go along with this tutorial so I’ve hopped into Blender but I really don’t know where to start. Can you recommend a good video guide on blender cookie as all the stuff on there seems a little advanced for me but the “getting started” guide seemed a little too basic. I couldn’t really find anything in-between. Are you likely to be doing your own videos covering this at some stage?

    #
    15
    Dec 1, 2012 at 8:33 am
  16. Posts: 1

    Hello, I just started going through some of the tutorials here and found that this one doesn’t seem to have the same files that are in the video. i.e. the “Landing Pad” folder only contains “Materials” and PowerStation.fbx, so it’s missing the rest of the folders. Also, the asteroids look nothing like what’s in this video. Is this intentional?

    Great videos so far guys, really learning a ton.

    Thanks,
    J.H.

    #
    16
    Mar 17, 2013 at 9:24 pm
    • Posts: 268

      Hi Joshua- this is because each tutorial has only the “starting assets”. If you want to grab all the items I created, just download the files from the next tutorial. :)

      #
      16.1
      Mar 17, 2013 at 10:33 pm

Leave a Comment

You must be logged in to post a comment.