LDraw.org Discussion Forums
LDView64 and rendering submodels - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html)
+--- Thread: LDView64 and rendering submodels (/thread-8809.html)

LDView64 and rendering submodels - Matija Puzar - 2013-04-01

Is it only me or...? At first I thought LDView was making an April joke, which was almost a bit funny too. The thing is, if you have more than one copy of a submodel, LDView will render all of them a bit smaller. And - the more you have, the smaller all of them get! Smile

I tried this with the 64bit versions of 4.2 Beta 1 (downloaded from SF) and that I had previously compiled for 64bit. The 32bit version of does not show this behaviour.

Steps to reproduce - make a model with one simple submodel (a 1x1 brick is enough), copy the submodel 4 times or so into the main model, and see what happens. Then double the amount of the submodels and press F5 in LDView.
Or download the model attached to this message.

Re: LDView64 and rendering submodels - Max Martin Richter - 2013-04-01

I had the same problem and after that a short correspondence with Travis.
But as far as I know there is no solution for the moment.


Re: LDView64 and rendering submodels - Travis Cobbs - 2013-04-01

There is indeed a bug in LDView's seams functionality that causes things to get smaller in situations where they shouldn't. This bug has been present in LDView for a very long time. I haven't yet tracked down the source of the bug, but once I do, I'll provide you with information about a test version you can try.

If you disable seams, the problem should go away.

Re: LDView64 and rendering submodels - Roland Melkert - 2013-04-02

This sounds like an accumulation bug. Maybe you are modifying an object passed by reference multiple times?

Just my 2cts

Re: LDView64 and rendering submodels - Travis Cobbs - 2013-04-02

Thanks. I'm definitely applying the modification mutliple times. LDView only has one copy of the internal geometry for each part, with multiple references to the part all pointing to the same data. (Different colors are handled with glColor...() and glColorMaterial().) However, each placed part has an object I term "submodel" as its parent in the tree that contains that instance's transformation matrix and color. The seams modification gets applied to that "submodel".

A quick glance at my code shows me that it incorrectly assumes that the "submodel" itself is unique, which isn't true. If parts are just added to the main model, then it's true, but if they're in sub-models, and the sub-models are used mutliple times, the seam modification gets applied multiple times. Fortunately, it's easy enough to fix (just flag the "submodel" as already shrunk, so that it will only be shrunk once).

Oddly, I'm pretty sure this bug has been present since at least LDView 3.0, which was release in December of 2005. However, the first time it was reported to me was within the past year or so.

Re: LDView64 and rendering submodels - Matija Puzar - 2013-04-03

Strange, since (as mentioned earlier), it does not manifest in the 32 bit version, at least not in my (but does in the same version recompiled for 64 bit).

Re: LDView64 and rendering submodels - Travis Cobbs - 2013-04-03

Apparently it was indeed introduced more recently than I had thought. There never was a 64-bit version of 4.1 for Windows. I think the 64-bit version on Linux may have been based on more recent code than the 32-bit version there.