Jump to content

LDD2OBJ


lol username
 Share

Recommended Posts

I didn't create this program, I am simply redistributing it under the GNU General Public License.

Download

Requires Python. Extracts LDD's Assets.lif file via JrMasterModelBuilder's LIF Extractor (which was also released under the GNU GPLv3; see "License (LIF extractor).txt"), then converts the resulting extracted .g brick models to OBJ format - please note that textured bricks are not yet supported.

Again, not made by me (feel free to redistribute it yourself, don't worry, the programmer is OK with it), but I have tested it and it works perfectly. Simply extract the zip, locate Assets.lif (found at "C:Program Files (x86)LEGO CompanyLEGO Digital Designer" by default), copy it to the same folder as the program, and run LIF2OBJ.jar.

Link to comment
Share on other sites

nST0lUh.png

Why yes, I do as a matter of fact... why?

I had to re-install Python and enable... Uh... Some option having to do with a path. Sorry I can't be more specific, I don't remember exactly what it was, but download the latest version of Python and when it asks what components to install, enable the one mentioning the word "path". :P

0af2b032eb7326ca0ac88cb115eeea9b.png

IT'S RIGHT THERE! (even though I have already extracted it :P )

I can't be sure unless I see the entire folder, but I have the feeling there's some files missing there - care to post a bigger screenshot?

Is this the tool created by HJMediaStudios by any chance?

No.
Link to comment
Share on other sites

-snip-

Why yes, I do as a matter of fact... why?

I had to re-install Python and enable... Uh... Some option having to do with a path. Sorry I can't be more specific, I don't remember exactly what it was, but download the latest version of Python and when it asks what components to install, enable the one mentioning the word "path". :P I understand. It seems the dev has made use of the system PATH, where you can just "python LIFExtractor.py" and it will run. The Python 3.3 installer has an option to enable this. If you can, you should contact him and ask him to swap to the x86 EXE so more people don't have this error.

And, unless the dev wrote a Java UI into this, and somehow managed to overwrite the .jar shell extension to run it with Python, it also requires Java. :P

Is this the tool created by HJMediaStudios by any chance?

No. Oh, by someone else? Interesting...
Link to comment
Share on other sites

Awesome! Gonna try it out this evening.

 

0af2b032eb7326ca0ac88cb115eeea9b.png

IT'S RIGHT THERE! (even though I have already extracted it :P )

 

By the looks of it you extracted the program into the LDD folder in program files. Perhaps it doesn't have permission to read the directory contents? Try copying it over to the dekstop.

Link to comment
Share on other sites

Awesome! Gonna try it out this evening.

0af2b032eb7326ca0ac88cb115eeea9b.png

IT'S RIGHT THERE! (even though I have already extracted it :P )

 

By the looks of it you extracted the program into the LDD folder in program files. Perhaps it doesn't have permission to read the directory contents? Try copying it over to the dekstop.

If you ran the program and you can see the file, It can see the file. It's not a matter of read permissions.
Link to comment
Share on other sites

<snip>
If you ran the program and you can see the file, It can see the file. It's not a matter of read permissions.

It is, actually. The icons are missing from the UI. they're in the res directory, so the program probably loads them at runtime, and can apparently not access those either.

 

Other than that, the tool seems to work as advertised.

I'm assuming that the python script indeed gets executed the way le717 suggested; I have python on my PATH, and it worked on my end with no problems.

Thanks for posting it!

Link to comment
Share on other sites

JrMasterModelBuilder

Hmm, works perfectly. I think it should use db.lif instead of Assets.lif because db.lif is updated more frequently, but it works great, even on OS X.

 

Are we being secretive about the developer for some reason?

Link to comment
Share on other sites

JrMasterModelBuilder

UPDATE:

 

While poking around with the Java applet, I noticed there is a folder containing the source code for the application contained within the JAR (just extract it like a ZIP). I realize Java decompiling is easy but though it was worth noting. It's actually rather simple, I'm surprised it took this long for someone to make this.

 

Also, I can confirm that it executes python by the command line assuming that python is in the path.

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

I managed to make it work pretty easily, however I noticed that a lot of the obj models generated have missing vertices/faces. See the following picture for an example with the 2X2 bricks.

I only tried it on my mac with python 2.7.1 for now.

 

3003.png

Link to comment
Share on other sites

JrMasterModelBuilder

Hi,

 

I managed to make it work pretty easily, however I noticed that a lot of the obj models generated have missing vertices/faces. See the following picture for an example with the 2X2 bricks.

I only tried it on my mac with python 2.7.1 for now.

I can confirm this issue also. To try to narrrow this down, what other bricks have this problem? (3003 was the part ID for the 2x2, please include this, it's the same as the file name.)

Link to comment
Share on other sites

lol username

... then converts the resulting extracted .g brick models to OBJ format - please note that textured bricks are not yet supported.

The missing faces are the ones where textures are applied.
Link to comment
Share on other sites

... then converts the resulting extracted .g brick models to OBJ format - please note that textured bricks are not yet supported.

The missing faces are the ones where textures are applied.

 

Ok, so i think i understand now. The faces of a part that may have a texture applied at some stage are not included. It kinda makes sence with the parts I tried. Mini wigs were ok, but for example shoulders of part 72326 don't appear as it is the location where a texture can be applied.

Link to comment
Share on other sites

JrMasterModelBuilder

 

... then converts the resulting extracted .g brick models to OBJ format - please note that textured bricks are not yet supported.

The missing faces are the ones where textures are applied.

 

Ok, so i think i understand now. The faces of a part that may have a texture applied at some stage are not included. It kinda makes sence with the parts I tried. Mini wigs were ok, but for example shoulders of part 72326 don't appear as it is the location where a texture can be applied.

Ah, this was my suspicion. I wonder if this can be corrected.

Link to comment
Share on other sites

The geometry where textures are applied seems to be located in the other .g files relative to a part. For example the part 3003 (3003.g) has 2 sides missing and 2 associated file 3003.g1 and 3003.g2. It seems to work with the other textured parts. The number of spare .g files corresponds to the number of textured areas.

I tried to rename those spare .g file and open them with brick viewer made by bartvbl (http://www.rockraidersunited.org/topic/4009-ldd-brick-viewer-g-files/)

 

E.g with part 72326:

72326.png

Both shoulders geometry is missing as this the location for the texture.

 

I opened the file 72326.g1 and I obtained that:

72326a.png

It's pretty close to the geometry of one shoulder. The second file 72326.g2 represents the second shoulder.

I tried with other parts. The mesh can be messy sometimes but the missing faces are still recognizable. It'd be awesome if the OBJ files generated by this software could merge the geometries to at least get the complete mesh even without the decorations. I tried to have a look at this post: http://www.rockraidersunited.org/topic/4011-ldd-brick-file-format/ but I'm not experienced enough.

Link to comment
Share on other sites

  • 6 years later...

Hello all,

 

This conversation is a little bit old. I hope somebody can help me.
I can launch OBJ Converter, it creates two files (Assets and converted), but after approximatively 25 % on the status bar it stops, and nothing else happens.

 

Does somebody know what is the problem ?

 

Thanks in advance for your help.

 

Fabrice

 

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.