Professional Web Applications Themes

Help with sphere - Macromedia Director 3D

hey all, i have been using director for a while now, but have never done anything fancy. I am working on a site and for it too look good i need a sphere with a texture attached to appear when it is loaded. also it needs a pivot point in which it can rotate on (if possible) and for it to move around on that point where ever i move the mouse.....so like it follows it. Any help would be great :-) Thanks Puddney...

  1. #1

    Default Help with sphere

    hey all,

    i have been using director for a while now, but have never done anything fancy. I am working on a site and for it too look good i need a sphere with a texture attached to appear when it is loaded. also it needs a pivot point in which it can rotate on (if possible) and for it to move around on that point where ever i move the mouse.....so like it follows it. Any help would be great :-)

    Thanks

    Puddney


    puddney webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Help with sphere

    Well,, first, you need to create a primitive in Director, primitives are 3D
    geometric forms.
    Your primitive would be a sphere.
    So you need to create a model resource for your sphere, the basic syntax is
    this:
    member(which member).newModelResource("resourceName", #sphere #both)

    then you use the newModel command to create a model that uses the resource:
    member(whichmember).newModel("modelName", resourceRef)
    resourceRef is the reference to the model resource you created.

    Textures and shaders are another matter.

    I'm new to creating models too and adding textures, but I think I'm getting
    it down.
    If you want I could whip up a sphere with a texture
    and copy the syntax here for you to study, or e-mail the completed movie to
    you.


    --
    markinoregon

    Website under construction as always!
    [url]www.markthesteelhead.com[/url]
    "puddney" <webforumsusermacromedia.com> wrote in message
    news:bp5hir$sr9$1forums.macromedia.com...
    > hey all,
    >
    > i have been using director for a while now, but have never done anything
    fancy. I am working on a site and for it too look good i need a sphere with
    a texture attached to appear when it is loaded. also it needs a pivot point
    in which it can rotate on (if possible) and for it to move around on that
    point where ever i move the mouse.....so like it follows it. Any help would
    be great :-)
    >
    > Thanks
    >
    > Puddney
    >
    >

    markinoregon Guest

  3. #3

    Default Re: Help with sphere

    man i would love to be able to see some code so i could study it, thank you for your help :-)

    Puddney


    puddney webforumsuser@macromedia.com Guest

  4. #4

    Default Re: Help with sphere

    This code creates a sphere, with some lighting.
    you still need to open the 3D shockwave viewer and create a 3D cast member
    called "solarSystem"
    save it as an empty member.... the sphere will be created in that member

    set an on exit frame for your sprite in the score so the movie loops

    global obj --The 3D member

    global mr1 --The model resource

    global md1 --The model

    on prepareMovie

    obj = member("solarSystem") -- for ease of typing

    --Clear the member for easy restarting.

    --Otherwise, names will conflict.

    obj.resetWorld()


    -- Create the new model resource.

    mr1 = obj.newModelResource("sunSphere", #sphere, #front)

    -- Set the model's radius property

    mr1.radius = 50


    -- Create the model and assign the resource

    md1 = obj.newModel("sun")

    md1.resource = obj.modelResource("sunSphere")


    -- Create an ambient light and set the color

    obj.newLight("myAmbient", #ambient)

    obj.light("myAmbient").color = rgb(210, 210, 210)

    -- Create a point light source, set the position and color

    obj.newLight("myPoint", #point)

    obj.light("myPoint").transform.position = vector(150, 200, 0)

    obj.light("myPoint").color = rgb(255, 255, 255)

    end


    --
    markinoregon

    Website under construction as always!
    [url]www.markthesteelhead.com[/url]
    "puddney" <webforumsusermacromedia.com> wrote in message
    news:bp6tct$9hp$1forums.macromedia.com...
    > man i would love to be able to see some code so i could study it, thank
    you for your help :-)
    >
    > Puddney
    >
    >

    markinoregon Guest

Similar Threads

  1. How to rotate a sphere in 3D...
    By Dolbarian in forum Macromedia Director 3D
    Replies: 1
    Last Post: May 22nd, 06:41 PM
  2. Camera bounding sphere
    By ystress in forum Macromedia Director 3D
    Replies: 1
    Last Post: January 7th, 02:32 PM
  3. 3d Sphere
    By Harry_Bartlett@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 5
    Last Post: April 14th, 02:59 PM
  4. Sphere
    By Papier in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 7th, 04:07 PM
  5. Text to Sphere
    By Connie Thornton in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 2
    Last Post: August 13th, 08:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139