color filter for camera

Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default color filter for camera

    I want to apply a color filter to a camera that only lets through the color I
    require. I can do this when the 3D member is on the stage using a solid color
    in a sprite on top of the sprite containing the 3D member and setting the Ink
    to transparent. However I want to make this a property of the camera. Any
    suggestions?
    Ross

    rossgilmour Guest

  2. Similar Questions and Discussions

    1. Color Profile for Nikon camera
      I am using a Nikon D100 camera and I have the color mode set on the camera for Adobe Colors. When I try to bring in a photo from that camera into...
    2. camera filter effects
      Hi there, does anyone know if it possible to use a noise/film grain like effect (think silent hill) on the camera using director/shockwave 3D?
    3. change color in Find Edges filter
      I want to outline some yellow letters in black. When I use the Find Edges filter it makes the letters white with a yellow outline. I see not...
    4. Adobe Camera Raw Filter for Fuji S2 Pro ?
      Hello ! I'm thinking about buying the Adobe Camera Raw Filter for my Fuji S2 Pro. Has anyone experiences with this tool for the Fuji S2 ? ...
    5. B&W Pictures + Color Filter
      Hi there, I'm looking at the Pentax Optio's sample pictures at http://www.steves-digicams.com/2003_reviews/optio33l_samples.html Nice effect...
  3. #2

    Default Re: color filter for camera

    1. Create a new bitmap member by code, draw a filled rectangle in it and set
    its color 2. Create a texture out of this bitmap member 3. Set the new texture
    as an overlay of the camera Cheers, Karl. [url]http://www.chromelib.com[/url]

    Newt99 Guest

  4. #3

    Default Re: color filter for camera

    Karl,
    Many thanks but when I tried this all I see is solid color.
    Ross
    rossgilmour Guest

  5. #4

    Default Re: color filter for camera


    Ross,

    Step 4 was missing... here it is:

    4. Set the overlay blend to 50 or so

    Cheers,
    Karl.

    [url]http://www.chromelib.com[/url]

    Newt99 Guest

  6. #5

    Default Re: color filter for camera

    Karl,
    Unfortunately this only gives a colored tint to everything. I want it to act
    as a color filter that does not let through certain colors. For example if I
    want a red filter then anything that is black, blue or green will be black
    while anything that is white, red, yellow, magenta ... will be shades of red
    depending on the red value of the RGB color.
    Ross

    rossgilmour Guest

  7. #6

    Default Re: color filter for camera

    Sounds like you want to do image processing in real-time. That's probably only
    possible using a 3D engine that supports DirectX9 and a custom (but simple)
    pixel shader. With SW3D, you might get try using getPixel() and setPixel() to
    process the current frame and then displaying the result. Depending on the
    size of the 3D viewport, it might not take too long. Also keep mind that the
    image data of a 3D member is fixed at 320x240, so if you need higher than that,
    you'll have to turn directToStage off on your 3D sprite, then copyPixel() the
    stage to your image buffer, then do your pixel processing on that.
    --------------------------------- nick * rasterwerks - com

    nick kang Guest

  8. #7

    Default Re: color filter for camera

    Nick,
    Yes I do want to do image processing real-time. I am working on a displaying
    stereographic views of 3D environments as anaglypic images which uses the
    red/cyan glasses. To do this I need to produce 2 seperate images (one with only
    the red channel and the other with the green & blue channels) and then add the
    2 images together on the stage. I have already done it by setting 2 bitmaps to
    different camera positions and using copyPixel with an Ink to remove the
    unneeded colors. This works but is a bit slow. You can see an example of this I
    have done if you have a pair of red/cyan glasses (red/green or red/blue also
    work) [url]http://www.rg-media.co.uk/stars3D/stars3D.htm[/url]

    I was hoping to find a faster method.
    Many thanks,
    Ross

    rossgilmour Guest

  9. #8

    Default Re: color filter for camera

    I'm talking off the top of my head right now, but is it possible to set the
    blending mode of the overlay to #multiply ? Or is only #blend supported? If
    I've got this right in my head, mulitplying the image in the scene by a purley
    red (255,0,0) image, *should* give you what you want. ie say one of the pixels
    underneath is (128,64,32). If you multiply this by (255,0,0) then you get
    (after normalisation) 0.5 * 1 0.25 * 0 0.125 * 0 = (0.5,0,0) or
    (128,0,0) Or I could be talking out of a certain orifice :) Jonathan Pace
    [url]www.unwrong.com[/url]

    jrPace Guest

  10. #9

    Default Re: color filter for camera

    I see, for an anaglyph you need the overlapping renders of a particular model
    to be additive, like in your demo. Unfortunately, there's no additive blending
    between fills in SW3D, so you'll need to use imaging functions after all. Too
    bad, you can almost get away with just using multiple cameras if a wireframe
    display is all you needed (because image overlap would be minimal), then it
    would run full speed. --------------------------------- nick * rasterwerks -
    com

    nick kang Guest

  11. #10

    Default Re: color filter for camera

    But there *is* additive blending between texture stages. So you could render
    each view (red, green, whatever) into a texture, then layer up these textures
    onto a quad that fills the screen using the #add blend mode. It's getting
    pretty convoluted, but I think there's a way here to get it working without
    resorting to imaging lingo. Jonathan Pace [url]www.unwrong.com[/url]

    jrPace Guest

  12. #11

    Default Re: color filter for camera

    Good point, but unfortunately there isn't a direct way to render to a texture
    (and thus keeping all the operations on the video card). You still need to
    access the member3D.image or by doing a copyPixel of the stage, then create a
    new texture from that image, which will incur a similar performance hit. But
    maybe you have another method in mind? I slapped together a test, and the
    overlap is problematic. Looks okay in wireframe (my glasses have the red
    filter over the left eye), not good filled, even with blending. Enable shading
    and it looks like a mess. [url]www.rasterwerks.com/link/anaglyph_001.htm[/url]
    [url]www.rasterwerks.com/link/anaglyph_001.dir.zip[/url] (src)
    --------------------------------- nick * rasterwerks - com

    nick kang Guest

Posting Permissions

  • You may not post new threads
  • You may 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