LDraw.org Discussion Forums
render LDR or DAT attachments to posts like on parts tracker - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: Administrative (https://forums.ldraw.org/forum-4.html)
+--- Forum: Website Suggestions/Requests/Discussion (https://forums.ldraw.org/forum-23.html)
+--- Thread: render LDR or DAT attachments to posts like on parts tracker (/thread-201.html)



render LDR or DAT attachments to posts like on parts tracker - Steffen - 2011-07-31

Currently it appears sad to me that posts here in the forum
which contain a dat or ldr attachment are not visible graphically.
Can we add a feature that they get rendered on the server and get an image?


Re: render LDR or DAT attachments to posts like on parts tracker - Orion Pobursky - 2011-07-31

Currently this is not possible as the forums are on a different physical server than the tracker. If or when we switch over, this could be implemented by writing a module.


Re: render LDR or DAT attachments to posts like on parts tracker - Larry Pieniazek - 2011-07-31

Presumably the code could be copied over? But that seems like a big waste of effort for not a lot of benefit if there is a merger planned


intermediary solution - Steffen - 2011-08-06

As a merge of the servers is still far in the future (as it appears to me currently),
I think that a small intermediary solution would be feasible:

Why not simply install ldglite on the server
and have it render the attachments of *.ldr, *.dat, *.mpd
into some image cache folder when these uploads occur?
Or ask Travis to make LDView ready for batch usage via command line?
(Or maybe is it already?)

I think adding that feature is not too much work,
and it would make this forum much more useful / beautiful


Re: intermediary solution - Orion Pobursky - 2011-08-06

I've thought of this. I'll have to investigate if this is allowed/possible although I have no reason to suspect it's not. A couple of things are holding me back right now:
- the area I'm currently in has pitifully slow Internet.
- I need a Linux development platform since that's what the host uses

The first issue probably won't resolve itself until I get back to the US. The second is relatively easy to fix as soon as I can download a good Linux distro.


Linux - Steffen - 2011-08-06

I have this setup, and it works like a breeze for me:

- download VirtualBox http://www.virtualbox.org
- install Ubuntu on it http://www.ubuntu.com

This way I have a virtual machine running Linux, and I can go forward and backward in time
with it, so in case I screw up its configuration, I go back in time (to an older snapshot).

As said, works like a breeze. Was installed in less than 1 hour.


MediaWiki uses the same mechanism - Steffen - 2011-08-06

just FYI, I think you of course know that:
MediaWiki uses the same mechanisms, e.g. for its GraphViz (dot) plugin
(which I had been setting up as Admin on some server some day).

So there's a trigger when a file gets uploaded,
and whenever that happens, the plugin takes the newly appeared or touched input file,
processes it (e.g. runs it through ldglite) and puts the resulting image in an image cache folder.
The rendered web page then will reference that.
Very simple mechanism. Is also used by several other MediaWiki plugins, e.g. the LaTeX plugin


Re: intermediary solution - Travis Cobbs - 2011-08-06

Steffen Wrote:
-------------------------------------------------------
> Or ask Travis to make LDView ready for batch usage
> via command line?
> (Or maybe is it already?)

There is in fact a *nix command-line version of LDView. It's in the OSMesa directory of the LDView source tree and (as the directory name implies) uses the OSMesa API for offscreen rendering (no X Server connection needed). It does require either that OSMesa is installed on the deployment machine, or that it be statically linked on the build machine.


LDView or ldglite used for rendering on PT - Steffen - 2011-08-06

Chris, would you like to try this as well? Or is this all too much work maybe?
I am just thinking if we could let the logged-in users decide on their on
from which renderer they want their images,
but that would double the amount of images on the server.
On the other hand: they are pre-rendered, so once they are there, it should not be too much a problem
offering the users both renderers... hmmmm....

let's talk about this with Chris when he's back from vacation :-)


Re: LDView or ldglite used for rendering on PT - Orion Pobursky - 2011-08-06

Well more space would be fine if we were paying for our own webspace but right now Peeron is generously donating it.


Re: LDView or ldglite used for rendering on PT - Travis Cobbs - 2011-08-07

For what it's worth, media.peeron.com should already have a built copy of the OSMesa LDView on it. I did that a few years ago in an attempt to get the part tracker images rendered via LDView, but it never got hooked into the rendering scripts.


Re: LDView or ldglite used for rendering on PT - Chris Dee - 2011-08-18

I don't believe the server hosting media.peeron.com (vm2.pair.com) is the same as that hosting www.ldraw.org (qs546.pair.com), and there is no copy of ldview where I'd expect to find it on the www.ldraw.org server. The ldraw ldglite images are rsync'd to the media server once a day.


Re: LDView or ldglite used for rendering on PT - Travis Cobbs - 2011-08-18

Looking at the Makefile for the OSMesa version of LDView, there are two hard-coded hostname areas. The first is for slurm (media.peeron.com), and the second is for *.pair.com. I'm pretty sure this means that it has been compiled both on media.peeron.com and ?.pair.com, but I don't know what the ? is, and can't remember.

I am pretty sure that the built binary was never copied into any standard system location (by someone with root access). So it wouldn't likely be in an expected location, but instead buried in an LDView source tree in a home directory somewhere.


Re: render LDR or DAT attachments to posts like on parts tracker - Rolf Osterthun - 2011-09-23

Hey,

I have to be honest: I have no idea how to append an attachment to a post. I think that I do not see the wood for the trees. Can someone give me a hint?

Thanks, Rolf


Re: render LDR or DAT attachments to posts like on parts tracker - Orion Pobursky - 2011-09-23

Yeah. Just above the text entry area you'll see a paperclip icon with a link "Attach a file..." next to it. Click on the link, coose the file you want to attach, click the "Attach" button.


Re: render LDR or DAT attachments to posts like on parts tracker - Rolf Osterthun - 2011-09-23

Hey,

thanks for your answer. But I still don't get it. For me the reply area looks like this: Hardcopy.

If I look at the soure of the site I can't find any text like "Attach a file...". The only hint for possible attachments are two hidden input fields:

Code:
<input type="hidden" name="attachments" value="YTowOnt9" />
<input type="hidden" name="attachments:signature" value="ded79301c826150daf2d48ee4a0cb0cc" />

Sorry, Rolf


Re: render LDR or DAT attachments to posts like on parts tracker - Orion Pobursky - 2011-09-23

Try it now? I found a setting that may have been the issue.


Re: render LDR or DAT attachments to posts like on parts tracker - Rolf Osterthun - 2011-09-23

Yeah - it appears Smile

Thank you!

Was it my fault? Did or didn't I configure something? Or was it an general issue?

Rolf


Re: render LDR or DAT attachments to posts like on parts tracker - Orion Pobursky - 2011-09-23

General issue. Been wondering why no-one was posting models, your issue explained why.