Professional Web Applications Themes

camera.image? or how do I projection map? - Macromedia Director 3D

I'm looking for a real-time solution for a flat mirror. My thought was to take an .image of a normal camera and map it to a texture. My problem is, I can apparently take a .image of a 3d castmember but only of camera[1]. I'd REALLY hate to have to work around that. Is it possible to swap the standard camera for a castmember? Or maybe I'm going about this all wrong? Thanks, Jeff....

  1. #1

    Default camera.image? or how do I projection map?

    I'm looking for a real-time solution for a flat mirror. My thought was to take an .image of a normal camera and map it to a texture. My problem is, I can apparently take a .image of a 3d castmember but only of camera[1]. I'd REALLY hate to have to work around that. Is it possible to swap the standard camera for a castmember? Or maybe I'm going about this all wrong?

    Thanks,
    Jeff.


    MultiDisciple webforumsuser@macromedia.com Guest

  2. #2

    Default Re: camera.image? or how do I projection map?

    "MultiDisciple" [email]webforumsusermacromedia.com[/email] wrote:
    > I'm looking for a real-time solution for a flat mirror. My thought was to take an .image of a normal camera and map it to a texture. My problem is, I can apparently take a .image of a 3d castmember but only of camera[1]. I'd REALLY hate to have to work around that. Is it possible to swap the standard camera for a castmember? Or maybe I'm going about this all wrong?
    You can take pics from another cam. As Hairybobby pointed, there´s an
    example with source at my site:

    [url]www.onwine.com.ar[/url] > source > screenshots from cameras

    Examples of mirrors:

    [url]http://www.cleoag.com/labs/shockwave/[/url] > Camera Mirrors
    I think there´s something about mirrors [url]http://www.xonko.com/[/url]

    Good luck,
    --
    Agustín María Rodríguez | [email]agustinOnWine.com.ar[/email] | [url]www.OnWine.com.ar[/url]

    Agustín María Rodríguez Guest

  3. #3

    Default Re: camera.image? or how do I projection map?

    Retrieving the 3D member.image property is not doented, and with a reason: there is a bug in it. On windows 95/98/ME systems, everytime you grab the member.image you cause a memory leak.

    A faster, and safer way is to create an empty 3D castmember, set it's directToStage to false, and put it in the stage. Then you set the sprite.camera to whatever camera in the main 3D cast member you want (yes, a 3D sprite can display cameras from 3D members other than it's own, even if it's own member is empty), and capture it by using copypixels from (the stage).image.

    You might even put it behind the main 3D sprite, but it might cause problems on Mac systems (as always), because 3D sprites will always fight to be on front on MAC, even if they have DTS set to false.

    If you are targetting for browsers, you can hide the 3D sprite by modifying the HTML tags that show the DCR movie. Simply make your stage a bit wider than it should be, and put the non DTS 3D sprite in that area, then change the export settings to not scale the movie, and change the width and height in the HTML page to crop away the area where the hidden 3D sprite is. This way you can still grab the sprite's image from the stage's image, but the user won't see it, because the browser is cropping the DCR movie.

    Ah, also, for speed purposes, make sure the image you are going to make a texture with has power of 2 dimensions. If it doesn't, Director will resize it to the nearest power of 2 width and height before uploading it to the video card, and the image quality will be slightly degraded, plus it's a lot slower. So make your hidden 3D sprite something like 128x128, or 256x256 (but nothing bigger than that, otherwise the framerate will be slow). You can also have the height and width different: 256x128, 128x64, and so on.

    This demo uses such trick for creating glowing effects:

    [url]http://www.station-zero.com/medion/demos/cematery.dir[/url]



    Referring URLs
    [url]http://www.station-zero.com/medion/demos/cematery.dir[/url]




    Medion webforumsuser@macromedia.com Guest

Similar Threads

  1. Grab Image from camera to cast member
    By NROM in forum Macromedia Director 3D
    Replies: 6
    Last Post: July 28th, 03:46 PM
  2. CAMERA LENS IMAGE NEEDED
    By Harold_D._Gladstone@adobeforums.com in forum Adobe Indesign Windows
    Replies: 3
    Last Post: April 20th, 11:59 PM
  3. camera image
    By mygraneboy in forum Macromedia Director 3D
    Replies: 0
    Last Post: February 8th, 07:22 PM
  4. is spherical camera projection possible? - how?
    By Mike Edel in forum Macromedia Director 3D
    Replies: 1
    Last Post: August 31st, 06:20 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