Seamless

From ActiveWiki
Jump to navigation Jump to search

Usage

    [#!]Seamless state

Note: [ ] denotes optional arguments.

Description

The command tells the engine how to calculate vertex normals, if they are not already provided by the vertex definition. Seamless normal calculation uses face normals and considers all neighbour faces to determine an interpolated average of all triangles sharing a vertex.

When creating models where textures wrap around an object, there is often a seam that shows up where the tail of the texture meets it beginning. This command was created to minimize or avoid that seam. Prominent examples of this show up on avatars and sphere objects.

Argument

state represents if the command is active(On) or inactive(Off, default value).

The seamless command is an RWX extension and should be prefaced with #! when used in RWX files that are intended to work with other software.

Example

For the example of a sphere shown in the picture:

 ModelBegin 
   ClumpBegin
     Surface .7 .8 .15
     Texture ground34
     Seamless On
     Sphere 0.05 3
   ClumpEnd 
 ModelEnd

A generic example:

 ModelBegin
  ...
  ClumpBegin
   Rotate 0 1 0 180
   Rotate 1 0 0 -90
   Scale .1 .1 .1
   Seamless On
   ProtoInstance object_002_1_6
   ProtoInstance _6_5
   ProtoInstance _5_4
   ProtoInstance _4_3
   ProtoInstance _3_2
   ProtoInstance _2_1
   ProtoInstance _1_0
   ClumpBegin
    ProtoInstance cylinder_0_8
    ProtoInstance cylinder_2_7
   ClumpEnd
  ClumpEnd
 ModelEnd

These pictures demonstrate how the "Seamless On" command can improve the look of an object with "seams". Note the cement orb in the lower left of each picture.

Notes

February 2008 Newsletter article by Stacee [1]