LDraw.org Discussion Forums

Full Version: render LDR or DAT attachments to posts like on parts tracker
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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?
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.
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
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
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.
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.
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
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.
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 :-)
Well more space would be fine if we were paying for our own webspace but right now Peeron is generously donating it.
Pages: 1 2