Bl
Bl
Bl
Bl
Bl
You are here:   Home »  Import CAD Formats »  NGRAIN's 3KO Solutions  
Bl

Okino logo
Lightscape .lslp Exporter


Arrow Exporting Lightscape LSLP Files

The Lightscape geometry export converter writes a Lightscape preparation file (.lp) containing all geometry, lights, and material attributes needed to render the scene within the Lightscape Visualization System. Even complicated scenes can be exported quickly and usually require only minimal adjustment from within Lightscape before they can be fully rendered.

The main features of the exporter include:

  • The output of geometry includes vertex normals and texture coordinates for rendering of smooth textured surfaces.

  • Support for both layers and blocks within the Lightscape preparation file. Multiple options are available for layer and block structure creation.

  • The output of geometry includes vertex normals and texture coordinates for rendering of smooth textured surfaces.

  • Material definitions are exported including values for transparency, smoothness, index of refraction, and luminance. The exported materials also include texture map information.

  • The output of geometry includes vertex normals and texture coordinates for rendering of smooth textured surfaces.

  • Exported lights include all point and spot light sources with directional lights being converted to point sources positioned some distance outside the extents of the scene geometry.

  • Automatic conversion of bitmap files to those formats supported by the Lightscape Visualization System.

More Dialog Box Options

Geometry Options

Master Units

The master units selection box allows you to select the units that is used by the model you wish you to export. The units you select here will be the units that the Lightscape interface will default to when displaying geometry data such as lengths.

Scale

The scale input box allows some additional scaling of the geometry so that it better fits the units selected as the Master Units. As you adjust this scaling factor, the model size displayed in the dialog box will adjust accordingly (as will the distance given in the Light Intensity Scaling group for Light intensity at 'Distance'). The model size displayed encompasses only the geometry of the scene and not the lights and cameras (unless of course the lights and cameras lie within the extents of the geometry).

Block Creation Mode

This dictates how information is output to the Lightscape Block Table within the .lp file. Possible choices are to create a block for each instance, a single block for all instances, or no blocks at all.

If the block creation mode is chosen to be a single block, then the block name given by the user will be used for that block.

Layer Creation Mode

This dictates how information is output to the Lightscape Layer Table within the .lp file. Possible choices are to create a single layer for all blocks and entities, or to create a layer for each output instance. Lights are put into Layer 0.

If the layer creation mode is chosen to be a single layer, then the layer name given by the user will be used for that layer.

File format version

Currently only .lp files for Lightscape Visualization System v3.0 are supported.

Output Enables

This group of checkboxes allows you to select what to output to the .lp file.

Mesh Data

If this option is enabled (checkmarked) then polygon information will be exported to the Lightscape .lp file.

Cameras

If this option is enabled (checkmarked) then a camera will be exported to the Lightscape .lp file.

Lights

If this option is enabled (checkmarked) then lights will be exported to the Lightscape .lp file.

Materials

If this option is enabled (checkmarked) then material definitions will be exported to the Lightscape .lp file.

Normals

If this option is enabled (checkmarked) then vertex normals will be exported to the Lightscape .lp file.

Bitmap Refs

If this option is enabled (checkmarked) then bitmap references for textures will be exported to the Lightscape .lp file.

Texture (u,v)

If this option is enabled (checkmarked) then texture coordinates will be exported to the Lightscape .lp file.

Light Intensity Scaling

Maximum Light Intensity

The value given for the maximum light intensity will be used to scale the intensity values given to the input lights. This maximum intensity is the luminous intensity (in candelas) for an input light with an intensity of 1.0.

Light intensity at 'Distance'

This option tries to match the intensity of a given exported light source at the distance given to the intensity of the input light at the same distance. This is achieved by approximating the amount of light from an input light source which is reflected from a flat, white surface at the given distance and trying to match this to a corresponding Lightscape light source. Note that the distance supplied in this entry should be in the model's own units, not in the units specified for the Master Units parameter.

Automatic Bitmap Conversion

Auto-Convert Bitmap Files to Another Format

If this option is enabled (checkmarked) then all 2d bitmap textures which are currently defined and referenced by the internal database scene will be automatically tagged then converted to a new user- specified 2d bitmap file format. For example, if you are converting a Lightwave scene to Lightscape, and the Lightwave file references IFF bitmap files then this option can be enabled so that the IFF images get converted to TIFF format automatically.

