Rendering to a File

A project can be rendered to a file using various file formats, such as BMP, JPG, TGA or the native Realsoft 3D file format. The native format is the most flexible alternative, because it allows you to write any number of image channels to a file using any of the available data types: 8-bit byte, 16-bit word, 32-bit integer or 64-bit floating point.

Both still images and animations can be rendered. Animations can be rendered to a sequence of indexed images or to one (or more) AVI or FLC animation format file.

Rendering an image to a file

To render the current project to a still image file:

1. Make sure you have created a camera object to the current project. The file rendering tool needs one camera object to define the camera attributes such as the position and direction of the camera, focal length, etc.

Check that the camera object has a proper aspect ratio. Use the camera object property window to set the aspect to PAL or NTSC if you plan to render a video resolution image. If the purpose is to render a square-like image for a magazine advertisement, set the camera aspect to 1 (and use identical 'Width' and 'Height' in the resolution settings defined below).

2. Select the pull-down menu File/Render.This opens the file rendering window.

3. Select a suitable file rendering configuration. One of the predefined configurations, such as 'PAL', may already include suitable settings. If none of them is suitable, use 'Default configuration'.

4. Select a Rendering Settings object. Rendering settings define anti-aliasing quality and other rendering specific information. The default startup project includes a number of predefined rendering settings. You can create new rendering settings from the Select window's Rendering Settings tab.

File rendering window

5. Select a suitable post processing effect to the Effect/Box control. If you don't want to activate post processing, set this field to empty. The post processing system renders post effects such as lens flare and glow.

6. Configure Active File Formats. To do this, find the desired format from the Available Formats field and click the associated Add button. This adds the file format into the Active File Formats list. You can remove inserted formats using the RMB popup menu. Note that you can render to any number of files simultaneously. This is often a very useful feature. For example, you can render color information to one image and alpha information to another image.

7. Specify the resolution for rendering. You can also select one of the predefined resolutions from the 'Presets' control. Make sure that the resolution and the aspect ratio of the camera match. For example, if you plan to render a 'panoramic' image of width=2000, height=1000 for printing - the camera aspect should most likely be 1000/2000 = 0.5. Unfortunately dividing the height by the width does not always define a correct camera aspect ratio, because some display devices use non-square pixels. The usual video standards use non-square pixels. Fortunately you can find the appropriate resolution settings and aspect ratios from the presets.

8. Enter a File Name for the image.

9. Click the Render Image button to render the image.

[Note] Note
If the Render Image button remains disabled, make sure you have defined at least one image file format (animation formats cannot be used for still images) . Secondly, check that a proper file name is defined. Finally, check that a rendering settings object is selected.

If you frequently need to render to certain file formats with a certain resolution and other settings, it is a good idea to create a new rendering configuration using the corresponding tab on the select window, define the preferred settings and save the new configuration to the startup file for later use.

Rendering an animation to a file

Animation rendering happens the same way as rendering still images. Instead of clicking the 'Render Image' button, click the 'Render Animation' button. When rendering an animation using an 'animation' format such as AVI or FLC, one file is generated (for example myanim.avi). Before rendering, the codec to be used is prompted - e.g. select "Cinepak" for avi - or use your discretion for format quality settings.

If an image format is used, the file render tool generates a sequence of separate images indexed with a frame number.

The Name Indexing controls define how the file name is generated from the actual file name and the current frame number. The default indexing format is flexible enough for most cases. If a more exotic indexing convention is desired, it can be achieved by selecting Custom to the Format field and entering a suitable string to the Format string field. The format string follows C language 'printf' conventions.

Indexing controls

Rendered images are named as follows: [filename][index].[extension]

For example: myimage000.bmp

The first portion is the file name defined by the user (such as d:\mypics\test). Index is the current frame plus the base index definedthrough the 'Base index' field. The number of digits in the index portion is automatically extracted from the number of frames in the animation. For example, if the length of the animation is 120 frames, the index portion contains three digits. The extension is determined by the selected file format.

The 'Format String' control shows the format string that is used for generating the index portion of the filename. If 'Format' is set to 'Custom', you can define an arbitrary format string to this gadget. For example, the string '%d' outputs indices without zero padding: frame0.tga, frame1.tga,..., frame99.tga... '%05d' would output: frame00001.tga. '%03d' outputs: frame001.tga, etc.

The 'Example' field shows a complete sample filename generated by the current settings.

[Note] Note
Animation frame indices start from zero. If you want to start indexing from one (frame001.tga, frame002.tga...), set 'Base index' to one.

Box rendering

The 'Render Box' controls limit the rendering to a sub area of the total image. For example, it may happen that after spending one whole day for high-resolution rendering of a complex scene, the user notices that the color of a small object at the top left corner was wrong. Instead of re-rendering the whole scene, the user can render one quarter of the total image width and one quarter of the total height around the object to a new file. The position of the new sub image is known accurately and therefore it can be pasted over the original image using a paint or image processing program.

The controls are:

X - The horizontal position of the top left corner of the render box (measured in pixels)

Y - The vertical position of the top left corner of the render box

Width - The width of the box

Height - The height of the box

Active - Activates box rendering

Frame commands

The Frame Commands area contains four command gadgets. The commands can be defined using any of the installed scripting languages. In addition to this, DOS (or shell) scripts can also be used.

The following commands can be defined:

Begin animation

This command is executed once in the beginning of animation rendering. For example, a special hardware for animation recording can be turned on.

End animation

Executed once when the animation is ready. This can be used for clean up actions.

Begin Frame

Executed before rendering of each frame.

End Frame.

Executed after each rendered frame. For example, the rendered image can be recorded to a single frame recorder.

The frame command can access the file name via the following predefined macros:

[image] - Full name of the rendered image, for example 'd:\images\test000.bmp'.[path] - Path portion of the file name without the last path separator, such as 'd:\images'.[base] - Base name (i.e. path and extension removed). For example 'test'.[ext] - Extension without the dot. For example 'bmp'.

For example, if the file name is d:\realsoft3d\images\test.bmp:

[path] - results in 'd:\realsoft3d\images'

[path]\[base].[ext] is the same as [image] - 'd:\realsoft3d\images\test.bmp'.

[path]\[base].tga results 'd:\realsoft3d\images\test.tga'