jamesster

[Software] 3DXML to OBJ - Converts LDD model captures to OBJ

Recommended Posts

3DVIA Printscreen can capture LEGO Digital Designer models and save them as 3DXML files. It was discontinued years ago, but can still be downloaded from the web archives (direct installer link).

Not many programs can load 3DXML files, so I made a program to convert them to OBJ. It does some other helpful things too.

Download

The resulting models are far more optimized for realtime rendering (games, AR, etc) than exports from other LEGO building software, thanks to LDD's hidden stud/tube removal. For example, a small house model that's 50350 tris exported from LeoCAD is only 13548 tris with this method - and with some additional tricks, only 2586 tris. More info here.

I've only made this to work with LDD captures, compatibility with captures from other programs is not guaranteed. It will automatically name materials and textures with their official LEGO names/IDs.


Setup:

Usage:

  • Save your LDD model in 3DXML to OBJ's "Models" folder.
  • Launch 3DXML to OBJ and enter your LDD model name in the first text box, then click "Move camera". This saves a new LDD model with the camera set in the proper position for 3DXML capturing.
  • Open the new LDD model (it will have CAM_SET in the name) and capture it to a 3DXML file with 3DVIA Printscreen. Make sure it's saved in 3DXML to OBJ's "Models" folder, like the LDD models.
  • Enter the name of your 3DXML file into the second text box in 3DXML to OBJ. I recommend leaving "Weld duplicate vertices" enabled. Choose a new color palette if you'd like, and click "Convert".

It sounds more complicated than it is. Here's a model being converted and imported into Unity:


And now, the advanced features, which are mostly for LEGO Universe-style color variation, but keep reading for some geometry removal tricks too.

For color variation, we need to randomly adjust the color of each brick... But, LDD often batches bricks of the same color together into one mesh. Thus, we can't do it after capturing a model. We have to have the randomized colors displayed in LDD itself. So, it's LDD modding time!

Setting up color variation:

  • Download this LIF Extractor.
  • Extract db.lif, found at C:\Users\YOURNAMEHERE\AppData\Roaming\LEGO Company\LEGO Digital Designer
  • Put the resulting db folder where the original db.lif file was, and rename db.lif to something else so LDD will use your extracted data instead of the original file.
  • Inside your db folder is Materials.xml. Put a copy of it in the same folder as the 3DXML to OBJ EXE.
  • Launch 3DXML to OBJ and click the "Advanced" button.
  • In the "Edit Materials.xml" box, choose what changes to make. You can add color variation and also apply changes to the base color palette. Click "Edit" and it will create a new XML file.
  • Now you'll want to update the program's own internal color definitions. Enter the name of the XML file you just created in the box below, and click "Update color definitions".
  • Replace LDD's Materials.xml with your new version.

Again, this all sounds more complicated than it is. There's a video further below showing how it's done.

Adding color variation to LDD models is simple enough; in advanced mode there's an option for it in the same box where you set the camera position in your LDD model. Just choose how strong you want the variation to be.

I strongly recommend converting all the materials to vertex colors for models with color variation. How you do this will depend on what software you prefer; in the video below I'm using Ultimate Unwrap 3D.

There's one more advanced feature: You can keep meshes of certain colors from receiving color variation and/or being exported. This is useful for "dummy bricks" only placed in the model to trip LDD's hidden geometry removal. In 3DXML to OBJ_Data\StreamingAssets, you will find "Color Export Exclusion.txt" and "Color Variation Exclusion.txt". Add the desired color IDs here, one per line.

Covering studs is obvious enough, but tubes are a bit more finicky. Original LDD model, vs export with the dummy bricks excluded:

hzpSjVm.png

JkOiUsp.png

