Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Maxunderground news unavailable

Unity Mission; a true WIP thread
show user profile  mike_renouf
I have to produce a set of visuals for a new refurbishment proposal at work. I've done a handful of these in the last year, and they're relatively easy now I have a full library of geometry and shaders. This is the kind of thing:

 photo V4PTillpoint.jpg

So, rather than churn out the same thing once again, I thought I'd give myself a bit of a challenge. I have downloaded Unity and I'm intending to make a realtime walkthrough. Not having used Unity before this will be a learning experience. Here's what I've got so far...

I took the building drawing (existing and proposed) which looks a bit like this:
 photo Existing store in principle.jpg

I cleaned up the AutoCAD drawing so that everything is on just a handful of layers:
 photo 3D Prep - second try.jpg

Next made a project folder for everything and mapped Max and Unity to both use it:
 photo Project Folder Structure.jpg

Once the file structure is in place I attached the cleaned up AutoCAD drawing to a Max file and quickly built the shell of the building using Extrude, EditPoly and Shell modifiers:
 photo BuildingShell.jpg

To get the geometry into Unity I exported it to FBX and saved this into the Assets\Meshes folder. Unity then finds this file itself and allows you to create a prefab from it very easily. The prefab can then be dropped straight into the Unity scene. I did a few trips back and forth between Max and Unity to ensure that the UVW mapping was set up on the walls, then I was easily able to add some basic texture maps:

 photo UnityImport.jpg

More to follow...

read 698 times
11/23/2015 4:22:16 PM (last edit: 11/23/2015 4:23:20 PM)
show user profile  del3d
very cool. looking forward to see how it turns out.
read 672 times
11/23/2015 6:43:44 PM (last edit: 11/23/2015 6:43:44 PM)
show user profile  LionDebt
Seems fun! Especially now that unity ships with PBR natively. You're pretty much nearly there in terms of what unity specific stuff you might need to learn. It's a pretty straightforward process of dragging your assets into your scene, setting up your materials/textures and applying the mata to your objects. Import the first person player controller package and setup your "player".

Look forward to seeing this progress
read 650 times
11/24/2015 1:22:51 AM (last edit: 11/24/2015 1:22:51 AM)
show user profile  ijzerman
Cool thread, nice work Mike :)


Pushing buttons since "86
read 628 times
11/24/2015 11:21:17 AM (last edit: 11/24/2015 11:21:17 AM)
show user profile  mike_renouf
Seem to have come across my first stumbling block. Maybe someone can help me?

 photo Lamp.jpg

I made this lamp geometry, imported it and then tried to add a light component. As you'd expect, it adds the light at the origin of the lamp's mesh coordinates. This makes sense. Then if I change the lamp type from "point" to "spot", for some stupid reason the spotlight points upwards instead of down. I tried changing the "up axis" setting in the FBX exporter and that made no difference. I can't seem to find any controls for altering the light component's orientation either.

 photo Spotlight.jpg

Granted, I could make a light which is separate to the geometry item, and then parent-child link it to the geometry, but surely what I first planned should be possible?


read 617 times
11/24/2015 2:09:10 PM (last edit: 11/24/2015 2:09:10 PM)
show user profile  mike_renouf
I gave up and just grouped a light and the geo into one prefab - seemed much simpler.

read 599 times
11/24/2015 5:23:03 PM (last edit: 11/24/2015 5:23:03 PM)
show user profile  mike_renouf
Not much more to report for geometry, but I've nailed the thing that was making me nervous. I thought lighting might hold me up terribly. However I added the individual lights throughout the store and I was very pleasantly surprised just how easily the G.I. works.

It takes a while to for Unity to process the calculations, but it generally does it all itself.

Basically you tick a checkbox for any static objects (which will pretty much be everything in my scene) and set your Scene lighting as shown in the panel here:

 photo GI setup.jpg

read 590 times
11/24/2015 6:13:38 PM (last edit: 11/24/2015 6:13:38 PM)
show user profile  Dave
"I can't seem to find any controls for altering the light component's orientation either."

Just rotate it within unity, using the regular transform component in the inspector view.

"I flew over Egypt once"

read 587 times
11/24/2015 6:15:57 PM (last edit: 11/24/2015 6:15:57 PM)
show user profile  Pil
You need to remeber that Unity as standard can only show 2 active lights at a time using pixel lighting. Anything more than 2 is using vertex lighting.

A way around this is to bake all the lights into lightmaps and to do that you need to activate lightmaps on all your imported meshes.

Once thats done you can simply bake the lightmaps atthough this can take a long time with many lights.

But the end result is worth the light baking.
Light baking is recommended for all lights that are static.

If you already knew this, just ignore me :-)

read 582 times
11/24/2015 6:57:59 PM (last edit: 11/24/2015 6:57:59 PM)
show user profile  Dave

I think the default pixel light count is 4, but you can up this manually (and usually at no obvious cost if you're on a decent machine) in Edit > Project Settings > Quality . People aren't entirely too sure why the default is set so low, but hey ho.

I'm not 100% experienced with all this milarky, but there's also forward and deferred rendering, I think as a very primitive explanation is deferred = lots of lights, forward = lots of bakes. Buuut, don't quote me on that.

"I flew over Egypt once"

read 576 times
11/24/2015 7:09:42 PM (last edit: 11/24/2015 7:09:42 PM)
show user profile  Pil
Yeah you are right. 4 it is :-)

But still bake bake bake....

read 572 times
11/24/2015 7:24:02 PM (last edit: 11/24/2015 7:24:02 PM)
show user profile  mike_renouf
Thanks guys - good info.

I found that the light component (when added directly to the mesh object) couldn't be rotated without rotating the mesh object too. That's why I went with the separate gameobject option.

When I did the GI solution, I followed this tutorial, and it seemed to set up the baking automatically - is that what you were referring to?

read 562 times
11/24/2015 9:44:17 PM (last edit: 11/24/2015 9:44:17 PM)
show user profile  ScotlandDave
Will be keeping my balls on this ( eyeballs ) to see how it progresses..

Website | Blog | Contact | Vimeo

read 546 times
11/25/2015 12:21:42 AM (last edit: 11/25/2015 12:21:42 AM)
show user profile  Dave
Ah, sorry... the bane of skim reading.

Yeah, the up axis on the FBX exporter, I'm 99.99% sure it doesn't do a damn thing. I always end up just rotating the pivot manually so that Y = up (or whatever you desire). Just remember that if you ever reset X-form on a mesh after changing its pivot, it will return the pivot back to default.

If I were doing lights with actual lights dotted about though. I'd probably just parent a spot light to the mesh, and create a prefab out of it. Then just dot the prefab around the place, that way (as I'm sure you're aware) you just edit that one prefab (ie, light settings) and BAM... it alters all of them.

"I flew over Egypt once"

read 541 times
11/25/2015 1:45:34 AM (last edit: 11/25/2015 1:45:34 AM)
#Maxforums IRC
Open chat window