Professional Web Applications Themes

backdrops - Macromedia Director 3D

Im trying to create a 3d movie where the user can select a choice of backdrops - is it possible to change backdrops at runtime (a choice of 10 for example)? I'd also like the user to be able to import their own images into the movie and use them as the 3D scene backdrop - that also raises the issue that the image might not be the same size as the 3D sprite and so display too large or small in the window. Is there a way to make director automatically scale the image to the correct size. If ...

  1. #1

    Default backdrops

    Im trying to create a 3d movie where the user can select a choice of backdrops
    - is it possible to change backdrops at runtime (a choice of 10 for example)?

    I'd also like the user to be able to import their own images into the movie
    and use them as the 3D scene backdrop - that also raises the issue that the
    image might not be the same size as the 3D sprite and so display too large or
    small in the window. Is there a way to make director automatically scale the
    image to the correct size.

    If anyone has an example they think would help me I really grateful to see it!

    John_Everist Guest

  2. #2

    Default Re: backdrops

    thatst no problem, but as far as i know it is only possibel to scale the
    backdrop or overlay with only one parameter. so you have can not scretch into x
    direction independent from y direction.

    paste this code into a empty behavrior and put it onto a empty shockwave3D
    member on stage.

    you can use as many textures as you want, or simpy change the source of the
    texture by another castmember.
    take a look into the help files for: overlay, backdrop

    property pMember, spritenum, n


    on beginsprite me
    pMember=sprite(spritenum).member
    pMember.resetworld()

    newtex=pMember.newtexture("tex01", #fromcastmember, member("tex01"))
    pMember.camera(1).addBackdrop(newtex, point(0, 0), 0)
    end

    on exitframe me

    n=n+5
    n= n mod(360)
    scal=sin((n*pi)/180)*0.5
    pMember.camera(1).backdrop[1].scale=1+scal
    end

    hondo3000 Guest

  3. #3

    Default Re: backdrops

    Hondo - its seems I'm getting used to thanking you! Cheers
    John_Everist Guest

  4. #4

    Default Re: backdrops

    i just forgot to tell you how to change the texture of the overlay with a image
    file that can be chosen by a user. the following code has to be applied to a
    button or something next to the 3dmember, or put it under the code you have at
    the moment.

    the problem of this sample is, that the castmembers will just be added, this
    fill the memory after some time, if you do not delete them from memory. it will
    not check at the moment if the selected file is a image file. i like to give
    samples that are easy to understand, if the code is full of errorchecking you
    sometimes dont see what the point is.

    paste this code into an empty behavior and attach it to a button (i prefer the
    classic ones), and thanks for giving feedback!




    on mouseUp me
    objFileio = new xtra("fileio")--##new instance of the fileio xtra
    thepath=objFileio.displayOpen()--##getting the path form the open dialog

    newBitmap = _movie.newMember(#bitmap)--##making a new bitmap
    newBitmap.importfileinto(thepath)--importing the file into that bitmap member

    member("world").texture("tex01").member=newBitmap--##changing the member of
    the texture

    objFileio=0--## deleting the fileio xtra instance
    end

    hondo3000 Guest

Similar Threads

  1. backdrops URGENT
    By jellyfishjam webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 1
    Last Post: November 25th, 12:27 PM
  2. Animating Backdrops
    By Zafada webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: August 17th, 10:46 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