Page 187
Quick Nav Bar
<<   Previous Contents
Selection
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
Selection
Op Index
Parent User Notes
Index
Glossary
Next   >>
Page 187

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