E76r9Lh.png

  • A simple brick has the entire underside present. These quickly add up to loads of polygons.
  • Placing 1x1 round plates across the surface causes LDD to replace the underside with two triangles. Nice! There's a small handful of other parts with this effect, but 1x1 round plates are the best.
  • In fact, even just one 1x1 round plate can trigger this so long as the rest is still covered.
  • Covering the bottom entirely will cause LDD remove it 100%.
  • Beware: Some bricks, like those rounded 2x2 pieces, will look like they have the same effect as 1x1 round plates, but actually don't... They still leave much of the tubes intact.

This trick is how I got that house with 13548 tris down to only 2586 tris - simply by capping off the bottoms of the roof and walls.

And finally, here's a video showing all of the advanced features, if the text wasn't clear enough:

 


More tips and tricks!

If 3DVIA Printscreen is causing LDD to freeze and/or not launch, see this post.

If you have developer mode enabled in LDD, you can press Shift W to toggle wireframe mode. You can also turn rendering of different parts of bricks on and off. LDD's bricks come in four sections, and can be toggled as such:

  • K: Toggles studs
  • Shift K: Toggles bottom and inside of tubes
  • Q: Toggles outside of brick
  • Shift Q: Toggles bottom and inside of brick

You can use this to, for example, capture a model without studs, and use that as a lower LOD.

Don't have developer mode enabled? Go to the same AppData folder as db.lif and developermode=1 to preferences.ini.

If you've modded LDD's decorations, or LDD has updated, you can update 3DXML to OBJ's internal texture definitions - just copy the Decorations folder from db to the same folder as 3DXML to OBJ's EXE, and click the button for it in advanced mode. (In case you're curious what this does: The program keeps a list of MD5 hashes of texture data, along side their file names/IDs. This allows the program to identify what textures are what in a 3DXML file, without actually containing any of the texture data itself.)

You can add your own custom color palettes, just go to 3DXML to OBJ_Data\StreamingAssets\Custom Palettes and use the existing files as examples of how they work.

If for some reason you need to, Shift R resets 3DXML to OBJ's saved preferences (resolution, most recent conversion options, etc).

Replacing colors when converting a 3DXML with color variation will work... But look very strange, as it'll only affect bricks that happen to be the original color values. The ones that have been slightly lightened or darkened won't be changed.

You can mod lower LODs of bricks from LU into LDD... But that'd be its own topic.

Edited by jamesster

Share this post


Link to post
Share on other sites

You did great job on this hard topic. From my perspective, as developer. If you can make this app more usable:

6 hours ago, jamesster said:

Note that 3DVIA Printscreen must be launched before LDD

According to result you can have accomplished, is different style to run external program from own. Try the best way with System.Diagnostics.Process . 

6 hours ago, jamesster said:

First, you should know that when 3DVIA Printscreen captures a model, the position and rotation of LDD's camera are applied to the geometry of the model itself. To avoid your model being rotated/positoned awkwardly, save your LDD model as an LXFML, then open it in a text editor. Near the beginning of the file you'll see a line that goes something like this:

Carry on user, like that - can generate many nervous mistakes. Your app should do it this string manipulation .

Share this post


Link to post
Share on other sites

Thanks for the feedback! I'm not sure I can do anything about the first point, as it has to do with 3DVIA Printscreen, rather than my 3DXML to OBJ program (which only converts the 3DXML files 3DVIA Printscreen creates). But I can certainly add a feature to change the camera position in LXFML files automatically (and LXF files too, as they're just renamed ZIP files containing LXFMLs).

Share this post


Link to post
Share on other sites

I use 3DVIA Printsceen with SimLab for Modo. This will convet also a color table and I can replace this with a setup in Modo with one click.

Here are some LDD captured renderings.

It would make sense to use Collada with instances. But due to missing intormations for each brick this might not work to create instances. The actual LeoCAD can import LDD information. From here you can use LDR to import with Blender with this great and fast addon what also supports good looking plastic shaders and very. very important: instances.

ImportLDRaw

Edited by Renderbricks

Share this post


Link to post
Share on other sites
48 minutes ago, Renderbricks said:

