Ask a Question related to Macromedia Director 3D, Design and Development.
-
puddney webforumsuser@macromedia.com #1
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
-
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... -
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... -
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... -
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,... -
Text to Sphere
How do I make my text look like it is wrapped around a sphere? I have PS6.0 & PI9.0.1. -
markinoregon #2
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...fancy. I am working on a site and for it too look good i need a sphere with> hey all,
>
> i have been using director for a while now, but have never done anything
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
-
puddney webforumsuser@macromedia.com #3
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
-
markinoregon #4
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...you for your help :-)> man i would love to be able to see some code so i could study it, thank>
> Puddney
>
>
markinoregon Guest



Reply With Quote

