Professional Web Applications Themes

3d Lingo programming - Macromedia Director 3D

hi again, i think i have a better understanding of the concepts around using 3D in director now, but i still need some help achieving my goal. So i go to insert > media item > shockwave 3D, which gives me a sprite for the score. I have found scripts all over the web to configure the 3d item, but i always get error messages due to an expected comma or expcted end of statement. Anyway, can some one tell me the Lingo code i need to insert after right-clicking on the sprite to get a wire-frame sphere with a ...

  1. #1

    Default 3d Lingo programming

    hi again,

    i think i have a better understanding of the concepts around using 3D in director now, but i still need some help achieving my goal. So i go to insert > media item > shockwave 3D, which gives me a sprite for the score. I have found scripts all over the web to configure the 3d item, but i always get error messages due to an expected comma or expcted end of statement. Anyway, can some one tell me the Lingo code i need to insert after right-clicking on the sprite to get a wire-frame sphere with a radius of 50 and a resolution of 6 with preferably a white background (bg/overlay techniques?). Plus blue texturing on both outside and inside surface (because it is wire-frame) and don't forget Start angle =0, end angel = 360.
    In addition, how can i get it to continually rotate 360 degrees along the y-axis until a certain time when it will rotate 180 degrees along the x-axis?

    I think i am in the situation of being a creative designer that does not have enough technical knowledge to do what i want with my projects.
    I know this is a lot to ask, but i am desperate for some help! please help me...

    Thankyou in advance,
    Mr E


    Mr. E webforumsuser@macromedia.com Guest

  2. #2

    Default Re: 3d Lingo programming

    well probably my advice to you is to simply forget it. shockwave 3d is largely for programmers only - I'd just try to get to grips with a 3d program such as 3d max.

    But designers do use shockwave 3d and good luck to them. Your best bet would be to take a look at karl sigiscars behaviors library which is specially designed for designers. The url is in my links page. You could also maybe look at nasigoreng which is a good learners site

    [url]http://www.geocities.com/hairybobby2000/links.html[/url]

    generally for you should be able to get shockwave to work with simple interactive movements like mousemoves. The macromedia behaviors effects have both a trigger and an effect. First apply an effect and then apply for trigger - you should then be able to assign that trigger to an effect.

    good luck


    HAIRYBOBBY - why didn't I choose a really cool name like the vulcanpimp

    [url]http://www.geocities.com/hairybobby2000[/url]

    new vector shape behaviors here

    [url]http://www.geocities.com/hairybobby2000/vertexhome.html[/url]
    hairybobby webforumsuser@macromedia.com Guest

  3. #3

    Default Re: 3d Lingo programming


    I'm thinking, like you, that Lingo 3d is for experienced programmers only..
    And I have to admit that even I had get a little numb when it came out for the first time !!

    I am a student, I'm doing the secondary school (is that the way you call it there?) here in Italy.
    I started working with Macromedia products when I was 15, and now (17) I got quite experienced..

    For my multimedia, I use both Director MX and Flash MX..
    Now I'm working on a game, something like a young life simulator.. very funny
    I think you'll find it on [url]www.tamalife.it[/url] at the end of the year !!

    But now, my question !

    When I use 3d data imported from external editors (In my case Maya 4.5) how can I display it in projector mode?
    It happens that the sprite exists, but no data is visualized on screen!!
    But this not happen in authoring mode, why?

    (I thought that was because of the preload, but.. nothing!)

    Thank you for your friendly attenction,
    Fabio (The third D) ((Maybe!!))


    Third D webforumsuser@macromedia.com Guest

  4. #4

    Default Re: 3d Lingo programming

    i add the same bug once it was there because i uncheck the "shader" and "testure map resource" during the export try to keep them checked the next time u export.

    thoue


    Thoue webforumsuser@macromedia.com Guest

  5. #5

    Default Re: 3d Lingo programming

    here is [url]http://eleves_tim.cmaisonneuve.qc.ca/e0390205/forumHlp.htm[/url]

    create an empty shockwave3d member named : scene
    a empty bitmap named : whiteTexture
    copy paste this code in a beahior

    here is the code:

    ---3d forum question from Mr. E post Saturday, September 13, 2003 5:24 PM
    --http://webforums.macromedia.com/director/messageview.cfm?catid=268&threadid=689874&STARTPAG E=1&CFID=11298820&CFTOKEN=f4c94bf0b32e425b-13B66717-B78D-3A7C-CF3D96F38610A133
    --version 1.0.0
    --create : monday 22 sept at 2.26 am east by Gabriel ( member : thoue in the forum)
    --************************************************** *********************************************
    --Create a 3d shockwave member named : scene
    --Create a empty bitmap named: whiteTexture
    --Copy this text in a behavior and drop it on the member"scene" in the timeline
    --************************************************** *********************************************
    global gMember, gSprite, gModel
    global gAngle


    on beginSprite me
    gSprite = sprite(me.spritenum)
    gMember = member("scene")
    --Init angle for rotation
    gAngle = 0
    --init bg color
    --default cam = 1 defautl colorBuffer.clearValue = rgb(0,0,0) black
    gMember.camera(1).colorBuffer.clearValue = rgb(255,255,255)
    alert "I hope it will help you. Always Director help docs " & return & "Input : rightclick on the movie"\
    & return & " Output : rotation shpere"
    end

    on exitframe me
    --loop on frame
    go to the frame
    end

    on enterFrame me

    --from Mr. E : In addition, how can i get it to continually rotate 360
    --degrees along the y-axis until a certain time when
    --it will rotate 180 degrees along the x-axis?

    --From gab : im not sure what u mean here but i think u mean if it rotate between 0 and 180
    --on x then rotate on y

    --if "theSphere" exist then ...
    if not voidP((gMember).model("theSphere")) then

    --Model rotate at is point on x axe relative to the world
    sphereposition = gModel.transform.position
    gModel.rotate(sphereposition, vector(1, 0, 0), 2, #world)

    --increment gangle by 2 if u change this value dont forget to change the 2 above
    gAngle = gAngle + 2
    if gAngle > 359 then gAngle = 0
    --if rotation on x (relative to the world < 180) then
    --model rotate 4 degree on y axe relative to itself
    if gAngle < 180 then gModel.rotate(0,4,0, #self)
    end if
    end

    on endSprite me
    --clear the worl to is init value
    gMember.resetWorld()
    end

    on rightMouseDown
    --dont do if model theSphere existe"
    if voidP(gMember.model("theSphere")) then
    --init sphere
    nmr = gMember.newModelResource("sphere", #sphere, #both)

    --******************FROM lingo DOC help***************
    --facing of #both creates the double amount of meshes and consequently produces double
    --the number of shader entries in the shaderList. There will be 2 for planes and spheres
    --(for the inside and outside of the model respectively), 12 for cubes
    --(6 on the outside, 6 on the inside),
    --and 6 for cylinders (top, hull and bottom outside, and another set for the inside).
    --From gab : all this means fast 2 side shading dont exist it double models = lower scene

    nmr.radius = 50.0
    gMember.newModel("theSphere", nmr)
    gModel = gMember.model("theSphere")
    gModel.resource.resolution = 6

    --init shader ShaderRessource(sr) textureResource(tr)
    sr = gMember.newShader("sphereShader",#standard)
    sr.renderstyle = #wire
    tr = gMember.newTexture("white",#fromCastmember, member("whiteTexture")) -- only a white bitmap
    sr.texture = tr
    sr.emissive = rgb(0,0,255)
    gModel.shaderlist[1] = sr
    gModel.shaderlist[2] = sr
    end if

    end rightMouseDown
    ---3d forum question from Mr. E post Saturday, September 13, 2003 5:24 PM
    --http://webforums.macromedia.com/director/messageview.cfm?catid=268&threadid=689874&STARTPAG E=1&CFID=11298820&CFTOKEN=f4c94bf0b32e425b-13B66717-B78D-3A7C-CF3D96F38610A133
    --version 1.0.0
    --create : monday 22 sept at 2.26 am east by Gabriel ( member : thoue in the forum)
    --************************************************** *********************************************
    --Create a 3d shockwave member named : scene
    --Create a empty bitmap named: whiteTexture
    --Copy this text in a behavior and drop it on the member"scene" in the timeline
    --************************************************** *********************************************
    global gMember, gSprite, gModel
    global gAngle


    on beginSprite me
    gSprite = sprite(me.spritenum)
    gMember = member("scene")
    --Init angle for rotation
    gAngle = 0
    --init bg color
    --default cam = 1 defautl colorBuffer.clearValue = rgb(0,0,0) black
    gMember.camera(1).colorBuffer.clearValue = rgb(255,255,255)
    alert "I hope it will help you. Always Director help docs " & return & "Input : rightclick on the movie"\
    & return & " Output : rotation shpere"
    end

    on exitframe me
    --loop on frame
    go to the frame
    end

    on enterFrame me

    --from Mr. E : In addition, how can i get it to continually rotate 360
    --degrees along the y-axis until a certain time when
    --it will rotate 180 degrees along the x-axis?

    --From gab : im not sure what u mean here but i think u mean if it rotate between 0 and 180
    --on x then rotate on y

    --if "theSphere" exist then ...
    if not voidP((gMember).model("theSphere")) then

    --Model rotate at is point on x axe relative to the world
    sphereposition = gModel.transform.position
    gModel.rotate(sphereposition, vector(1, 0, 0), 2, #world)

    --increment gangle by 2 if u change this value dont forget to change the 2 above
    gAngle = gAngle + 2
    if gAngle > 359 then gAngle = 0
    --if rotation on x (relative to the world < 180) then
    --model rotate 4 degree on y axe relative to itself
    if gAngle < 180 then gModel.rotate(0,4,0, #self)
    end if
    end

    on endSprite me
    --clear the worl to is init value
    gMember.resetWorld()
    end

    on rightMouseDown
    --dont do if model theSphere existe"
    if voidP(gMember.model("theSphere")) then
    --init sphere
    nmr = gMember.newModelResource("sphere", #sphere, #both)

    --******************FROM lingo DOC help***************
    --facing of #both creates the double amount of meshes and consequently produces double
    --the number of shader entries in the shaderList. There will be 2 for planes and spheres
    --(for the inside and outside of the model respectively), 12 for cubes
    --(6 on the outside, 6 on the inside),
    --and 6 for cylinders (top, hull and bottom outside, and another set for the inside).
    --From gab : all this means fast 2 side shading dont exist it double models = lower scene

    nmr.radius = 50.0
    gMember.newModel("theSphere", nmr)
    gModel = gMember.model("theSphere")
    gModel.resource.resolution = 6

    --init shader ShaderRessource(sr) textureResource(tr)
    sr = gMember.newShader("sphereShader",#standard)
    sr.renderstyle = #wire
    tr = gMember.newTexture("white",#fromCastmember, member("whiteTexture")) -- only a white bitmap
    sr.texture = tr
    sr.emissive = rgb(0,0,255)
    gModel.shaderlist[1] = sr
    gModel.shaderlist[2] = sr
    end if

    end rightMouseDown


    Thoue webforumsuser@macromedia.com Guest

  6. #6

    Default Re: 3d Lingo programming

    [For Thoue: Thank you for your example and for your tip, but my "Maya 4.5 exporter editor" have any technical choice about
    exporting a file.. You can only preview the model itself. I really think that my problem is Director's instead.
    If you are needing some stuffs, I'll do my best so.. Hi!]

    _________________________________
    IT IS A BUG OR IT IS MY FAULT ?
    _________________________________

    I have a serious problem that affects only my projectors!
    Here I report how to get it:

    1. Create a 3d model with or without texture in an external editor and then export it..
    If you are using Maya 4.5, the *.w3d file will be always as the same as the model you created;
    I mean that there are no Exporting Options, not like 3d Studio Max..
    2. Import the *.w3d file you created in Director MX and set his DTS property off, so you can make the member's
    background transparent (setting his Ink property to "Background Transparent")
    3. Place the 3d member on the stage
    4. Create a projector with that movie..

    WHEN THE PROJECTOR RUNS, THE MOVIE DON'T DISPLAY ANY 3D DATA !
    but the sprite seems to exists.. In fact, if you assign scripts to the 3d member (like a On MouseLeave) the event
    will be read.. But no 3d data is displayed on-screen !

    There's more: in authoring mode (in Director's environment) there are no problems! ALL THE 3D GRAPHICS IS VISUALIZED!

    I think this is neither an Xtra problem nor a "Preload" problem..
    And overall why in authoring mode I can see everything?

    I hope someone of you will answer me!

    Thank you to everyone,
    The Third D..


    Third D webforumsuser@macromedia.com Guest

Similar Threads

  1. good 3d lingo programming
    By Roofy in forum Macromedia Director 3D
    Replies: 2
    Last Post: February 14th, 09:07 AM
  2. Replies: 0
    Last Post: May 5th, 06:41 PM
  3. Lingo Game Programming Books/Websites
    By Richard in forum Macromedia Director Lingo
    Replies: 2
    Last Post: October 8th, 10:44 PM
  4. Programming ASP.net
    By Steve S in forum ASP.NET General
    Replies: 1
    Last Post: July 31st, 04:29 PM
  5. RPC Programming
    By Ramesh Nair in forum UNIX Programming
    Replies: 0
    Last Post: July 22nd, 11:29 AM

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