I want to develop a rendering server, that would accept a request through websocket, configure camera, lighting etc. on scene, render a frame using the RTX path tracer, and then send it back to the requesting client.
So my question is, what’s the best way to actually do those things, what extensions and functions should I use, specifically for:
- Loading a USD scene from a file
- Receiving/Sending websocket packets (should I just use the Python’s websockets module?)
- Rendering a frame, getting access to the actual uncompressed bytes of the image so that I can send it through websocket. Ideally it should be possible to access an uncomplete frame, i.e. without waiting for all the samples per pixel to render.
- Setting the camera on scene, position, rotation, etc.
In the future ideally I would also use the WebRTC livestream, but it doesn’t work for me (same error as in here), I’m left with websocket stream which is very laggy and unusable.
If there are any examples of doing similar things, it would be very useful as well.