street models FBX not importing to Unity

2858
8
02-09-2012 11:33 AM
MarieSaldana1
New Contributor
Hello!

I'm having a weird problem with some FBX exports of street models. Some of them will crash the Unity FBX importer. This only happens with street models and doesn't seem to have anything to do with the file size. Building models import fine. It could possibly be a Unity problem, not a CityEngine problem, but there seem to be specific combinations of nodes that Unity just won't import, while others work fine (I had to break the street network into multiple pieces, some I could import, others I couldn't). I'm wondering if you might have any idea if something in CE could be causing this problem? I'm wondering if it could have anything to do with the geolocation of the model or coordinate system?

Thanks!

-Marie
0 Kudos
8 Replies
MatthiasBuehler1
Frequent Contributor II
hi !


I've been playing with Unity a little in the last days.

--> forget trying to import a fbx into Unity. It messes up all materials.

--> just load the same FBX file in Maya, save the scene as .mb (maya binary) and use the .mb file in Unity. (I think you mentioned you have Maya installed ..)


Let me know if this workf for you ..
0 Kudos
MarieSaldana1
New Contributor
Hi Matt,

Glad you have been working with Unity, then I will have a lot of questions for you!

Actually I found a way to load fbx with textures... change materials generation to "Per Material" instead of "Per Texture" on the FBXimporter. It only works with one texture channel though (no dirtmap channel). I have actually loaded all my models this way.

I will give the maya version a try though it would be nice not to go to the extra step. Although it would be an advantage if Unity could load the entire scene as one .mb -- do you know if this is possible? Normally you have to break up the scene into many small models because Unity cannot import more than a certain number of vertexes at once.

I'll see if this solves the problems with the streets though and let you know...

Thanks!

Marie
0 Kudos
MatthiasBuehler1
Frequent Contributor II
Hi there ..

Well, I've just been playing a little with it, so I won't be much of a help here I guess .. :)


I've just tried to import via an other format because no transparency and no specularity got imported. at least that worked via .mb. Though dirt maps did not included either, sadly.

I'll have to check whether those are supported at all (multiplication of textures and second UVset).

I did not yet try with large datasets, but I've heard of that 64K limit too. I'll have to try this too.

m.
0 Kudos
MarieSaldana1
New Contributor
Well, I got this to work eventually... I think it was a Unity issue, not related to CityEngine!

I do have one more question for you...

We are using KML to set positions within the Unity model, so I need a way to find the coordinates of the center point in the CityEngine model. For example, the coordinates of the point that will become 0,0,0 when I export to unity.  What do you think is the best way to do that?

By the way, if you would like to see how the model is shaping up: http://hvwc-server.ats.ucla.edu/ (DigitalRome)

Thank you :)

Marie
0 Kudos
MatthiasBuehler1
Frequent Contributor II
sweet, it's amazing to be able to walk around in ancient rome ! so cool !!


I am not prefectly sure if I understand correctly :

Are you working with lat/long data inside Unity or are you 'converting back' to cartesian coords (xyz) for the work in Unity ?

Cos the 'main workflow' since 2011.1 is that in the CE, you 'always' work (if data available) with a SceneCorrdinateSystem in a specific projection, but if you want to export your dataset centered around the cartesian origin, you'll use the new offset function in the misc tab of the exporter. That does not make much sense with kml files, but if you have GIS data to create a city from and you want to visualize them e.g. in Maya or Max, you'll need the dataset be centered at the cartesian origin to prevent precision issues (so-called 'WOBBLE').


lemme know.


oh, ps :

- are you using dynamic shadows in Unity PRO or have you baked some of the lighting into lightmaps ?
- is that running character also available in the free Unity ?
0 Kudos
MarieSaldana1
New Contributor
Hello Matt, thanks for the response!

I think I figured out the coordinate issue, what I do is make a reference area for the entire model, export that, and use the global offset for all the models. So the global offset gives me the center point of the model, and I just convert this from UTM to decimal degrees. I still haven't got this to work with the KML, but this has to do with the Unity scripts I think.

The current version of 'Digital Rome' uses dynamic shadows... this is because once the model got more complex, the number of lightmaps was too large. I am still working on a solution to this. There is another version up there (A Walk With the Dead) which is an earlier, lower res model and uses lightmaps.

The characters are part of a custom package we made (for Unity PRO) - so not free I think!

Marie
0 Kudos
MariaMiranda
New Contributor
Hi! I've the same problem (coordinate issue)... Did you resolve your problem? How you really did it?


Hello Matt, thanks for the response!

I think I figured out the coordinate issue, what I do is make a reference area for the entire model, export that, and use the global offset for all the models. So the global offset gives me the center point of the model, and I just convert this from UTM to decimal degrees. I still haven't got this to work with the KML, but this has to do with the Unity scripts I think.

The current version of 'Digital Rome' uses dynamic shadows... this is because once the model got more complex, the number of lightmaps was too large. I am still working on a solution to this. There is another version up there (A Walk With the Dead) which is an earlier, lower res model and uses lightmaps.

The characters are part of a custom package we made (for Unity PRO) - so not free I think!

Marie
0 Kudos
MatthiasBuehler1
Frequent Contributor II
Hi,

maybe I can help you .. though I need a little preciser description. what are the symptoms ? :)
0 Kudos