LDD questions - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html) +--- Forum: All Other Programs. (https://forums.ldraw.org/forum-26.html) +--- Thread: LDD questions (/thread-4254.html) |
LDD questions - Daniel Goerner - 2012-04-07 1. Is it possible to extract patterns out of LDD files, and if yes, how? 2. Is there a program like LDView for LDD files (so if 1 is answered with no, I could look at the patterned parts, make screenshots and use these as templates). Re: LDD questions - Travis Cobbs - 2012-04-08 As far as I know, patterns in LDD are textures. There's a pretty good chance they could be extracted, but I don't know how to do so. The only program I know of to view LDD files is LDD itself. Re: LDD questions - Tim Gould - 2012-04-08 Someone somewhere (probably Lugnet) once pointed out that they are/were a standard 3d modelling format compressed into a zip with a little extra information. It might be worth sniffing around the parts library file with a zip file viewer. Tim (who does not have LDD to check) Re: LDD questions - Daniel Goerner - 2012-04-08 How do I open the .lif file (since it is the largest file in the folder, I assume it's the library)? Re: LDD questions - Rolf Osterthun - 2012-04-08 Hey Daniel, the .lif files are kind of a container format. http://news.lugnet.com/cad/ldd/?n=139 Wrote:I'd actually compare it more directly to EA's IFF (Interchange File Format) I agree with this quote. LEGO used chunks like 0001 and 0002 (...). There was a discussion (among others) on eurobicks about the legality of extracting and sharing the content of the .lif-files. I am not a jurist nor is my english that good, that I got the result of this discussions. http://www.eurobricks.com/forum/index.php?showtopic=65123&view=findpost&p=1180814' Wrote:BTW, documenting the file formats is one thing. Appropriating Lego’s data contained within such file formats is quite another – that data (the .lif contents) certainly is subject to plain old copyright. You would require written permission to reproduce it. Converting it to another format is merely a ‘derived work’ and permission is still required. Once, Philo described a way to take a 3d screenshots of a ldd model. In the resulting .3dxml files the decorations are available too. But they are in a strange format. I did not had a closer look on them, yet... Rolf Re: LDD questions - Rolf Osterthun - 2012-04-10 Hey, inside the .3dxml files the decorations seems to be stored as Base64 encoded .tga files. I found a phyton script (referenced from here), that was written to import .3dxml files into Blender. Since I do not have Blender installed I could not give it a try, but the script gave me a feeling for how the images needs to be handled. Maybe this is interesting for someone else. BTW, this could give us access to the textures of the computer games, too... Rolf Re: LDD questions - Rolf Osterthun - 2012-04-12 Hey again, yes, it works. I played around with the phyton script and I was able to extract .tga files from the .3dxml files. I successfully extracted images from the LDD and from Lego Star Wars II. It looks like the images are upside down, but I think that is just a small issue. There is one .lxf file available on eurobricks that contains all decorations. The script could extract them all at once. Code: import zipfile, base64, struct, os I am not well versed with python! What I did:
You will get a folder named 'textures'. I hope it works. Rolf Re: LDD questions - Daniel Goerner - 2012-04-12 No it doesn't. I get a syntax error, when import the script: Traceback (most recent call last): File "<stdin">, line 1, in <module> File "extractimages.py", line 9 print 'Unzipping', member ^ SyntaxError: invalid syntax If I continue anyway: Traceback (most recent call last): File "<stdin">, line 1, in <module> NameError: name 'extractimages' is not defined. BTW: I downloaded the lxf file. I don't have a 3dxml file (whatever this is), so does it work anyway if I fix the syntax (no idea how)? When I asked, I thought more of a program like isobuster... ;-) [EDIT]. I finally got the script imported by deleting all the lines with "print" in it. But when I start the script I get another error message: Traceback (most recent call last): File "<stdin">, line 1, in <module> File "extractimages.py", line 11, in load_images numimages = len(images) TypeError: object of type 'NoneType' has no len() [EDIT2] After installing another program to convert lxf to 3dxml, I get another Error. TypeError: expected bytes, not str. I think I'll stay with simple screenshots and rebuild it in photoshop. This seems to go a lot faster. Re: LDD questions - Rolf Osterthun - 2012-04-13 Hey, I am sorry that it did not work. I used Phyton 2.7.2... You can get the 3dxml file through the way Philo described here. I thought I mentioned that. Sorry.
Now you can use the Phyton script to get all the decorations. I would like to make them available to you. But currently I have no webspace to share them... Could you send me an eMail (rolf_osterthunATgmxPOINTde)? Rolf Re: LDD questions - Joshua Delahunty - 2012-09-20 Travis Cobbs Wrote:As far as I know, patterns in LDD are textures. There's a pretty good chance they could be extracted, but I don't know how to do so. saving the LDD bitmaps out to files was a driver for getting TEXMAP developed (none of them have been used since TEXMAP was made operational, though). |