Skip to Content
DocsAPIOverview

Overview

Module for describing an rv scenes. To create a scene implement a class derrived from Scene.

  • To preview scene use the rv preview <scene.py> command.
  • To render resulting dataset use the rv render <scene.py> command.

Scene example

Here is a basic non-random scene with a cube and a sphere. To preview resulting segmentation masks see the PreviewIndexOB0001.png after rendering.

class BasicScene(rv.Scene): def generate(self): self.get_world().set_params(sun_intensity=0.03) cube = ( self.create_cube().set_location((1, 0, 0.5)).set_scale(0.5).set_tags("cube") ) sphere = ( self.create_sphere() .set_location((-1, 0, 1)) .set_shading("smooth") .set_tags("sphere") ) plane = self.create_plane(size=1000) empty = self.create_empty().set_location((0, 0, 1)) cam = self.get_camera().set_location((7, 7, 3)).point_at(empty)

Results

ImageSegmentation
resulting imageresulting image
Last updated on