I use 3DVIA Printsceen with SimLab for Modo. This will convet also a color table and I can replace this with a setup in Modo with one click.

Here are some LDD captured renderings.

It would make sense to use Collada with instances. But due to missing intormations for each brick this might not work to create instances. The actual LeoCAD can import LDD information. From here you can use LDR to import with Blender with this great and fast addon what also supports good looking plastic shaders and very. very important: instances.

ImportLDRaw

Yeah, there's an import script for 3ds Max as well, but both that and the method you described are dependent on using specific modeling software. I wanted a tool that would just work on its own, so I made one (or am still making, rather, as there's still material + textures to get to, but the geometry is the most important bit for my own personal usage).

Also, I'd only alluded to this slightly, but the main benefit of using 3DVIA Printscreen captures from LDD is that the models immediately come out much, much more optimized for realtime rendering (in games or anything else interactive, aka nearly all my 3D LEGO projects) than with any other currently available method. Hidden studs and tubes are automatically removed, saving substantial amounts of work, and LDD's brick geometry is altogether far more optimized for realtime rendering than the LDraw library. Since most of Eurobricks is probably focused on making pretty renderings like the ones you linked to (very nice, BTW!), rather than interactive/realtime rendering projects, I'll add some text at the start of the topic mentioning that it's more useful for the latter.

Edited by jamesster

Share this post


Link to post
Share on other sites

I've been working on other projects this month but took a quick break from them to add the LXF/LXFML camera position editing feature mentioned by @Jarema. Download link in the first post has been updated. Also did some comparisons in triangle count between 3D LEGO libraries/export methods, in case anyone was wondering just how much more optimized these models are, mostly thanks to LDD's hidden stud/tube removal - I added them to the first post, but here they are again:

On 8/3/2017 at 9:12 PM, jamesster said:

Certainly nothing to sneeze at if you're doing realtime rendering stuff, especially the more complex your models are. (And they can still be optimized further from the LDD captures, especially if you have specific usage in mind - for example, if the test house were in a game, players would be unlikely to see the tubes for the underside of the roof. So by removing them + making some misc other optimizations by hand, I was able to get the test house down to a mere 884 triangles! Which is probably optimization overkill, but I wanted to see how far I could go with it, haha.)

Edited by jamesster

Share this post


Link to post
Share on other sites

Added material and texture loading/exporting today; first post updated accordingly. There's still one feature idea I might add if/when I feel like it: Comparing colors against a bunch of "known colors" to give them their proper LEGO color names (since LEGO color names/IDs aren't preserved in 3DXML rips). Would be much nicer to work with than Material0, Material1, etc.

Share this post


Link to post
Share on other sites
On 8/4/2017 at 0:10 PM, Renderbricks said:

It would make sense to use Collada with instances. But due to missing intormations for each brick this might not work to create instances. The actual LeoCAD can import LDD information. From here you can use LDR to import with Blender with this great and fast addon what also supports good looking plastic shaders and very. very important: instances.

LeoCAD exports Collada with instances directly.

 

Share this post


Link to post
Share on other sites
On 9/1/2017 at 8:10 PM, Renderbricks said:

I remember that there was a converter for the proprietary binary mesh format of the parts in Assets.lif. But it has disappeared. Maybe because of copyright infringement?

Yeah, a friend of mine made that some years back - as far as I know, he didn't encounter any infringement issues, but was worried he might, and pulled it from GitHub himself preemptively. It didn't support flexible elements, textures/UV maps, or multi-color pieces though.

On 9/1/2017 at 8:10 PM, Renderbricks said:

It would be possible to develop a direct importer of LXF data to get rid of the 3dvia Printscreen workflow. I wished I was a coder. :-)

That'd be the ideal solution - I imagine the hardest part in matching a 3DVIA Printscreen rip with that method would be re-implementing LDD's hidden surface removal (which LEGO patented, in fact), as that'd involve reverse engineering the connectivity system to determine what parts of a brick to hide or replace. With 3DVIA Printscreen, you get the model with that already done by LDD.