The converted bitmap files will be placed in the same output directory as the converted Lightscape file. If the texture(s) cannot be found in the location specified by the pathname prepended to the texture filename then the export converter will search for the texture(s) in all directories specified in the 'Default Search Path' and the 'Texture Bitmaps Search Path' file search paths (these can be modified by choosing the 'Preferences/Configure File Search Paths' menu item.

Bitmap Depth (Bits/Pixel): 2, 4, 8, 24

These radio buttons determine the number of bits/pixel to write out to the new 2d bitmap file. The default is 24 bits. A color quantization algorithm will be used for the 2, 4 and 8 bits/pixel output formats.

Dimensions: X = #, Y = #

These two drop-down list boxes determine the X and Y resolution for the converted bitmap file(s):

No Change = Do not change the X or Y size
Closest = Use the next highest power-of-2 size
2, 4, 8, ... 256, 512 = Choose a specific size for the X or Y dimension

Confirm Potential Bitmap File Overwrites

If this checkbox is enabled (checkmarked) then the bitmap converter will confirm any potential overwrites of existing bitmap files on disk which have the same filename and extension as the one being written. If this option is disabled then no confirmation will be made.

Convert all Bitmap File References To...

If the 'Auto-Convert Bitmap Files to Another Format' option is disabled then this option can be enabled. Rather than convert referenced bitmap images to another file format this option (when enabled) simply changes all the file extensions on bitmap files to a specific type. For example, if set to 'TIFF' then all bitmap filenames exported to the Lightscape file will be changed so that their file extensions end in '.tif'. This is a useful option is you already have all of the referenced texture maps converted to the desired file format (either from a previous invocation of this export converter or by using a batch bitmap conversion program). If this option and the 'Auto-Convert Bitmap Files to Another Format' option is turned off then the filename extension will remain unmodified.

Arrow Possible Adjustments Required and Limitations

It is very important that one realize that the scene may need some processing either before exporting or after being read into Lightscape. Possible situations that may require user attention are as follows.

Polygon Facing

It is entirely possible that not all polygons will have the proper facing once read into Lightscape. This is easily remedied in Lightscape by selecting the offending polygons and right clicking in the main view window to bring up the context menu and choosing the 'Orientation' menu item. This will allow the polygons to be reoriented as the user chooses. It may be necessary for backface culling to be turned off within Lightscape to facilitate the selection of the polygon(s).

If entire objects seem to have their polygons facing the wrong direction (for example a lamp in which all polygons face inwards) then it may be possible to process the object before exporting to the Lightscape .lp file via the polygon processing functions or in Lightscape by isolating the block for the given object (if one exists), selecting all polygons, and bringing up the context menu to select 'Orientation'.

Material Definitions

The presence of reflections on an object when raytraced within Lightscape is determined by the material's index of refraction and smoothness. The approach taken to determine these attributes for the Lightscape material is identical to that used by Lightscape when reading in 3D Studio data. The surface's specular and phong shading attributes are used to calculate the index of refraction for an object.

Another item of note is color conversion. It may be necessary to adjust the saturation and value of the material within Lightscape. If a color was particularly bright then the resulting material in Lightscape may have a much higher saturation and/or value than desired. Saturation and value levels that are too high will cause objects in the Lightscape scene near the material to be bathed much more than desired in the material's color when the intersurface reflections are computed. This can also occur in dealing with textured surfaces. In this case it will most likely be desirable for the user to edit the Lightscape material's color by setting it to the texture average (this is accomplished by pressing the 'Texture Average' button in the Lightscape Material's definition dialog box for the given material).

Texture Definitions

Lightscape only allows the use of the alpha channel of the image to be used for such things as cutouts. Therefore if the texture definition uses anything other than the image's own alpha channel for it's alpha channel information (chroma-key for example), the result in Lightscape will be incorrect.

Texture Layering

In short, texture layering is not available in Lightscape. The material output to the Lightscape .lp file will contain the first enabled texture for a given surface only.

3D Textures

The only texturing available in Lightscape is texture mapping. Therefore surfaces with procedural textures such as checkered marble will not export. If you wish to make use of Lightscape's bump and noise functionality you will have to edit the material from within Lightscape.

Cameras

Lightscape only allows orthographic projection views to be top, bottom, left, right, front or back. If the scene to be exported makes use of an orthographic camera it will be replaced with a perspective camera with the same position and look at points.

At this time, only one camera is exported (as this is all the Lightscape .lp file allows). The camera exported is the first enabled camera encountered.

Lights

The maximum light intensity or intensity at 'distance' parameters in the export dialog box will most likely require some trial and error to get the exact result you need. These export options are probably better suited to obtaining first approximations which can then be adjusted from within Lightscape until you achieve the exact lighting you desire.

Directional Lights

Directional lights are not supported in Lightscape. If the scene contains any directional light sources they will be replaced by a point light source along the vector from the origin in the original directional lights' direction and positioned a distance outside the overall scene's bounding box.