Professional Web Applications Themes

Model as a member. - Macromedia Director 3D

Hi, I'm just wondering if there a way in which I can grab (snapshot) a model within a 3D member and create an static image of it. I can stage.image the 3D member, but I would like to refine it even more to just the model I would be looking to grab. Further more it would be nice to include an alpha to the member to knock out the background if the model was an odd shape. If there is an xtra or a method of doing this I'd be creatful to anybody who can point me in the right ...

Sponsored Links
  1. #1

    Default Model as a member.

    Hi,

    I'm just wondering if there a way in which I can grab (snapshot) a model
    within a 3D member and create an static image of it. I can stage.image the 3D
    member, but I would like to refine it even more to just the model I would be
    looking to grab. Further more it would be nice to include an alpha to the
    member to knock out the background if the model was an odd shape.

    If there is an xtra or a method of doing this I'd be creatful to anybody who
    can point me in the right direction.

    Thanks in advance for any help.

    Cheers Simon.

    Sponsored Links
    smartino Guest

  2. #2

    Default Re: Model as a member.

    You can use...

    vImage = member("3D").image

    ... assuming that your shockwave3D member is called "3D".

    You can use the crop() method on an image to return a cropped rect of that
    image. Or you can position your model in the 3D sprite before you take the
    snapshot, so that it fills the sprite.

    openspark Guest

  3. #3

    Default Re: Model as a member.

    As far as i know, only the default camera of a 3D-member will produce the
    "member("3D").image". But you can set the size of the image with the
    "defaultrect" property of the 3D-member. The 3D-member does not have to be on
    stage.

    If you would like to get a image that has the size of 1024x1024 you would set
    the "defaultrect" of the 3D-member first.

    member("3D").defaultrect=rect(0,0,1024,1024)
    member("3D").regpoint=point(512,512) -- just to keep the center in the middle,
    would make sense to use variables here...

    pImage=member("3D").image

    or the faster way would be to create in the beginning a image and then use
    copypixels.

    property pimage
    ...
    pimage=image(1024,1024,24)

    ... -- later on in the script where you want to copy the image of the 3D
    member into your bitmap...
    pImage.copyPixels(pmember.image, pimage.rect, pmember.rect)

    to generate the alpha-channel, i think you would have to use two images, one
    with a white backround and a black model. You only need to apply a black shader
    to your model (and all its children) and make the screenshot. Then use some
    imaging lingo to add the alpha channel to the colored version.





    hondo3000 Guest

  4. #4

    Default Re: Model as a member.

    Nice work both of you. Both worked fine and hondo3000, the alpha idea is a just what i needed.

    Cheers.
    smartino Guest

Similar Threads

  1. does modelresource need to be in same member as model
    By dsdsdsdsd in forum Macromedia Director 3D
    Replies: 1
    Last Post: August 8th, 10:21 AM
  2. Insert model from cast member.
    By the_scripter in forum Macromedia Director 3D
    Replies: 2
    Last Post: January 11th, 01:33 AM
  3. Applying colour to 3D model in a 3D member
    By naddasmiles in forum Macromedia Director 3D
    Replies: 3
    Last Post: August 10th, 02:31 AM
  4. member().model() doesn't work in JS syntax
    By Max in forum Macromedia Director 3D
    Replies: 10
    Last Post: January 5th, 01:59 AM
  5. Replies: 1
    Last Post: November 7th, 02:18 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