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


Imagemaps

Let's add some life to this ray trace. The easiest way to do this is to map an image onto the sphere. The image below will make the sphere look like a pool ball.


for best results, the image should be pi (3.1415926…) times as wide as it is high.

The script would look like:
<libpath "c:\w3\">
<lib "textures.w3d">

    <normalize>

Pool ball:
    <position 0 0 0> <radius 3>
    <apply "glossy">
    <color 1 0 0>
    <imagemap "c:\imagemaps\raytrace_imagemap_1.jpg">
    Map the image contained in c:\imagemaps\ named raytrace_imagemap_1.jpg. Both the path and the file name depend on you.
<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>


This is the end product of the script.

But that's just the beginning… Go on.


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

WinImages F/x, WinImages Morph and all associated documentation
Copyright © 1992-2001 Black Belt Systems ALL RIGHTS RESERVED Under the Pan-American Conventions
In accordance with the Computer Software Rental Act of 1990:
This software may not be rented, lent, or leased.

WinImages F/x Manual Version 7, Revision 0

HTML Documentation Management System © 2000-2001 Black Belt Systems