A Question about Reyes

Ideas, enhancements, feature requests and development related discussion.

A Question about Reyes

Postby John VanSickle » Fri Mar 13, 2009 12:49 pm

How useful is it to use stdin/cin to read the scene data for a render (instead of reading from a file specified in the command line)?
John VanSickle
 
Posts: 189
Joined: Sat Feb 16, 2008 2:17 am

Re: A Question about Reyes

Postby sascha » Sat Mar 14, 2009 12:23 pm

I guess it's a lot faster than writing to and reading from disk, and the RIB files can become quite large.
It's still kind of odd, since RenderMan is an API and RIB is nothing but a transcript of API calls - so why not call the renderer functions directly instead of using RIB? I'm not a C expert, but I'd expect there to be some ri.h file that allows you to do just that (using the API directly has been to only way before RIB was introduced). You'd entirely bypass the RIB parser, so I guess it'd be much faster.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: A Question about Reyes

Postby John VanSickle » Sat Mar 14, 2009 1:11 pm

I'm not sure that the speed of getting stdin/cin direct from another app, versus reading from a disk file, is such a big deal. By the time the user would notice the difference, the stream is probably large enough that it's getting cached to file anyway.

The way I see it, the advantage of reading from stdin/cin is that the app generating the stream doesn't need to be finished in order for the renderer to start working on it.

The disadvantage of reading from stdin/cin is that if the renderer needs to make two passes through the scene file (for generating various shadow maps, environment maps, und so weiter), the renderer would have to save the stream to a temp file anyway in order to read it again. Granted, the renderer could be split into separate modules, one of which does the pre-rendering calculations and passes to the renderer a stream that only needs to be parsed once; and given that modular organization tends towards better code maintainability, that's probably a good idea.

Which indicates that the way I implement lights, shadows, and other shading stuff might be different from what I had earlier planned. If I ever get around to completing this.
John VanSickle
 
Posts: 189
Joined: Sat Feb 16, 2008 2:17 am

Re: A Question about Reyes

Postby sascha » Sat Mar 14, 2009 6:34 pm

Yeah, you're probably right. Disk space isn't an issue any more these days (and you'll need lots of it to save the renderer output anyway).
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria


Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron