Ask a Question related to Macromedia Director 3D, Design and Development.

  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. Similar Questions and Discussions

    1. How to rotate a sphere in 3D...
      hi guys, i just have a quick question today, i am making a game 3d game with a sphere. What i want to do is rotate the sphere through keyboard...
    2. Camera bounding sphere
      Hi, I am working with a 3d walk through. The camera has a bounding sphere which due to its radius won't fit through a normal sized door. If I make...
    3. 3d Sphere
      Can anyone advise me on how to do two things with Illustrator CS on a Mac OS X: 1)Create a sphere that has an off-center light source? Ihave...
    4. Sphere
      hi how to do a script for objects on a sphere just like http://www.lo9ic.com/v4/sphere01.swf[/L but instead of seeing the sphere from outside,...
    5. Text to Sphere
      How do I make my text look like it is wrapped around a sphere? I have PS6.0 & PI9.0.1.
  3. #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" <webforumsuser@macromedia.com> wrote in message
    news:bp5hir$sr9$1@forums.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

  4. #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

  5. #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" <webforumsuser@macromedia.com> wrote in message
    news:bp6tct$9hp$1@forums.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

Posting Permissions

  • You may not post new threads
  • You may 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