Simpel .obj import warning: NAN and/or infinite values

1002
9
05-05-2014 01:11 AM
KennethLindhardt
Occasional Contributor
Hi,
So I???m trying ti import a .obj into an existing scene. I have tried it in a couple of scenarios. An object created in 3D studiomax and then a mass model extruded inside CityEngine and then exported as an object. What I???m hoping to achieve is to create the façade rule file of my building, with help from the tutorial 13, and for that I need my mass model to be a non-static object.
No matter what I get the error below, on my own object files, and if I choose to import anyway, it appears in the layer, but is not showing in the scene. I have tried in an empty scene, and in the scene where I exported the model from.
So how do I import an object that I created myself?   

[ATTACH=CONFIG]33584[/ATTACH]
0 Kudos
9 Replies
MatthiasBuehler1
Frequent Contributor
Hi !


Are the building positions georeferenced ?

Did you open the obj in a text editor and check if there's actually infinite values in there ?

Check the 'v' lines for their coordinates.

Let me know ..

Matt
0 Kudos
KennethLindhardt
Occasional Contributor
Alright so obj isn�??t my strong side 😉 I didn�??t knew that!
Here is what I see in an editor


# created with CityEngine 2013.1 1115R (based on ESRI CityEngine SDK 0.9.1155, build date: Fri 11/15/2013 03:47 PM)
# creation date: Mon May 05 10:46:06 2014

mtllib Marriot_final.mtl

# mesh 'mesh_CityEngineMaterial' from geometry 'mesh_CityEngineMaterial'
v 30.100 0.482 -50.180
v 36.990 0.712 -43.960
v 41.590 0.733 -49.060
v 48.720 0.751 -42.620
v 14.290 0.821 -4.460
v 22.000 -0.290 2.500
v -17.990 -0.821 46.830
v -25.320 -0.718 40.230
v -34.300 -0.764 50.180
v -42.580 -0.741 42.710
v -48.720 -0.693 37.180
v -3.410 0.499 -13.030
v 36.925 32.452 -43.471
v 30.035 32.222 -49.691
v -3.475 32.239 -12.541
v -48.785 31.047 37.669
v -42.645 30.999 43.199
v -34.365 30.976 50.669
v -25.385 31.022 40.719
v -18.055 30.919 47.319
v 21.935 31.450 2.989
v 14.225 32.561 -3.971
v 48.655 32.491 -42.131
v 41.525 32.473 -48.571
# 24 vertices

g CityEngineMaterial
s off
usemtl CityEngineMaterial
f 1 2 3 4 5 6 7 8 9 10 11 12
f 13 14 15 16 17 18 19 20 21 22 23 24
f 2 1 14 13
f 1 12 15 14
f 12 11 16 15
f 11 10 17 16
f 10 9 18 17
f 9 8 19 18
f 8 7 20 19
f 7 6 21 20
f 6 5 22 21
f 5 4 23 22
f 4 3 24 23
f 3 2 13 24
# 14 faces
0 Kudos
MatthiasBuehler1
Frequent Contributor
well, that looks ok.

what happens if you drag and drop this into a new empty scene ?

What are the precise steps you take to try and import the file ?

I assume you have a georeferenced scene and try to import via File > Import > ..    .. correct ?

matt
0 Kudos
KennethLindhardt
Occasional Contributor
Yes that is correct, I�??ve tried the normal import, and just dragging it. I just noticed that I get an unknown rule error in the right bottom corner. I�??m georeferenced with coordinatsystem ETRS 1989 UTM Zone 32N. And everything is imported from a .gdb created in ArcMap.
When I couldn�??t import objects created in 3D studio Max, I tried to export the model directly from CityEngine, I would expect it then had the right coordinats, and it then would load without any problem. But haven�??t been that lucky yet 😉

It tells me to view logs for details, where are they located?
0 Kudos
MatthiasBuehler1
Frequent Contributor
Window > Show Log

Then double click the errors to get the stack trace.


Well, OBJ is not a format that is suited to bring over georeferenced data.



Maybe tell me which kind of data you need to bring from which tool to which tool .. and for what .. 🙂

Then i can help better .. 🙂

m.
0 Kudos
KennethLindhardt
Occasional Contributor
Ok to begin with I had problem to edit the façade imported from a .gdp and then extruded, so I could use the totural 13 walkthrough. So I thought the best way was to import the building, but just found anotherway (convert models to shapes) That would do the trick. Okay I stil need to know a little more about the import functions. I do not have a GIS background, but come with a BIM, CAD, 3d building background. So I would find it much easyer to model a specifik model inside Revit or 3d studiomax (if it�??s not giong to be prcidual modeling ofcourse) So if I model a cube inside 3D studiomax, how do I then import it to a specifik point in my schene.

When I failed to do it from a obj file created from 3d studio max, I thought I could check what I was doing wrong whit an export from CityEngine. That�??s why I found it kinda strange, that I not even was able to import an object exportet and then imported to the exact same scene. I�??m going to model a bridge in 3ds and don�??t want to do that if I�??m not able to import it where I want.

About the Error log, that was just stupid, don�??t know why I missed that!

Here are the error: No Start Rule 'Default$StaticModel' in rule file '/C:/Users/kennethl/CityEngine/ce.lib/bin/_static_model_.cgb

I do have located the _static_model_.cgb in the right path!
0 Kudos
MatthiasBuehler1
Frequent Contributor
hi ..


this workflow should not be a problem.

you should easily be able to import a cube or similar polygonal mesh via obj.

did you try importing into the obj into an empty scene ?



I just tested the preview of a MAX-generated obj file, so the workflow should just work fine ..

btw. I created tutorial 13 ..


Matt
0 Kudos
KennethLindhardt
Occasional Contributor
Thanks for all your great tutorials by the way, had heard your voice a couple of times now�?�
Ok, so I seems like I have an installation issue. I have 2012 and 2013 installed at the same time, in other program that could course an issue, but havent found an issue with CityEngine yet, until now. I can perfectly import my objects in 2012, but not 2013. The reason why I have both versions installed was because I was the presentation in a workshop, and my graphic card seemed to have some issues with 2013.
Well now I know I�??m not a complete idiot to import .obj files, and CityEngine works like I would expect it to do, so then I feel comfortable to continue my work, I think this could maybe be solved with a reinstall.

Thank you for your testing time.

Kenneth Lindhardt
0 Kudos
MatthiasBuehler1
Frequent Contributor
ok ..


let me know how it goes ..

matt
0 Kudos