Anyway, I've updated the program twice since I last added a reply here. In short:

  • Colors and decorations are now given their proper LEGO names/IDs. 3DXML files don't contain this info, but the program has a list of all of LDD's colors and hashes of all its decorations - so it can accurately look up things it finds in the 3DXML and match them to their official names/IDs, without containing any actual LDD data/files itself. It's also capable of regenerating its internal lists from official LDD data, in case LDD ever adds/changes them in an update. The options for that are in the program's developer menu (accessed via Shift + D)... I'll probably put more details on the GitHub readme later.
  • Added custom color palettes (for if you want to replace LDD's RGBA values/names with your own - I've included a custom palette file of the LEGO Universe MMO's color palette as an example).
  • The program now automatically enforces valid OBJ/MTL names. So, no longer any chance of surprises with materials not loading because your MTL has a space in the name (which is officially disallowed by the format).

There's a few other additions/changes, and a bug fix for how some colors were loading with slightly incorrect RGB values (bad rounding when reading from the 3DXML), but the above is the important stuff. Download link is in the first post, blah blah.

Edited by jamesster

Share this post


Link to post
Share on other sites

More updates have happened since I last posted - mostly related to LEGO Universe-style color variation, but it also now comes in a 64-bit version, and mesh welding on large models now takes a fraction of the time it used to thanks to grappigegovert. Also revised the first post.

Share this post


Link to post
Share on other sites
On 26/11/2017 at 7:51 PM, jamesster said:

More updates have happened since I last posted - mostly related to LEGO Universe-style color variation, but it also now comes in a 64-bit version, and mesh welding on large models now takes a fraction of the time it used to thanks to grappigegovert. Also revised the first post.

Hi jamesster!

I've just this moment started seeing an error when converting even simple 3DXML files. I installed 3DS Max last night, which is the only change that's happened to my computer (and possibly Windows update changing the .Net files?)

The VERY SAME copy of the converter in my virtual Windows 7 machine works fine!

The error log file shows the following - the filename is empty?! If this is a .Net update of an existing version (crazy MS!)  -this kinda thing's happened to me in the past - other people will start seeing the error too!

I've clicked "Notify me of replies" to see if you ever get this message.

 

Initialize engine version: 5.6.4p1 (e67c4b7007d5)
GfxDevice: creating device client; threaded=1
Direct3D:
    Version:  Direct3D 11.0 [level 11.1]
    Renderer: NVIDIA GeForce GTX 970 (ID=0x13c2)
    Vendor:   NVIDIA
    VRAM:     4058 MB
    Driver:   23.21.13.8813
Begin MonoManager ReloadAssembly
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.dll (this message is harmless)
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.West.dll (this message is harmless)
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Assembly-CSharp-firstpass.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Assembly-CSharp-firstpass.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Assembly-CSharp.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Assembly-CSharp.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.UI.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.UI.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.Networking.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.Networking.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.CJK.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.CJK.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.MidEast.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.MidEast.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.Other.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.Other.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.Rare.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.Rare.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.West.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.West.dll into Unity Child Domain
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Ionic.Zip.dll (this message is harmless)
Loading F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Ionic.Zip.dll into Unity Child Domain
- Completed reload, in  0.057 seconds
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\System.Core.dll (this message is harmless)
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\System.dll (this message is harmless)
Platform assembly: F:\sarah\Desktop\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\System.Xml.dll (this message is harmless)
<RI> Initializing input.
<RI> Input initialized.
desktop: 1920x1200 59Hz; virtual: 3840x1200 at -1920,0
<RI> Initialized touch support.
UnloadTime: 1.140126 ms
No camera moving setting saved
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

No color editing setting saved
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

No variation strength setting saved
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

OutOfMemoryException: Out of memory
  at (wrapper managed-to-native) string:InternalAllocateStr (int)
  at System.Text.StringBuilder.InternalEnsureCapacity (Int32 size) [0x00000] in <filename unknown>:0 
  at System.Text.StringBuilder.Append (System.Char[] value, Int32 startIndex, Int32 charCount) [0x00000] in <filename unknown>:0 
  at System.IO.StreamReader.ReadToEnd () [0x00000] in <filename unknown>:0 
  at System.IO.File.ReadAllText (System.String path, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0 
  at System.IO.File.ReadAllText (System.String path) [0x00000] in <filename unknown>:0 
  at Manager.Load3dxml () [0x00000] in <filename unknown>:0 
  at Manager.DoStuff (Boolean exportModel, Boolean weldModel) [0x00000] in <filename unknown>:0 
  at Manager.OnGUI () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

Setting up 4 worker threads for Enlighten.
  Thread -> id: f4 -> priority: 1 
  Thread -> id: f0 -> priority: 1 
  Thread -> id: 49a4 -> priority: 1 
  Thread -> id: 4960 -> priority: 1 
 

Share this post


Link to post
Share on other sites

Looks like it's running out of memory while loading the 3DXML...? Odd; it's somewhat easier for that to happen on 32-bit builds since they have a memory limit that can be reached with very large models... But you're running the 64-bit version, and said it even happens with simple 3DXMLs. Hrm. Do you have other things running which could be leaving not enough room for 3DXML conversion? The converter has a memory footprint that's bigger than you might think (certainly bigger than I thought, and I made the thing... I'd like to look into optimizing that sometime).

If that's not the issue, and it is something like another update interfering... hm. Well, I'll keep an eye on it and update it if I figure anything out. I'll be updating it to a new version of Unity sooner or later to take advantage of the 32-bit mesh index buffers introduced in Unity 2017.3 (won't affect actual conversion, just viewing within the program), but I'd like to wait for that version of Unity to be patched a bit first (the engine has had a history of putting out updates with significant bugs recently...).

Edited by jamesster

Share this post


Link to post
Share on other sites

It's an interesting situation!

Hopefully it only occurs just on my machine - I'll do some more looking to see if I can get a concrete reason.

I was reading before that "append" needs congruent memory to allocate the space, perhaps something on my machine's chopping it up at boot, because I've even tested just after logging in.

I'd almost be certain it's something like you said about the memory requirements, apart from one thing - the VM's only got 4GB, my main rig's got 32GB RAM, which makes me think it's something on my system interfering with .Net.... either a DLL from 3D Max, or a .Net update. I'm not ruling out chopped up memory though, but it looks less likely.

When I mentioned "simple" I didn't give the details - it was about 4 bricks - 9K file in 3DXML. Super tiny! I've had success converting 50MB 3DXML files.

The 3DS Max installer I notice comes with "resources"  -a bunch of things like VC++ runtime, and lots of other things... that could be a suspect too.

I think I'll copy the converter over to my work machine later - which is also Windows 10, a Windows update would mean the bug follows me over to that one.

If not, and nothing changes in the next few days - it must be something new on my system... 3DS Max is my main suspect.

 

 

 

Share this post


Link to post
Share on other sites

So I'm having an interesting problem... Whenever I open up 3D Printscreen and LDD, LDD will not load or do anything.  In fact, if I launch 3D Printscreen before LDD, then LDD won't launch at all.  Is there a fix for this?  I spent a while trying to figure out why LDD was acting so strangely and finally figured out that it was 3D Printscreen causing the problem.  Any fixes?

Share this post


Link to post
Share on other sites
23 minutes ago, JGuy said:

So I'm having an interesting problem... Whenever I open up 3D Printscreen and LDD, LDD will not load or do anything.  In fact, if I launch 3D Printscreen before LDD, then LDD won't launch at all.  Is there a fix for this?  I spent a while trying to figure out why LDD was acting so strangely and finally figured out that it was 3D Printscreen causing the problem.  Any fixes?

Ah, I've run into that on my laptop, which has two graphics drivers/devices - Intel integrated graphics, and an NVIDIA card. I had the problem you describe when LDD was set to run on the NVIDIA card, but it worked fine once I went into the NVIDIA Control Panel and made it use integrated graphics instead.

I even had to do the same for other programs like Discord (a chat program), which would similarly refuse to launch or freeze if 3DVIA Printscreen was running (LDD was technically starting, but immediately freezing, so nothing would happen, despite the Task Manager confirming it was running).

Share this post


Link to post
Share on other sites
44 minutes ago, jamesster said:

Ah, I've run into that on my laptop, which has two graphics drivers/devices - Intel integrated graphics, and an NVIDIA card. I had the problem you describe when LDD was set to run on the NVIDIA card, but it worked fine once I went into the NVIDIA Control Panel and made it use integrated graphics instead.

I even had to do the same for other programs like Discord (a chat program), which would similarly refuse to launch or freeze if 3DVIA Printscreen was running (LDD was technically starting, but immediately freezing, so nothing would happen, despite the Task Manager confirming it was running).

Hmm... I don't know much about graphics drivers, and I apparently have an AMD graphics driver.  Any idea how to change that over to integrated graphics?

Thanks for the response :)

Share this post


Link to post
Share on other sites
27 minutes ago, JGuy said:

Hmm... I don't know much about graphics drivers, and I apparently have an AMD graphics driver.  Any idea how to change that over to integrated graphics?

Thanks for the response :)

