|
![](/i/fill.gif) |
Hello all,
I am developing an application which involves a virtual environment. I want to
have a (set of) virtual camera(s) and objects in a scene, and all of these are
going to be changed semi-interactively (doesn't have to be real-time.) I like
to use povray to achieve this. Let me ask my question with a pseudo-code. I
like to have a coding structure that looks like this:
****** Code Starts ******
#include "povray_api.h"
int main_loop(void) {
povray_scene scene;
cam_id1 = scene.camera_add( my_cam_params_1 );
cam_id2 = scene.camera_add( my_cam_params_2 );
scene.add_box( ...parameters... );
// we add all the objects and light sources here
// ...
while (loop_flag) {
scene.render(cam_id1, &image1);
scene.render(cam_id2, &image2);
// send the images to wherever...
// modify the scene (change object and camera positions, etc...)
}
}
****** Code Ends ******
I want this because the overhead of creating a pov file (scene file), calling
the "povray" executable then parsing it for every frame is significant. My
scene is simple and does not change a lot. On top of above reasons, in
principle, reprocessing a scene should be faster as well.
Would this be easily possible with povray libs? Any pointers will be
appreciated.
Cheers!
Post a reply to this message
|
![](/i/fill.gif) |