Lightscape User Guide

Add to My manuals
362 Pages

advertisement

Lightscape User Guide | Manualzz

Raytracing Solution Files Using LSRAYF

❚❘❘

Option:

-h

-ie

-k

-lc

-db

-dl

-s

-se

-t

-li

-m

-nt

-o

-u

-v infile

Extension:

mesh

name name

Description:

One block per mesh.

Alternate name for single block. Default: the input filename without its suffix and directory path.

Alternate name for single layer. Default: the input filename without its suffix and directory path.

Print a help message.

Ignore internal errors when reading the 3D Studio file.

Do not import instances from the keyframe.

Layer creation mode. [single mesh] single mesh

n filename n conversion units

One layer for entire object.

One layer per mesh. This is the default.

Maximum light intensity scale. Default is 25000.0.

File was produced with 3D Studio MAX and should be interpreted as such.

Do not read texture data in the 3D Studio file.

Output filename. Files without a .lp extension are given one. If this option is not used, a .lp extension is substituted for the extension of the input filename.

Scaling factor for dimensions in file.

Stop on translation errors. Default: to attempt to continue importing.

Coordinate system conversion (any permutation of XYZ without optional minus signs). Default is XYZ.

Length units of model—mm, cm, m, km, in, ft, or mi. Default is m.

Show status messages.

Input 3D Studio file.

Raytracing Solution Files Using LSRAYF

Use the following utility to ray trace Solution files, compute the luminance at each pixel, and store the results in a special floating point image format. The lsrayf utility is provided primarily for specialized research applications. The lsrayf utility syntax is shown in the following example:

lsrayf [options] solution_file image_file

The lsrayf utility is a slight variation of the lsray utility that uses two new file formats, instead of creating images with standard file formats. The lsrayf utility also outputs energy data without using radiance mapping to convert

277

B Batch Processing Utilities the energy values to color information. In other words, the value of a pixel computed by lsrayf is the luminance at the surface point visible through the pixel and in the direction of the viewer.

The lsrayf program takes as input any Solution file and generates an appropriate image file. It is also possible to produce a series of image files, corresponding to a list of view files, or an animation file. Textures, if present, are loaded using the current texture path list.

Unlike lsray, the -b and -rgb options control the format of the output so any file extension can be used for

image_file.

To ray trace images using the lsrayf utility:

1.

Choose Start | Programs | MS-DOS Prompt.

A DOS window appears.

2.

At the command line, type the following, then press Enter:

CD “PROGRAM FILES\LIGHTSCAPE\BIN”

Note: If the path to the Lightscape application files differs from above, enter it instead.

3.

Using the following syntax, type a command at the command line, then press Enter:

lsrayf [options] solution_file image_file

Note: You can also use a batch file to create a sequence of commands. For instance, you could create raytraced image files from multiple Lightscape Solution files.

The ray tracing utility creates an image file from the specified Lightscape Solution file.

Description of LSRAYF Options

The following table describes the options available for this utility:

Option

-aa

-aaa

-af

-alls

Extension

1-10

t n r filename

Description

Antialiasing factor. Higher factors result in higher image quality, but take more computation time. Default is 1. See Chapter 14, “Rendering,” for more information.

Antialiasing threshold, sampling level, and radius. See Chapter 14, “Rendering,” for more information.

Animation file. Ray trace all frames specified in the animation file. The image filename is used as the base name and a decimal four-digit number, corresponding to the frame number, is appended for each image file, for example, anim0000.rgb, anim0001.rgb, and so on.

Compute shadows from all layers. Default: as specified in the Solution file.

278

Lightscape

Raytracing Solution Files Using LSRAYF

❚❘❘

-v

-vf

-x

-rgb

-roi

-sf

-sh

-soft

-step

-svf

Option

-b

-df

-ef

-fps

-h

-lf

-nc

-nt

-rb

-rf

Extension

filename n n filename n filename x1 y1 x2 y2 n n filename...

-evf filename n

Description

Outputs the image file in the binary format. The default data format is output in the text format described above.

Load specified Parameters file.

Last frame of the animation desired. -af option must be used. Default: last frame specified in the animation file.

For animations, number of frames per second. -af option must be used. Default: as specified in the animation file.

Print a help message.

Load specified Layer State file.

Do not perform backface culling.

Do not load textures.

Number of reflection bounces to trace. Default is 10.

Custom ray file. Instead of ray tracing the specified view, trace the rays specified in the ray file. This is useful for making panoramic images. The format of the ray file is that the first line has width and height dimensions. The following width x height lines have beginning and end coordinates of each ray (six numbers per line). If this option is specified, the -x, -y, -af, -vf, and -svf options are ignored.

Output per channel.

Ray trace only the rectangular region of interest defined by the lower-left and upper-right corners.

First frame of animation desired. -af option must be used. Default: as specified in the animation file.

Recompute shadows from sun and other light sources.

Compute soft shadows. Valid for sunlight source only.

For animations, interval for frame output. -af option must be used. Default is 1.

List of view files. -evf must be used to terminate the list. Output image files corresponding to the name of each view file in the list. The image filename is combined with the prefix of each view filename. For example, using an image filename of data.rgb and view files pnt1.vw, pnt2.vw, and pnt3.vw results in images named datapnt1.rgb, datapnt2.rgb, and datapnt3.rgb.

Verbose. Print information about the status of the image.

Load specified view file.

Image width.

279

B Batch Processing Utilities

Option

-y solution_file image_file

Extension

n

Description

Image height. If only width or height is provided, the other dimension is derived from the aspect ratio of the view. Default is 256.

Solution file to run ray tracing on.

Image file to save the results of ray tracing.

Text Output

When -b is not specified, lsrayf will write to the image file, as text, using the following formats:

• Y X LUMINANCE (The default format. The -rgb option must not be used.), or:

• Y X R G B (Used if the -rgb option is specified.)

X and Y represent the coordinates of the pixel and LUMINANCE is a floating point value representing the pixel’s luminance. R,G, and B represent the red, blue, and green value for each pixel.

Binary Output

If the -b option is specified, lsrayf will write to the image file using the following binary formats:

• | | | | Width |

• | | | | Width |

Both Width and Height are written using a 16-bit integer format (a short) and are followed by a series of PIXELS or LUMINANCE values. Each PIXEL is written using three floats (32-bit floating point numbers) representing the red, green, and blue values. The LUMINANCE is a float (32-bit floating point numbers) representing the brightness of each pixel. The PIXELS are written as an array of Width times Height times three floating point numbers in a row major order. The LUMINANCE is written as an array of Width times Height times 1 floating point number in a row major order.

The program stops when image computation is completed and saved.

LSRAYF Syntax Example

This command loads the Solution file room.ls and generates a 640 x 512 resolution image called “image” using the view specified in view.vw. The image is antialiased (level 3), and two levels of reflections are rendered. Any sunlight or direct light from specified luminaires is also ray traced to produce better shadows.

lsrayf -aa 3 -vf view.vw -sh -rb 2 -x 640 -y 512 room.ls image

Where:

-aa 3

-vf view.vw

-sh

Indicates:

Level 3 antialiasing.

The file called view.vw is used for viewing the model.

Shadows and illumination from direct lighting are recomputed.

280

Lightscape

advertisement

Related manuals

advertisement

Table of contents