Allright.
I tried that, but I guess I'm doing something wrong. I crated 2
cameras and two worlds, in the first world I dropped a cube, and in
the second, I put a sphere. The problems are:
1) the objects appear centered in the window (I had hoped they would
appear centered in the viewport, I could move them, but that makes me
think the viewports are not working properly)
2) the objects are rendered only in wireframe mode, otherwise, only
the second camera is rendered.

This is the code - could you tell me what's wrong with it?

Thanks.
                 Luis.

----- code -----
soya.init()
w1 = soya.World()
w2 = soya.World()
w1.atmosphere = soya.Atmosphere()
w2.atmosphere = soya.Atmosphere()

soya.cube.Cube(w1)
soya.sphere.Sphere(w2)

c1 = soya.Camera(w1)
c1.z=12
c1.set_viewport(0.0,0.0,.5,.5)

c2 = soya.Camera(w2)
c2.z=12
c2.set_viewport(.5,.5,1.0,1.0)

g = soya.widget.Group()
g.add(c1)
g.add(c2)
c2.partial=1

soya.toggle_wireframe() #if turned off, only c2 gets rendered.
soya.set_root_widget(g)

soya.Idler().idle()
------ code -------



> You can do it :
> 
>  * create several cameras
> 
>  * use camera.set_viewport to define the viewport
> 
>  * use the widget system (from soya.widget) to create a
> soya.widget.Group that you'll use as root widget, and then add the 2
> camera in the group
> 
>  * you may need to do "camera.partial = 1" for the second camera, to
> avoid clearing twice the background (and erasing the result of the first
> camera)
> 
> Jiba

Reply via email to