Hm, I'm not so familiar with AMD stuff - try right clicking on your desktop and seeing if anything helpful is in the menu that comes up.

Also: Try opening the Device Manager (should come up if you just search for it in the start menu) and see what you have under display adapters. For example, here's mine:

OHwYpci.png

Share this post


Link to post
Share on other sites

Ah, that's not a good problem to have. It's very hard to diagnose when there's no error messages.

Check your "Event viewer" too - under "Applications". I know the program hung, but it may have reported some kind of problem before grinding to a halt.

Also - the old "fallback" - are your drivers up to date? It's a long shot, but there MAY be something in your AMD driver that is causing the hang and it MAY be fixed in the latest version.

Something else to consider - is 3DPrint the problem, does it crash other 3D programs on your machine if you try loading them up? It's not in development, so if this is the case, and the drivers for your card are up to date, I can't think of anything else to try.

(If everything else fails - you should be able to get it running in VMWare Workstation, in Windows 7.)

Share this post


Link to post
Share on other sites

Hi! 

I've ran into a problem  with the converter when trying to convert the 3dxml file

When I press the "Convert" button it does nothing. I'm pretty sure I got the naming and file location right.

But when I checked the output_log.txt, it has this message:

Initialize engine version: 5.6.4p1 (e67c4b7007d5)
GfxDevice: creating device client; threaded=1
Direct3D:
    Version:  Direct3D 11.0 [level 11.0]
    Renderer: NVIDIA GeForce GTX 850M (ID=0x1391)
    Vendor:   NVIDIA
    VRAM:     3995 MB
    Driver:   24.21.13.9731
