## Protocol for LuxRender servers

General discussion regarding exporter development in general.

Moderators: Ratow, coordinators

### Protocol for LuxRender servers

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

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

SATtva

Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

### Re: Protocol for LuxRender servers

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 serverwhile (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

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

SATtva

Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

### Re: Protocol for LuxRender servers

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.

Lord Crc

Posts: 4447
Joined: Sat Nov 17, 2007 2:10 pm