POV-Ray : Newsgroups : povray.general : Rendering The Scene Description Server Time
1 Nov 2024 19:14:39 EDT (-0400)
  Rendering The Scene Description (Message 1 to 2 of 2)  
From: Bill
Subject: Rendering The Scene Description
Date: 28 Jul 2004 17:10:00
Message: <web.4108157ae40b467e681299870@news.povray.org>
I find it tricky to think in 3D as I code SDL.  All too often I confuse
myself regarding the relative positioning of the camera, lights, and
objects.  I realize there are several 3D modelling programs but I'm curious
if it's possible for PovRay to render it's own scene description?

The idea is to have a special command for Povray to render the classical
front, side, top and camera perspectives as images but including special
objects to represent the lights and camera as well as the usual SDL
objects.  The output would be 4 bitmap images (or maybe 1 bitmap with the 4
views in it).

With such an output I could then get a visual indication of the relative
positioning of my camera, lights, and objects.  This might be thought of as
a meta-rendering where Povray internally constructs a meta-scene to show
the SDL scene-under-construction's layout.

Would this be a difficult extension to PovRay?

Cheers,
Bill


Post a reply to this message

From: gonzo
Subject: Re: Rendering The Scene Description
Date: 28 Jul 2004 23:56:25
Message: <41087569@news.povray.org>
Bill wrote:
> I find it tricky to think in 3D as I code SDL.  All too often I confuse
> myself regarding the relative positioning of the camera, lights, and
> objects.  I realize there are several 3D modelling programs but I'm curious
> if it's possible for PovRay to render it's own scene description?
<snip>
> With such an output I could then get a visual indication of the relative
> positioning of my camera, lights, and objects.  
<snip>
> Would this be a difficult extension to PovRay?


Its not difficult to do in SDL, no need for an extension to the program.

Once I have the basics of what I want in my scene I usually do something 
like that as a routine way of fine tuning my scene.

I first have my camera position & primary light positions defined;

#declare Cam_Pos = <position>
#declare Lights = <positions...>

Then I create a switch - case set of cameras for the usual top, side & 
director views;

#declare VIEW = 0;
#switch(VIEW)
  #case (1)
    camera <some_y_spot>
  #break
  #case(2}
    camera <some_x_spot>
  #break
  #case (3)
    camera <some_z_spot>
  #break
  #case(4}
    camera <rear_perspective>
  #break
  #else
    camera Cam_Pos
#end

Then I make a red cone for the fake camera and some bright yellow 
spheres for the fake lights, using the reorient_trans macro to aim the 
camera to the look_at, and enclosed in

#if (VIEW)
   object { fake_camera )
#end


Then set VIEW to 0 to render my scene normally, or to 1,2,3 or 4 to get 
whatever view I need.

I actually find this far more flexible than the views in Bryce or 
Truespace since I'm constantly moving those around through wireframes to 
try and get a view of something specific, while with Pov SDL, its easy 
to set the camera to look_at specific objects or directions using 
variables that I usually already have defined in the scene.

If I know there's a particular spot in the scene that I'm going to be 
spending time on I define my working camera locations right into the 
scene as I'm building it, then I can instantly switch to them any time.

RG


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.