Begin MonoManager ReloadAssembly
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.dll (this message is harmless)
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.West.dll (this message is harmless)
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Assembly-CSharp-firstpass.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Assembly-CSharp-firstpass.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Assembly-CSharp.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Assembly-CSharp.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.UI.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.UI.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.Networking.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\UnityEngine.Networking.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.CJK.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.CJK.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.MidEast.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.MidEast.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.Other.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.Other.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.Rare.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.Rare.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.West.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\I18N.West.dll into Unity Child Domain
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Ionic.Zip.dll (this message is harmless)
Loading C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\Ionic.Zip.dll into Unity Child Domain
- Completed reload, in  0.172 seconds
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\System.Core.dll (this message is harmless)
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\System.dll (this message is harmless)
Platform assembly: C:\Users\Tong Xin Jun\Downloads\3DXML to OBJ v1.8.0 64-bit\3DXML to OBJ v1.8.0 64-bit_Data\Managed\System.Xml.dll (this message is harmless)
<RI> Initializing input.
<RI> Input initialized.
desktop: 1920x1080 60Hz; virtual: 1920x1080 at 0,0
<RI> Initialized touch support.
UnloadTime: 1.593991 ms
No camera moving setting saved
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

No color editing setting saved
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

No variation strength setting saved
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

UnityException: LoadRawTextureData: not enough data provided (will result in overread).
  at (wrapper managed-to-native) UnityEngine.Texture2D:LoadRawTextureData_ImplArray (byte[])
  at UnityEngine.Texture2D.LoadRawTextureData (System.Byte[] data) [0x00000] in <filename unknown>:0 
  at Manager.Load3dxml () [0x00000] in <filename unknown>:0 
  at Manager.DoStuff (Boolean exportModel, Boolean weldModel) [0x00000] in <filename unknown>:0 
  at Manager.OnGUI () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

