Sign in to follow this  
clipi

Help implementing render by parts

Recommended Posts

Hello. I am trying to implement render by parts in a ray tracing application. That is instead of rendering the scene in just one file, I want to split it in several fragments and then stich them together. This will alow rendering large resolution images with out having to use lot of ram. Hope you can give me some advice on how to merge the pieces together after rendering. Thanks.

Share this post


Link to post
Share on other sites
Hi,

I'd suggest this:

1) Create a binary file and write the headers*
2) Render a part, say a single scanline or whatever...
3) Open the file in append mode
4) Write the part and close the file
5) Repeat 2-4 until you've rendered the whole image

Hope that helps, or were you thinking of something else?

* So if if you were using TGAs you'd write the headers detailing the dimensions and colour depth in TGA header format, for example.

[Edit:]

Obviously writing straight out to a proper image format is probably a bad idea. What you should do is save the actual floating point data to a temporary file instead. You should use this data after the whole image is rendered so you can do accurate post-processes such as tone-mapping.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this