An OBJ file import challenge

Started by julian.bleecker, June 17, 2009, 11:19:43 AM

Previous topic - Next topic

julian.bleecker

I'm continuing to climb the learning curve here and have yet to see the top of the mountain. Here's the latest ascent. I'm trying to figure out the OBJ load features with some of my own data. I have an OBJ file - a Wavefront OBJ. It's got about 10k faces and is basically a cluster of buildings with no textures applied. Ultimately, I'd like to shade them in some fashion procedurally, perhaps with some grass and that sort of thing. (Don't ask..it's an experiment.)

I load the object with an obj reader, and I can see a bounding box in the preview (actually, it's just a 3D cross-hairs), but not the actual object itself. I've tried adjusting the shader to just be a flat color, checked the opacity settings, scaled it way, way up. But, still - I don't see the object. Which is kinda frustrating, but such is the life of a newbie.

I'll keep muddling about, but I'm wondering if there's something incredibly obvious I am missing or perhaps a tutorial for this sort of procedure?

I've put the obj data file here if you want to take a look or try it out: http://cloud.nearfuturelaboratory.com/DropOff/14701_New_York_City_BuildingExport.obj (about 970k).

Julian

cyphyr

Well I opened your object up in Lightwave and ...

Its 52 cm on its longest side
Its 4.2km (ish) from its origin
Its tilted at an angle of 45deg
and more ....

Basically I think you got this model from (a guess here) Google sketch up and its a geo referanced model of NYC in its correct position, angle and rotation for Google earth.
Unfortunately whatever system the authoring package used is not "real world". You'll need to re-scale your model, rotate it back to the horizontal and position it so that its origin is at 0,0,0, then you will also have to apply textures to it. After all that it will load perfectly into Terragen.
Good luck
:)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

julian.bleecker

Thanks for that Richard. I opened it up in Lightwave, too, and started mucking with it and reorienting it. Was hoping to avoid this, but I'm used to making friends with my devils at this point.

So, are you saying that I must add a texture to the model, even if I'm perfectly fine with flat shading?

Julian

cyphyr

Glad you making friends with your personal devil  ;D
You don't "have" to put any textures on the model if you don't want to, but if you choose not to the model will import black until you attach a shader to it.
:)
richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

LaFrance

Julian,

if I understand correctly, you're just trying to see it, for now, in the viewport? I believe all you will see is the bounding box: geometry will not be visible in the viewport. (maybe someday? ;)

are you able to see it in a quick render? if not, in addition to geo problems arising from your source/export, it could just be a scale issue, and needs to be scaled up dramatically(?)

B

julian.bleecker

Hi,

Well, so — I finally got it to work, which relieved me and restored my faith in my abilities. As suggested, it required lots of jiggery-pokery with Lightwave to bring the model to a proper center. It would help, too, if my Lightwave chops were more finely honed, but I made do.

Thanks again for the quick suggestions..

.julian.