Share this post


Link to post
Share on other sites

Hm, that's a new one. First, just to be sure, double check that your 3dvia Printscreen settings look like this: https://i.imgur.com/3sRX7Cl.png (I don't expect this is the problem but it's worth a shot.) If you're still having trouble could you send me the 3dxml you're trying to convert via PM? Perhaps the original LDD model too.

Edit: I'm currently suspecting this may be a bug or quirk in the Unity engine itself that only arises on some systems, or something along those lines - it was working for ExeSandbox at first, but now it's not, and I haven't been able to replicate the issue; the same 3dxml that breaks for them works a-ok for me... I'll be updating this project to a newer version of Unity as soon as I have an internet connection that can handle downloading it, perhaps it will resolve itself then.

Edit: ... and now ExeSandbox can't replicate the problem anymore either; it's working fine... Welp. Dunno what happened there, lol.

Edited by jamesster

Share this post


Link to post
Share on other sites

Nice work, what you've done here is very interesting. I've tried it with a few smaller models and obj files were created successfully, but when I tried to use a larger model (of a Lego castle as a test), I got an error message saying "Too many heap sections". Am I correct to assume this is because my computer doesn't have the ram to pull it off, and there's nothing I can do in this situation? Thanks, it might be helpful for me to mention that the computer I'm using is very old and has a 32-bit OS and only 4 GB of ram. 

 

PS: Are you the same jamesster that used to post LEGO Universe videos?

heap sections.PNG

Share this post


Link to post
Share on other sites
14 minutes ago, Aldrin said:

Thanks, it might be helpful for me to mention that the computer I'm using is very old and has a 32-bit OS and only 4 GB of ram

Yeah, that's almost certainly gonna choke on large models, unfortunately.

19 minutes ago, Aldrin said:

PS: Are you the same jamesster that used to post LEGO Universe videos?

Still do, occasionally.

Share this post


Link to post
Share on other sites

It's not working for me again for some reason :D I tried switching between graphic processors, folder arrangements, launching LDD first or last, but it does nothing when I press the convert button...

Error message still remains the same:

UnityException: LoadRawTextureData: not enough data provided (will result in overread).
  at (wrapper managed-to-native) UnityEngine.Texture2D:LoadRawTextureData_ImplArray (byte[])
  at UnityEngine.Texture2D.LoadRawTextureData (System.Byte[] data) [0x00000] in <filename unknown>:0 
  at Manager.Load3dxml () [0x00000] in <filename unknown>:0 
  at Manager.DoStuff (Boolean exportModel, Boolean weldModel) [0x00000] in <filename unknown>:0 
  at Manager.OnGUI () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

(Does it have anything to do with me having an outdated version of Unity installed)

Edited by ExeSandbox
Had to add some stuff in.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.