View Full Version : Unity help
geo_n
04-01-2010, 10:40 PM
This old fbx exporter works great for lw 9
http://unity3d.com/support/documentation/Manual/HOWTO-importObjectLightwave.html
I was able to export a pteradactyl with bones and complete animation and textures.
robot is from max also flipping:D. must be the thirdplayercontroller but don't know conding :hey:
Just have one problem which is happening to me in 3dmax as well. When I add the thirdperson controller, the objects flip to the side on movement. :cry:
scene setup
http://img89.imageshack.us/img89/6178/76389813.th.jpg (http://img89.imageshack.us/i/76389813.jpg/)
pressing play
http://img707.imageshack.us/img707/5170/45154245.th.jpg (http://img707.imageshack.us/i/45154245.jpg/)
geo_n
04-01-2010, 11:20 PM
It sucks not to know coding :D
I exported a web unity file maybe a unity guru can take a look.
meshpig
04-02-2010, 02:04 AM
It sucks not to know coding :D
I exported a web unity file maybe a unity guru can take a look.
I notice you're browsing the Unity forums presently... there's plenty of stuff there on the subject:)
geo_n
04-02-2010, 03:29 AM
The max import is fixed. Not the lw problem :D
A simple box from layout with no animation would flip to its side with the third person controller.
geo_n
04-03-2010, 09:24 PM
Just to update, I found out the problem.
The problem is that the unity tutorial page tells you to use an old fbx exporter to use in unity. That fbx exporter is completely useless. I struggled for a few days trying to fix that rotation problem!!
Using the lw 9.6 exporter, everything works except you have to manually relink the textures in unity.
The objects have to face the -z in layout so that when you use a controller script the objects don't move facing their back.
particledecay
04-04-2010, 12:07 AM
Hi Geo.
The nature of the problem is axis orientation. Not all exporters agree on how their X, Y and Z axis are positioned relative to the world view. This causes problems when importing.
The problem can be fixed within Unity by placing the imported object in a parent Game Object. Attach your scripts to the parent gameobject. Rotate your model inside your parent gameobject so that it's facing the right way (don't rotate the parent as this will be moved by the script)
This approach has a couple of benefits, most notably independence of your code from the orientation of your 3D application or exporter.
MentalFish
04-04-2010, 07:14 AM
I am using the built in FBX exporter for 9.6 and it works fine: http://www.vimeo.com/10196359
geo_n
04-04-2010, 08:59 AM
Thanks guys.
I was able to fix the problem previous post by not using the fbx exporter from the unity webpage.
The test002.zip from my previous post works perfect and came from fbx exporter in lw 9.6.
They really should update the tutorial webpage at unity3d. And it should be a sticky somewhere that we should use lw 9.6 exporter and object orientation should be -z in layout.
I'm enjoying learning unity3d after that axis problem. Just don't know where to start learning javascript. So many ideas for things to make interactive 3d :D
I can't wait for keystone to allow import of endomorphs which would be really cool!! 3dmax doesn't have this feature afaik.
geo_n
04-05-2010, 03:05 AM
This is getting fun. Trying out lightmap. Took a few minutes to make a test room.
I didn't check my scene was too bright. What's the purpose of separating the colormap and lightmap in unity? I don't see a sllder to control the lightmap texture. Why not bake the lighting into the texture?
particledecay
04-05-2010, 07:40 AM
Multiple UVs are used commonly for image optimisation and flexibility.
Imagine a wooden floor with a single shadow cast on it. Using a single UV would require a large image at best resolution for the whole floor including the shadow. Not desirable for realtime engines. With multiple UVs the first UV could be a highly detailed but small wooden texture designed to tile many times across the floor (256x256), and the second UV a low res greyscale lightmap designed to fit once.
MentalFish
04-05-2010, 07:45 AM
Because then its not a lightmap anymore ;) If you bake them into one image, and you light up the shadow areas with a real time light, it will light up the color of that area and if that is black it will light and look gray. If it is a lightmap it will reduce the effect of the shadow and reveal the color of the material "under" it.
... and also what particledecay said
geo_n
04-05-2010, 07:47 AM
Ah I see. Having no experience in game graphics I unwrapped all the different materials that make up the room. So it did have big textures for each part that could have just used a planar map that tiles.
Are lightmaps the combination of direct and indirect lights with no color and texture info? I usually see them like more of a ambient or gi map with no direct lighting.
davehone
04-05-2010, 06:21 PM
A lightmap can include anything you want it to, but often it's limited to greyscale shadow and highlights from static lights only.
I believe all textures for Unity (and many other engines) need a UV so no, don't use planar or any projection method other than UV for game art.
Be aware that the techniques you employ need to match the limitations of your real time engine. Not all of Lightwave's features are available in your real time engine so adjust your workflow accordingly.
Have a look for discussions about unwrapping, optimisation and tiling UV techniques on the NT and Unity forums. Have a look for discussion on:
UV texturing to minimise Unity draw calls (i.e. one texture used across multiple objects)
UV texturing to minimise RAM use (mirroring and tiling UV polys)
geo_n
04-05-2010, 11:54 PM
Thanks. I am doing some test on how to optimize a room. Thinking this would be good for a walkthrough type presentation, an interactive car showcase for car dealership. And its free and easy to use than other options.
Lamont
04-15-2010, 11:47 PM
Even on a decent machine, polycount would not be the first thing you'd have to worry about. Texture usage, texture passes, vertex usage (multiple UV maps, vert colors) (normal, spec, diff, alpha) and proper compression (most engines do this for you, but it's good to know what each format is). Also, the number of unique shaders on screen affects performance as well.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.