![blocksworld scratch blocksworld scratch](https://i.ytimg.com/vi/9YVmhzPW1Ho/hqdefault.jpg)
The -render_min_bounces and -render_max_bounces control the number of bounces for transparent objects I've found the default of 8 to work well for these options. I've found that 64 samples is a good number to use for development all released CLEVR images were rendered using 512 samples. You can control the quality of rendering with the -render_num_samples flag using fewer samples will run more quickly but will result in grainy images. Blender also supports acceleration using OpenCL which allows the use of non-NVIDIA GPUs however this is not currently supported by render_images.py. Rendering uses CPU by default, but if you have an NVIDIA GPU with CUDA installed then you can use the GPU to accelerate rendering by adding the flag -use_gpu 1. Image Resolutionīy default images are rendered at 320x240, but the resolution can be customized using the -height and -width flags. If after -max_retries attempts we are unable to find a suitable position for an object, then all objects are deleted and placed again from scratch. We also ensure that between each pair of objects, the left/right and front/back distance along the ground plane is at least -margin units this helps to minimize ambiguous spatial relationships. Object PlacementĮach object is positioned randomly, but before actually adding the object to the scene we ensure that its center is at least -min_dist units away from the centers of all other objects. Using non-default values for -start_idx allows you to distribute rendering across many workers and recombine their results later without filename conflicts. To accomplish this, we assign each object a unique color and render a version of the scene with lighting and shading disabled, writing it to a temporary file we can then count the number of pixels of each color in this pre-render to check the number of visible pixels for each object.Įach invocation of render_images.py will render -num_images images, and they will be numbered starting at -start_idx (default 0). The number of objects for each scene is a random integer between -min_objects (default 3) and -max_objects (default 10), and each object has a random shape, size, color, and material.Īfter placing all objects, we ensure that no objects are fully occluded in particular each object must occupy at least 100 pixels in the rendered image (customizable using -min_pixels_per_object). After loading the base scene, the positions of the camera and lights are randomly jittered (controlled with the -key_light_jitter, -fill_light_jitter, -back_light_jitter, and -camera_jitter flags).Īfter the base scene has been loaded, objects are placed one by one into the scene. This scene contains a ground plane, a camera, and several light sources. The file data/base_scene.blend contains a Blender scene used for the basis of all CLEVR images. Echo $PWD > /Applications/blender/blender.app/Contents/Resources/2.78/python/lib/python3.5/site-packages/clevr.pth