LDraw viewer now in place
Posted by Huw,
Last week I mentioned that Legolijntje was working on indexing and uploading LDraw versions of official sets to the Brickset database.
In the comments to that article, nicola80, author of a plug-in for displaying LDraw models in your browser, offered to assist getting it working here at Brickset to enable those of you that don't have LDraw installed to view them.
Work on it is almost complete and most of the models can now be viewed. There's a new 'view' link on the index page and on set details pages, which, when clicked, will display a rotatable, zoomable, 3D version of the set in a new browser tab.
At the moment it's only working with .ldr files and not .mpd (multi-model) files but hopefully we'll get that resolved soon. The viewer works with both .ldr and .mpd files. Note that it might take a minute or two to load the parts and render the image, particularly with large models.
So, big thanks to Legolijntje and nicola80 for making it possible.
0 likes
19 comments on this article
This is a big piece of work. Nice job guys. Thanks for the efforts. I am looking forward to try it out!
OK, now I did test it and I love it! Maybe I will go back again to LDraw modelling!
Checking this out now. Sounds interesting!
EDIT: Will have to wait until I have the time to download LDraw onto my laptop. Don't have it yet. I'll give my feedback on it ASAP. ;-)
That's frigging awesome. Does it also work well if the sets contain parts that aren't rendered well by brigl due to limitations in the LDraw format (nicola knows which ones I'm referring to)?
Edit: nevermind, I see that the render errors are indeed there (for example, for a lot of wheels). Wish the LDraw folks would fix that stuff.
Nice Huw! However, mpd files still don't work for me (Firefox and Chrome).
@Jantjeuh, what errors do you mean? Could you give an example set/file?
Jantjeuh indeed brigl doesn't attempt at sanitizing bad part files. There are some viewer around that does (LDView for example) but the algorithm can be quite tricky to implement, and the issue really should be adressed in the ldraw part library once and for all. Unfortunately the guys at LDraw are extremely reclutant to upgrade their ancient file format.
What exactly do you mean?
Annoying, are they so hesitant to improve it due to backwards compatibility reasons?
I think we could use full-model LDraw rendering using brigl to deal with minifig assemblies when we start supporting these over @ Rebrickable. Up to Nathan though.
P.S.: I also have issues with the .mpd files. Chrome on Mac OS Yosemite.
Am I missing a trick as I can't get it to work? For example: I go to Set 918 as know it has LDraw file, I click on 'LDraw' tab then click 'View'. The 'Brickset LDraw model viewer' pops up. It says Loading XXX.dat for a few seconds whilst it downloads some data , then 'Model Loaded successfully' appears but there is no visible model. I am using Firefox as my browser. Any ideas, anyone?
Legolijntje have you tryed a CTRL-F5 to reload all the js script? Still doesn't work? At least one file will still not work (i think it's becouse it have an & in the file name), but the others should.
Here's a couple of examples of broken parts (wheels and droid body):
http://uploads.brickset.com/ldraw/brigl/view.aspx?f=4891%20-%20Highway%20Haulers%20%28Model%20C%29.ldr
http://uploads.brickset.com/ldraw/brigl/view.aspx?f=7141%20-%20Naboo%20Fighter.mpd
If i remember correctly, some files have errors on the quad definitions, such as bowties, nonplanar quads etc.
About upgrading the part library, many people have asked in the ldraw forum to update che format, expecially for including normals, but also to cease the CCW/CW/Inversion crazyness, etc. In general, to adopt some more modern solutions (IIRC the ldraw format predates all graphic cards and hardware acceleration)
^ I was going to suggest ctrl-F5, that should do the trick. If ampersands are causing problems Legolijntje has the means to change them :-)
Yes, this one for example doesn't work:
http://uploads.brickset.com/ldraw/brigl/view.aspx?f=4484%20-%20X-Wing%20Fighter%20&%20TIE%20Advanced.mpd
It can be seen that the filename it search is truncated (as & is a special char in urls). Renaming them should fix the issue (i think :) ).
'View' option doesn't work for me when using Safari - I get an "no webgl" error.
@ DrDaveWatford: that's because you have to enable WebGL in Safari, it's disabled there by default. Google has plenty of information on that.
Will we be seeing a similar function for LDD models sometime?
No -- there's no web viewer for them available.
Many thanks, Jantjeuh - now working perfectly in Safari!
@Bricklunch, I'm having the same problem. Plus it crashed Firefox. Nice idea, but I don't think I'll be using it.
@Paperballpark, Glad to see I'm not alone. Suspect making it work with every browser would be an endless task. Oddly it doesn't work for me with Firefox but works fine with Internet Explorer. Likewise, I don't think I will be bothering with it.