Protocol for LuxRender servers

General discussion regarding exporter development in general.

Moderators: Ratow, coordinators

Protocol for LuxRender servers

Postby strattonbrazil » Tue Apr 24, 2012 9:22 pm

Is there a protocol of specification for using LuxRender servers from a custom client?

For example...

  1. launch a luxrender a luxrender server
  2. send scene to server via a TCP socket (either the entire luxrender file or through JSON or other format)
  3. read continuous render images back from the server

Is that possible? Would that be pretty involved to modify the server to support that?
strattonbrazil
 
Posts: 5
Joined: Mon May 02, 2011 10:32 am

Re: Protocol for LuxRender servers

Postby SATtva » Tue Apr 24, 2012 10:48 pm

Can you be a bit more specific on why you need that? Lux has network rendering support built in. What are you trying to achieve?
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Protocol for LuxRender servers

Postby strattonbrazil » Tue Apr 24, 2012 11:01 pm

Well, as I said, I'm aware luxrender has a network server that one can instantiate and send requests via a luxconsole. I'm wondering if there is any protocol or specification for working with this server without using any luxrender code on the client side.

For example, something like the following pseudocode...

Code: Select all
...
sock = createTcpSocket()
connect(sock, luxRenderServerIP, luxRenderServerPort)
sock.send(serialize(luxRenderFileAsString)) // send file or some format of data to luxrender server
while (true)
    imgData = sock.receive() // receive progressive image updates from luxrender server


Here the code isn't using any of luxrender's APIs but is just using typical TCP libraries. Aqsis, for example, will send data blocks of the image in XML to a viewer app, which parses the XML and puts it into an image buffer w/o using any of aqsis's libraries directly. I was wondering if there was something similar to that in luxrender and if not, how hard would it be to add on to the luxrender server.
strattonbrazil
 
Posts: 5
Joined: Mon May 02, 2011 10:32 am

Re: Protocol for LuxRender servers

Postby SATtva » Tue Apr 24, 2012 11:32 pm

The easiest way not requiring any modifications to the Lux code is to write your own client-server wrapper to transfer scene data (lxs, lxm, lxo and any resource files) to the node, spawn a luxconsole process on the rendering node and start rendering the scene, and then periodically copy the rendered image over the network. This won't a complicated work. You can even achieve similar results to how Lux itself works by automating the process of copying flm files from rendering nodes and merging them locally with luxmerger. Again, you aren't telling specifically what you're trying to achieve, so it's hard to suggest anything more precise.
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Protocol for LuxRender servers

Postby Lord Crc » Wed Apr 25, 2012 1:46 am

strattonbrazil wrote:Is there a protocol of specification for using LuxRender servers from a custom client?


Just the source code. The protocol isn't very specific, and transfer of data sometimes relies on internals, for example ParamSet classes are serialized using Boost.Serialization deserialized on the other end.

As such I think you're better off doing what SATtva suggests.

That said, I have considered redoing the protocol in a more standardized format, for example using JSON or similar to transmit parameters etc.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4447
Joined: Sat Nov 17, 2007 2:10 pm


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest