LDraw.org Discussion Forums

Full Version: LDraw Model Viewer and Online Tools
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
A model viewer has been added to the LDraw.org website. This new tool will allow you to upload a model and view it in your browser. It's fairly basic at the moment but functionality will continue to be added.

It can be found in the Tools menu on the LDraw.org main site (click the red brick logo above) or directly here:
https://www.ldraw.org/tools/ldraw-model-viewer.html

This new feature is a continuation of an effort started with the LDCad PBG Generator to bring a series of useful tools to the LDraw.org website. Future plans include an model OMRizer and a part error checker.

As always, feature requests and improvements can be posted in the Website Suggestions forums.
(2020-07-01, 16:22)Orion Pobursky Wrote: [ -> ]A model viewer has been added to the LDraw.org website. This new tool will allow you to upload a model and view it in your browser. It's fairly basic at the moment but functionality will continue to be added.

It can be found in the Tools menu on the LDraw.org main site (click the red brick logo above) or directly here:
https://www.ldraw.org/tools/ldraw-model-viewer.html

This new feature is a continuation of an effort started with the LDCad PBG Generator to bring a series of useful tools to the LDraw.org website. Future plans include an model OMRizer and a part error checker.

As always, feature requests and improvements can be posted in the Website Suggestions forums.

OK, nice! Works quite smoothly.
What happens to the files you submit? Are they kept or temporary and deleted after viewing?
One suggestion if possible would be to adjust the lighting.
(2020-07-01, 18:01)Jaco van der Molen Wrote: [ -> ]What happens to the files you submit? Are they kept or temporary and deleted after viewing?

Nothing. Everything is handled in browser and it never leaves your computer.

This may change slightly in the future. For the PT, I send the part number to be displayed to the server and it sends back a list of the parts and primitives used in the file. This helps speed the processing of the file since the viewer doesn't need to ping 2/3/4 separate address to figure out where the part data is (official/unofficial parts/p/textures). For models, the script used will get the model data but it won't be saved anywhere, only used internally by the script.
(2020-07-01, 19:27)Orion Pobursky Wrote: [ -> ]Nothing. Everything is handled in browser and it never leaves your computer.

This may change slightly in the future. For the PT, I send the part number to be displayed to the server and it sends back a list of the parts and primitives used in the file. This helps speed the processing of the file since the viewer doesn't need to ping 2/3/4 separate address to figure out where the part data is (official/unofficial parts/p/textures). For models, the script used will get the model data but it won't be saved anywhere, only used internally by the script.

Really looks nice, and I like the way it is construction the model.

But is it loading unofficial Parts properly? I tried a model using part 24121 (unoff), it did not show this part.


PS: On the main page, the part images don't show
(2020-07-01, 20:30)Gerald Lasser Wrote: [ -> ]But is it loading unofficial Parts properly? I tried a model using part 24121 (unoff), it did not show this part.

It's not scanning for unofficial parts at all right now. That would slow down loading even more. Once I implement the script I mention above, it will.
It works really smoothly. Well done. You can get stud logos if you include the texture loading. The default textures are fairly small for performance, but I can generate some that are larger if you think that would be worth the effort.
(2020-07-01, 19:27)Orion Pobursky Wrote: [ -> ]This may change slightly in the future. For the PT, I send the part number to be displayed to the server and it sends back a list of the parts and primitives used in the file. This helps speed the processing of the file since the viewer doesn't need to ping 2/3/4 separate address to figure out where the part data is (official/unofficial parts/p/textures). For models, the script used will get the model data but it won't be saved anywhere, only used internally by the script.

Scratch all this. The way I'm going to implement will not require sending model data to the server. Therefore any model you use will never go anywhere but your browser.
(2020-07-01, 22:08)Lasse Deleuran Wrote: [ -> ]You can get stud logos if you include the texture loading..

I basically copied your sample code so if that doesn't load textures then the model viewer won't either. 
As for logos, this is the bug I reported. When I do stud logos, the loader want 3-4disc but never actually tries to load it.
(2020-07-01, 22:35)Orion Pobursky Wrote: [ -> ]I basically copied your sample code so if that doesn't load textures then the model viewer won't either. 
As for logos, this is the bug I reported. When I do stud logos, the loader want 3-4disc but never actually tries to load it.
I see. I have fixed the bug so that 3-4disc is loaded using Generator. Or rather. You fixed it in your bug report and I just verified and applied it.
I've updated the model viewer. It now pulls unofficial parts If they're not included in the model. Additionally, I've implemented a part path prefetch (like is used on the PT) to speed up loading. There is a note about how the model data is used at the bottom of the page.
Pages: 1 2