Obj to Wrl

Started by Snake, April 05, 2014, 05:12:43 PM

Previous topic - Next topic
Well, I put the finishing touches on my cantina, which is extremely simple, and now Wings3D won't covert it for no apparent reason. Could someone with a different program try converting it to wrl? (I think vrml will work too)
=AaTc= Forever

SALLY....

-Retired Modder

April 05, 2014, 05:37:51 PM #1 Last Edit: April 05, 2014, 05:52:34 PM by tirpider
This probably isn't the solution, but, I fed it into 3D Object Converter and saved VRML versions 1 and 2.

The Viewer only loads the 2 version. Also, 3D Object converter killed the textures.

I seem to remember having this trouble before and it required altering the obj in a txt editor before doing the conversion in Wings.

Gonna try again to get the texture references. Kinda important since there are so many on this model.

-edit
Ah, it needs the material file. It has all the usemtl names and list the file as Snk_bldg_cantina.mtl

I'll try to rebuild it, since the names are the same as the filename, but there is a 100% chance that all the color info will be wrong since I'll have to guess.
It should have saved the mtl file in the same folder as the obj.

I think all that was required to get Wings to play nice with it was to change the texture references in the mtl file from absolute to relative path names using a text editor.
for example, change:

C:\some\long\list\of\folder\names\texture.jpg

to

texture.jpg

Thanks, tirp. Yeah, it's pretty much useless without the textures. If it would be easier than converting this model, the reason I changed the old one is because one of the textures didn't show up at all, and another had this weird blue tint until you get really close ingame, so it may be easier for you to fix those than to get all the texture references for the new model.
=AaTc= Forever

SALLY....

-Retired Modder

i will optimize and covert it when i getr back home to my PC.

It will have no error (including collision meshs) after i am finished.

Yeah, I rebuilt the mtl file with generic info from wikipedia and still can get any texture references in the viewer.

This could be because of inconsistencies with how the VRML standard is implemented from application to application, or because I simply don't know what I am doing and guessed wrong.

Here's the Snk_bldg_cantina.mtl file I came up with if anyone is curious:
[spoiler]
Code (mtl) Select
newmtl Default_Material
Ka 1.000 1.000 1.000
Kd 1.000 1.000 1.000
Ks 0.000 0.000 0.000
d 1.0
illum 2

newmtl __Stone_Coursed_Rough__Stone_Coursed_Rough_jpg
Ka 1.000 1.000 1.000
Kd 1.000 1.000 1.000
Ks 0.000 0.000 0.000
d 1.0
illum 2
map_Ka __Stone_Coursed_Rough__Stone_Coursed_Rough.jpg
map_Kd __Stone_Coursed_Rough__Stone_Coursed_Rough.jpg

newmtl __Stone_Pavers_Flagstone_Gray__Stone_Pavers_Flagstone_Gray_jpg
Ka 1.000 1.000 1.000
Kd 1.000 1.000 1.000
Ks 0.000 0.000 0.000
d 1.0
illum 2
map_Ka __Stone_Pavers_Flagstone_Gray__Stone_Pavers_Flagstone_Gray.jpg
map_Kd __Stone_Pavers_Flagstone_Gray__Stone_Pavers_Flagstone_Gray.jpg

newmtl __Stone_Vein_Gray__Stone_Vein_Gray_jpg
Ka 1.000 1.000 1.000
Kd 1.000 1.000 1.000
Ks 0.000 0.000 0.000
d 1.0
illum 2
map_Ka __Stone_Vein_Gray__Stone_Vein_Gray.jpg
map_Kd __Stone_Vein_Gray__Stone_Vein_Gray.jpg

newmtl __Stone_Pavers_Walk__Stone_Pavers_Walk_jpg
Ka 1.000 1.000 1.000
Kd 1.000 1.000 1.000
Ks 0.000 0.000 0.000
d 1.0
illum 2
map_Ka __Stone_Pavers_Walk__Stone_Pavers_Walk.jpg
map_Kd __Stone_Pavers_Walk__Stone_Pavers_Walk.jpg

newmtl __Tile_Various_Tan__Tile_Various_Tan_jpg
Ka 1.000 1.000 1.000
Kd 1.000 1.000 1.000
Ks 0.000 0.000 0.000
d 1.0
illum 2
map_Ka __Tile_Various_Tan__Tile_Various_Tan.jpg
map_Kd __Tile_Various_Tan__Tile_Various_Tan.jpg
[/spoiler]

Pretty sure the filenames are wrong, but that's something that could be fixed later. I was just trying to get it to transfer any file name at all so it could be fixed. Didn't work, of course.

Alright, well hopefully RC will have better luck. If it still won't work then I'll just have to start from scratch. It's not too hard to make buildings anyway. Thanks for the help!
=AaTc= Forever

SALLY....

-Retired Modder

April 05, 2014, 08:02:12 PM #6 Last Edit: April 05, 2014, 08:03:47 PM by -RepublicCommando-
Just to note: Tirp's MTL reference helped quite a bit.

This should be fine ingame.

I don't really have much idea about the texturing (it seems the model only put three textures to use.. I know there were more textures than that..), so if that is off, just shoot me a pic of what it looked like in sketchup or whatevs and i'll rebuild the materials again.

I fixed the OBJ and mtl as well, which is in this download with the MSH.

Hopefully this model doesn't cause you any more issues, and good luck on the rest of the Museum!

Yeah, it appears one of the textures was overridden and is now another texture but I think it looks fine. You have to pick your battles.. Lol. Thanks guys.
=AaTc= Forever

SALLY....

-Retired Modder