PDA

View Full Version : Exporting .OBJ files with ALL the details.



Rich-Potter
06-05-2009, 10:10 AM
Hello,

Im quite new to lightwave but have been using other 3d apps for a year or so by now.

I need to be able to export meshes with all the details to be used by other people on different machines. However at present when I export .obj files I am only getting the color on the UV map, but no details such as bump map/diffuse/reflection are moving accross.

Are there any tutorials on how to achieve this anywhere? Ive looked quite hard on this forum, google, wiki's etc etc without much success (and the manual!), or can anyone take a minute to explain the process to me (preferably in quite basic terms please :D)

I am trying to move objects from LW to Vue in the .obj format, I am on a 64bit Win 7 Machine.

Thanks for you help

Rich

Red_Oddity
06-05-2009, 05:16 PM
Try Mike Green's mtl importer/exporter : http://www.mikegreen.name/

not sure if it does what you want though.

Rich-Potter
06-06-2009, 02:53 AM
Thanks for the reply :)

Ive given it a go but sadly vues not liking that so much either, there are .mtl files being produced already and looking at them (in notepad) they dont seem to be much different to the one that mike greens doodah produces, except they dont have his name all over them.

I reckon its something like I need to export UV maps/Bump maps but dont yet know how.

No one seems to have addressed this in tutorials or anything similar, yet people must do it all the time!

Thanks again.

Rich

Kuzey
06-06-2009, 05:22 AM
To export uv maps you need to apply it to your model in LW first, then export the obj. UV maps don't get exported even if they exist until they are used within LW.

Kuzey

IMI
06-06-2009, 11:30 AM
Another thing to consider is that the .mtl file generally doesn't include information for spec, bump and transparency, etc. maps. Although it can be forced to through manual editing, LW's .mtl file export doesn't.
Also, can Vue read that information in a .mtl file? Texture maps, yeah, even absolute paths as opposed to relative paths for textures. But even if the .mtl file has the correct info in the correct place, is Vue's .mtl file reader set up to read and accept, say, a reflection map?
Why not just use .lwo as your export? That's a better bet, IMO, and would be more likely to get all that information across.




No one seems to have addressed this in tutorials or anything similar, yet people must do it all the time!


Actually, I don't think people do it all the time, not with OBJ. And those of us who do use OBJ have generally accepted there's alot we'll have to do manually later on. Geometry wise, OBJ is one of the more flexible and easily dealt-with formats, but texture-wise it's always been a problem. Our solution is deal with it in the target app, not pull our hair out trying to force it to be something it wasn't designed to be. ;)
But 3D file converters also play a huge role, when outright export doesn't work. AccuTrans and Deep Exploration are two particularly good ones, though Deep Exploration is pretty expensive.

Rich-Potter
06-07-2009, 06:26 AM
Thanks IMI and Kuzey

I think ive got the UV mapping down, but your probably right, it probably is vue not reading the .mtl files.

Vue can open .lwo files (i think?) so ill give that a go, I like .obj becuase it seems more universal (I have no idea where this idea came from...)

Thanks

Rich

IMI
06-07-2009, 10:57 AM
Well, OBJ *is* more universal, in that an OBJ file can be read by most programs. The geometry, at least, but the .mtl files vary widely. Different programs write different data to the .mtl files than others, while programs read and accept different data too, and not necessarily everything that's in the .mtl file.

Believe it or not, although LW has had OBJ import/export for at least a decade now, it's only been about a year since LW started reading and writing .mtl files along with the OBJ geometry.

As far as I know, Vue reads .lwo files, at least it used to with no problems, although obviously it has no way to reproduce any procedural materials that may be attached to a .lwo file.

Rich-Potter
06-07-2009, 12:50 PM
ok that makes sense.. so I guess what I need to do is to bake my bump maps out if they are procedural.

Thanks again :)

IMI
06-08-2009, 02:47 AM
Well, you're welcome. :)

I don't think you should have too much trouble using the .lwo format. It does work in Vue, and the good thing about .lwo (actually LWO2, technically), is that it hasn't changed enough over the past several years to be a problem for apps which support it.
And it has alot of advantages over OBJ, again, in an app that supports it. Personally, I wouldn't use OBJ if .lwo could be imported.
It's been a good while since I used Vue, but one thing I do remember is no matter what format was being used I always had to do a good deal of altering of materials. Even things like spec and bump and reflect, which are going to be dealt with differently from app to app, even when the texture maps are the same. It's just the nature of the beast, that one size does not fit all.

CaptainMarlowe
06-09-2009, 01:27 AM
Hello.
Although I am not a great specialist, I think I can add my 2 cents here.
I am not a big fan of using LWO import in Vue, and here is why.
Since I want to take advantage of LW nodal textures to create the best ones possible, my workflow to create exchangeable objects is generally to "bake" the nodal textures in one (or more) UV mapped textures.
Once this is done, I create a copy of my object with the baked image (and bumpmap) replacing the nodal textures.
If the choice is then to send the object into Vue (here, Vue 5 Infinite), I will rather use obj export. With 9.6, it exports fine textures and bumpmaps, but the rest will have to be tweaked in Vue.
On the other hand, if you import directly an object with UV maps in LWO format in Vue, chances are great it won't be able to read the UV maps correctly.
On the image below, the castle is exactly the same. The left one is the imported LWO version, the right one the .OBJ format.
OK, I know you can unweld the LWO object before importing it in Vue and check the "decimate" option when importing into Vue : this sometimes helps reading the UV maps (only sometimes).
This can be handy if you intend to modify your object and go back and forth.
But if you are happy with your object and don't want to modify it, I would suggest (again, I ain't a pro) that .OBJ is finally quicker and safer.
I've tried Vue 7 PLE and had almost the same issues than with Vue 5.
Hope it helps.

Marl.

IMI
06-09-2009, 05:31 AM
Marl,
I'd say in general you are right with all you're saying.
I was responding to the initial question here, that being the import of geometry with maps applied to an OBJ file.
When it starts to become a matter of trying to get complex surface data such as procedural textures either nodal or the with the standard LW surface editor, then it obviously becomes a whole different situation, which needs to be dealt with in ways such as you suggested.