[LDView] Simplified boxes  Printable Version + LDraw.org Discussion Forums (https://forums.ldraw.org) + Forum: LDraw Programs (https://forums.ldraw.org/forum7.html) + Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum11.html) + Thread: [LDView] Simplified boxes (/thread24679.html) Pages:
1
2

Simplified boxes  Michael Horvath  20210612 I have been using LDBoxer to reduce the polycount of my models. https://github.com/Jeremy1980/LDBoxer Can anyone explain why framerate is not improved when using them in for instance LDView? Thanks. RE: Simplified boxes  Travis Cobbs  20210612 (20210612, 3:09)Michael Horvath Wrote: I have been using LDBoxer to reduce the polycount of my models. When I run the Python version of LDBoxer, it always says that it has boxed 0 parts. Are you sure it is actually doing anything? RE: Simplified boxes  Travis Cobbs  20210612 (20210612, 4:51)Travis Cobbs Wrote: When I run the Python version of LDBoxer, it always says that it has boxed 0 parts. Are you sure it is actually doing anything? The EXE version reports 0 parts boxed for all the models I've tried it on also. RE: Simplified boxes  Travis Cobbs  20210612 (20210612, 4:51)Travis Cobbs Wrote: When I run the Python version of LDBoxer, it always says that it has boxed 0 parts. Are you sure it is actually doing anything? I didn't fully read the instructions. I don't have the boxed parts. I'll grab those and see what happens. RE: Simplified boxes  Travis Cobbs  20210612 (20210612, 4:51)Travis Cobbs Wrote: When I run the Python version of LDBoxer, it always says that it has boxed 0 parts. Are you sure it is actually doing anything? The Python version isn't working for me (in macOS). The EXE version seems to work after installing the box files. However, when run on LDView's m6459.ldr sample model, it doesn't replace very many parts. I think I see a slight improvement in performance in some models. In the case of LDView, I'm not sure if LDView is detecting the boxed parts as being parts. If that is the case, it is likely responsible for sabotaging most of any performance gain that is gotten by having them be boxed. They are in the LDraw parts directory, but in a subdirectory. I can't remember offhand if that will be detected as being parts by LDView. They don't appear to have a metacommand indicating that they are parts, so if LDView doesn't consider them as such due to being in a subdirectory, then the metacommand is necessary. I would suggest adding the following line to the header of all the boxed parts: 0 unofficial part RE: Simplified boxes  Travis Cobbs  20210612 I tested, and it does appear that LDView is detecting the boxes as parts. So, my guess is that LDView spends more time traversing the parts in the model than it does drawing the geometry for each part. RE: Simplified boxes  Michael Horvath  20210612 (20210612, 5:23)Travis Cobbs Wrote: The Python version isn't working for me (in macOS). The EXE version seems to work after installing the box files. However, when run on LDView's m6459.ldr sample model, it doesn't replace very many parts. I think I see a slight improvement in performance in some models. Are there errors? I forgot to mention in the readme that I updated the script for Python 3. (Fixed now.) Thus the source code syntax is considerably different. Further, I use PyPy3 to run the script. That may potentially make a difference. RE: Simplified boxes  Michael Horvath  20210612 (20210612, 5:34)Travis Cobbs Wrote: I tested, and it does appear that LDView is detecting the boxes as parts. So, my guess is that LDView spends more time traversing the parts in the model than it does drawing the geometry for each part. I have also "inlined" my town MPD model to the "library level" using MPDCenter. This should have reduced the number of branches on the model tree to 1. I assumed this would produce a big performance boost, but it hasn't. Oh well. Kind of defeats the whole purpose of taking these steps and creating LDBoxer. RE: Simplified boxes  Travis Cobbs  20210612 (20210612, 20:29)Michael Horvath Wrote: Are there errors? I forgot to mention in the readme that I updated the script for Python 3. Thus the source code syntax is considerably different. Further, I use PyPy3 to run the script. That may make a difference. There are no errors. And the Python in current macOS Big Sur is 2.7.16. When I ran it on my m6459.ldr, it said it replaced 14 of 74 parts. However, while the boxed version of the file had the boxed summary comments at the bottom indicating how many parts of each type and total parts had been replaced, there were in fact no replacements. RE: Simplified boxes  Michael Horvath  20210612 (20210612, 20:40)Travis Cobbs Wrote: There are no errors. And the Python in current macOS Big Sur is 2.7.16. When I ran it on my m6459.ldr, it said it replaced 14 of 74 parts. However, while the boxed version of the file had the boxed summary comments at the bottom indicating how many parts of each type and total parts had been replaced, there were in fact no replacements. Python 3.x is not backwardscompatible with Python 2.x. They're *not* designed to work together. That being said, I'm surprised there were no errors. Can you attach the model to your next post so I can figure out what is going on? 