Page 186
Quick Nav Bar
<<   Previous Contents
Selection
Op Index
Parent User Notes
Index
Glossary
Next   >>


Libraries and traits

Next, to change the look of the sphere's surface, we change the script to the following.

<libpath "c:\w3\">
<lib "textures.w3d">
Import the library file contained in c:\w3\textures.w3d.

Note that the "matte" trait was removed. Matte is already defined in the library we imported, so we can simplify the script a little bit.

    <normalize>

Glossy ball:
    <position 0 0 0> <radius 3>
    <apply "glossy">
    Here we changed the trait that was being applied to the object, changing it from a dull look to the look of a highly polished billiard ball.
    <color 1 0 0>
<object sphere "My Sphere">
    <normalize>
<object bound>

Light:
    <position 50 50 -75>
    <color 1 1 1>
<object light "light_1">

<viewlocation 0 0 14>
<viewtarget 0 0 0>

As you can see, switching between a matte surface and a glossy surface is a matter or changing one word in your script. Most changes are that easy.


This is the end product of the script.

Now that you have the basic tools, lets make it more interesting.


Quick Nav Bar
<<   Previous Contents
Selection
Op Index
Parent User Notes
Index
Glossary
Next   >>
Page 186

WinImages F/x, WinImages Morph and all associated documentation
Copyright © 1992-2007 Black Belt Systems ALL RIGHTS RESERVED Under the Pan-American Conventions

WinImages F/x Manual Version 7, Revision 5, Level B

HTML Documentation Management System © 1992-2007 Black Belt Systems