New, Z-Buffer related blending mode

My suggestion is linked to Photoshop usage in still-image 3D composition. Specifically, it is about new layer blending mode what makes usage of depth channel (Z-buffer) information provided by rendering software.
Very often I would like to be capable of color correction of a single  particular object of a 3D rendering. Though it is possible to make  appropriate color correction in 3D package - this is nasty as that  require additional rendering of the complete scene what is normally pretty time  consuming.
Ideally, I would like to do such minor color corrections is a compositing software - in case of stills - in Adobe Photoshop.
But... how to do this?
I tried to make two render passes:
A) rendering the scene having one particular object set invisible to camera (but visible to GIobal Illumination solution)
B) rendering the scene having all objects but this one set invisible to camera (but visible to GIobal Illumination solution)
Then - these two images can be composited in Photoshop as separate layers.
That could work but it fails in case given object intersects with other in 3D space.
Normaly, 3D renderer only renders these object's parts what are visible to  3D camera, so these parts what are obscured by other object are not  renedered. But if I render given object "separately" - then I have all  its visible parts being rendered - even those what are normally invisible as  obscured by intersecting object. And in his case alpha  channel provides unsufficient information to perform appropriate  selection to remove unneeded parts of the image.
Normally, this information if provided with depth channel: the Z-buffer what can be rendered in an extra pass. This is a grayscale image where shades of gray provide information about given pixel's distance to camera.  But unfortunately, I can't see any use of it in Photoshop composition.
Ideally, some specialized "layer blending mode" should be implemented in Photoshop. It could work in the following manner:
Presuming there are two Photoshop layers:
- bottom layer containing (A) render image masked with its Z-buffer channel
- top layer containing (B) render image masked with its Z-buffer channel
Using  new blending mode, only these pixels would be revealed  what are actually "closer" based on appropriate Z-buffer data comparison between (A) and (B).
Is this suggestion worth implementation?
IMHO that would significantly faciliated 3D composition in Photoshop.

Here is a simple example of how a method is documented. (This is a stupid method, but hopefully you get the idea.)
* Prints a String.  The length of the String is returned.
* @param  toPrint  the String to be printed
* @return   the length of the String
* @throws  NullPointerException if the String is null
public int printAString(String toPrint) {
   if (toPrint == null)
      throw new NullPointerException("Null string");
   System.out.println(toPrint);
   return toPrint.length();

Similar Messages

  • How to bulid new  layer blend modes?

    please look link: https://forums.adobe.com/thread/1755389
    I did not learn Microsoft Visual Studio, I want to use my algorithms,  have same functionin   as The layer blend modes in photoshop , but algorithm  not the same , written in JavaScript to run very slowly, pls help me.
      thx

    inline unsigned8 Mul8x8Div255 (unsigned8 a, unsigned8 b)
      unsigned32 temp = (unsigned32)a * (unsigned32)b + 128;    //how modify here?
      return static_cast<unsigned8>((temp + (temp >> 8)) >> 8);  //how  modify  here?
    inline unsigned16 Mul16x16Div32768 (unsigned16 a, unsigned16 b)
      unsigned32 temp = (unsigned32)a * (unsigned32)b + 16384; ////how  modify here?
      return (unsigned16) (temp >> 15);   ////how  modify here?             
    inline float Mul32x32(float a, float b)              
      if(a>=b){
    rerurn  255-(510-a-b-(255-a)*(255-b)*(b+255)/(255*255)); //here ok
    else {
    return 255-(510-a-b-(255-a)*(255-b)*(a+255)/(255*255)); //here ok
    pls help me
    how modify:
    inline unsigned8 Mul8x8Div255 (unsigned8 a, unsigned8 b)
      unsigned32 temp = (unsigned32)a * (unsigned32)b + 128;    //how modify here?
      return static_cast<unsigned8>((temp + (temp >> 8)) >> 8);  //how  modify  here?
    inline unsigned16 Mul16x16Div32768 (unsigned16 a, unsigned16 b)
      unsigned32 temp = (unsigned32)a * (unsigned32)b + 16384; ////how  modify here?
      return (unsigned16) (temp >> 15);   ////how  modify here?             

  • Has anyone ever encountered layer blend modes behaving strangely?

    I use photoshop quite a bit for retouching and photo compositing. Tonight I encountered a strange problem. I was trying to create a vintage look on a photo and had a number of adjustment layers including a curves, levels, color fill and there were also a few texture/noise layers all set to varying opacities. Near the top of all this I had a vignette layer that was black around the edges and white in the center set to blend mode of multiply. Well, when I was clicking on and off I realize that that vignette layer was definitely lightening the center part of the overall image quite a bit (the part that is white on the vignette layer), almost like a screen. So I flipped the vignette layer through different opacity modes and saw that there was no change in its behavior, every mode was screening the white, even darker color and multiply. I thought maybe it was interacting in a weird way with one of the other layers so I turned all the others off except the back ground-- still no change. Then I dropped the layer down one at time until it was below the background. When I started to move it up again, it was behaving normally for a moment until I moved it up a couple levels in the stacking order and then it went back to the screen behavior. Anyway I shuffled it around a bit but there was no consitency to when it would display the correct opacity and when it wouldn't, so it did not seem to be an interaction with any specific layer. I don't know, but I can't really think of any case where white set to multiply should produce a lighter result even if it were interacting with another opacity. In any case it does seem to me that there is something going on with the overall computation of opacities. I tried creating a new black and white layer and it was also doing the same thing, behaving strange and not displaying the correct opacity.
    I'm tired, so I'm going to bed. I'm going to shut off the computer and hope this goes away when I reboot, but if it does not, does this sound familiar to anyone? I'm not a regular visitor to this forum, but I thought I'd put it out there in case anyone else has experienced anything like this. I've only got 5 gigs of ram on this computer and I've been working away for a while... maybe photoshop just couldn't keep up(?) I'm using Photoshop CS5, RGB Adobe 1998 colorspace.  I've never had anything like this happen in the last 11 years I've been using photoshop. Hmmm.... hope I don't have to reinstall or call support or worse. fingers crossed.

    Nevermind. It is still having the problem. I have to think that this file is just corrupt somehow because I just opened another file and can't seem to cause the same problem. Basically, I can fill a layer with white, put it to a blend mode of multiply or darker color and it will block out everything of the image below, ie totally opaque. The opaqueness varies depending on the if there are other layers also on blend modes, but it does not seem to correspond to normal blend mode interaction. If I put it right on top of a regular layer with an image on it, it totally blocks it out on a blend mode of multiply... weird. I am going to scrap this file and see if the problem recurs in other files. My 2006 Mac Pro is getting some years on it and has been running pretty slow. I'm not a hardware expert but I've done everything I know how to do to maintain it. Was thinking of upping the ram to see if I can hold out a bit longer before I upgrade the computer. Wouldn't surprise me if this problem is related to the computer.

  • Debug error when changing blending modes

    Hi there,
    I get a Debug Error every time I use 2 Adjustment Layers one above each other, with the following effects applied:
    Adjustment Layer Above:
    - Tint, not keyframed
    - Opacity Blending Mode: Color Dodge
    Adjustment Layer Below:
    - Venetian Blinds, not keyframed
    - Offset, keyframed
    - Turbulent Displace, keyframed
    - Opacity Blending Mode: Normal
    Media layer below:
    - JPG, Canon 60D - 5184x3456 - no effects applied
    The error I get (option to 'Continue', but the program doesn't respond and needs to be closed):
    Premiere Pro Debug Event
    Premiere Pro has encountered an error.
    [..\..\Src\CutlistRenderer.cpp-717]
    Error in Events panel:
    An input contract violation has occurred!
    I first started to get this error, while working with various media files in 1440x1080/HDV 1080i mode (Sony Z7U native)/29.97fps/1.33 sequence. Trying to understand what it goes wrong, I created a new project and recreated the adjustment layers (AL) with same effects applied - the only thing changed was the JPG added as media under both ALs. Same debug errors every time the blending is changed from normal to any other blending mode. With normal blending on the AL above, everything is fine.
    After further testing, it looks like even with only one AL (no effects) above the JPG, get the same debug error when blending is changed from normal to any other mode.
    Important note: Same layer+effect configuration applied in 1920x1080/ARRI Cinema mode/24fps/1.0 sequence - it works with no debug error. Haven't tried any other editing modes yet.
    Layers, in order from top:
    - AL (Venetian Blinds, Tint, Offset, Turbulent Displace - Color Dodge blending)
    - AL (Venetian Blinds, Tint, Offset, Turbulent Displace - Normal blending)
    - AL (Timecode effect)
    - Title
    - media, MPEG (1440x1080, 29.97 frame rate, 1.3333 pixel aspect ratio)
    - After Effects composition (dynamic link) 1920x1080 - content: media file, MPEG (640x480, 30fps, 1.0 + various titles and effects, including color dodge blending
    I googled for similar error reports, there are none related to Premiere Pro.
    I don't know what else to do, rather than just avoid using this effect configuration.
    Does anyone else had this issue, even in different situations?
    Thank you very much for any feedback.
    Best,
    Mark
    Hardware:
    HP Z820
    Dual Xeon E5-2643 - driver 6.1.7600.16385
    Dual nVidia Quadro 4000 - driver 8.17.12.7628
    64GB RAM
    SSD 250GB for System
    HDD 3TB for Media
    Software (up to date):
    Adobe Premiere Pro CS6 - Version 6.0.3 (001 (MC: 264587))
    Windows 7 x64 - 6.1.7601 Service Pack 1 Build 7601

    I've never seen that error myself.  If you have a way to avoid it, might be best to just do that.

  • Smart Object and blend mode issue

    I have an object that I moved from another image and needed to resize. The object is an image of a bottle and glass, with both the bottle and glass having reflections from their base. They both also have some layer masks with the reflections. I grouped the glass and bottle and created a smat object before the move to the new file). Anyway everything worked fine, except the reflections are much stonger in the new file (they are sitting over the same colored backgrond as in the original. If I open up the smart object and put a background behind the images  and the reflections (background is transparent)everthing looks as they should. The reflections have a blend mode of multiply).
    So why does the smart object not render the reflections properly (without lowering the opacity more within the smart object group) they appear almost at 100% in the new file. Any suggestions?
    Can't post the files as this happened at work.
    Thanks
    Jeff

    Anything to do with soft proofing?  Does the new document have the same colour space as the original?

  • Hue Blend Mode Confusion

    Hello,
      In reading about the Hue blend mode, I have come to understand (perhaps erroneously) that given two layers (T)op and (B)ottom, that if the Blend Mode of T is set to Hue, then the hue information in T will be blended with the saturation and luminosity in B, which essentially means that the hue information in B is replaced by the hue information in T. However, in running some experiments, I've noticed that when dealing with a very simple document comprised of two layers only, that setting the Blend Mode to Hue also changes the saturation and brightness.
    Here are the steps to duplicate the observed phenomena using two regular layers:
    Create a new blank document.
    Fill with the color that corresponds to the HSB values (0, 70, 50).
    Add a new layer above the existing layer (blend mode Normal).
    Fill the topmost layer with the color that corresponds to the HSB values (230, 70, 50).
    Using the Info panel, the HSB values for the document should read as (230, 70, 50).
    Change the Blend Mode of the topmost layer to Hue.
    Using the Info panel, the HSB values for the document should read as (230, 70, 50), but instead read as (230, 66, 53).
    And here are the steps to duplicate the observed phenomena using a regular layer and an adjustment layer:
    Create a new blank document.
    Fill with the color that corresponds to the HSB values (0, 70, 50).
    Add a Hue/Saturation adjustment layer (blend mode Normal).
    Adjust the Hue value in the Properties panel for the Hue/Saturation adjustment layer to be -130.
    Using the Info panel, the HSB values for the document should read as (230, 70, 50).
    Change the Blend Mode for the Hue/Saturation layer to be Hue.
    Using the Info panel, the HSB values for the document should read as (230, 70, 50), but instead read as (230, 66, 53).
    The results in both (for me) are identical. Am I misunderstanding the Hue blend mode?
    Thanks,
    Matt
    Photoshop Info:     13.0.1 x64 Extended
    OS:                        Windows 7 64-bit
    CPU:                      Dual Xeon E5440
    RAM:                     16 GB
    Video:                    Nvidia GeForce GTX-580

    Hi Chris,
      Thanks very much for your straightforward and helpful answer. So, it would appear that my simplistic understanding of the Hue blend mode as 'replacing' the hue of the underlying layer(s) is incorrect. Would a fair rendering of what the Hue blend mode actually does be as follows?
    "The Hue blend mode will perform a direct replacement of the hue in the underlying layer(s). The brightness and saturation of the underlying layer(s) will not be affected *unless* the resultant hue, saturation, and brightness 3-tuple would result in an illegal HSL combination, in which case the saturation and brightness of the resultant pixels will be altered to bring the HSL values into compliance."
    Also, is there a way for the Info panel to display HSL values?
    Thanks again,
    Matt

  • I can't set a layer blend mode to "Screen"

    Hello, I'm new to Photoshop as of an hour ago (I've been using GIMP for 2 years).
    I have a layer selected and I want to set the blend mode to "screen". However, the screen mode as well as several others are greyed out and won't let me select them. I'm using Windows 8 Home Premium 64 bit, and Photoshop CS6 Extended (Trial) 64 bit. I'm intending to get Adobe Creative Cloud tomorrow, but is the reason for this that I'm using the trial version? If not, what am I doing wrong? There is a screenshot below to show what I am talking about. Any help would be appreciated. Thank you!
    http://i1289.photobucket.com/albums/b504/thomasbowe34/ps_zpsc5e055f5.png

    Took me a few second to figure out whats wrong. But the answer is, you're in the 32 bit mode. Changing the mode to 16 or 8 { (Image>Mode>8Bits/Channel) or (Image>Mode>16Bits/Channel) } will make it available.

  • Aliased text on PDF export with blending modes

    So I've had this issue with a pdf, I tried to export it CMYK, RVB, interactive pdf, regular pdf, with tons of different other options, the text was still very aliased.
    I decided to take it back from scratch, openned a new document with the same size, and copied/pasted element after element from the old one to the new one, exporting as pdf between each copy/paste. The first exports went really well, the render was great… until I pasted a vector element that was applied with a blending mode (overlay).
    When I switched it to normal, the pdf export was smooth again. Tried every blending mode, everyone makes the text jaggy. Switch back, it's ok. So I'm 100% sure that this comes from blending modes, as opposed to what I could have read on other forums.
    This is a request, please, InDesign team, take care of this problem, this is quite annoying in many cases.
    Thank you for your attention!
    Twitted here as well : https://twitter.com/grinderlabs/status/448381486627311616

    To minmize the possibility of rasterizing or outlining text when transparency is flattened, keep the text above any transparent objects. Blending modes, along with most effects, use transparency.
    You can also minimize the risk by exporting the PDF with live transparency, which is supported in Acrobat 5 or higher compatibility.

  • How to Apply adjustment layers to multiple layers that have different blending modes ...

    How to Apply adjustment layers to multiple layers that have different blending modes  and keep the colours the same as the adjusment done?
    I work in Animation painting Backgrounds.  My files are sometimes upwards to 200+ layers.
    I will use adjustment layers to quickly balance colours and constrast on top of those many many layers.
    The only way that I know of how to apply adjustment layers it to every single layer  ( by applying I mean I need to get rid of the adjustment layers because we cant use them in production but i need the new colours be applied to all layers underneath ) in a psd is to manually do it By duplicating the adjusment layer 200+ times and  then merging each layer to one of those adjustment layers so that that layer can take the adjustment layers effect permanently.
    The issue is that Within Those 200 layers I have some layers set to Multiply or OVERLAY.    IT obviously wont apply the adjustment layer properly to those layers because those layer blend mode affect the layers under them. The colour wont be the same anymore in the spots that had the multiply blended mode.
    HEres an example of a simple File.  to show what i mean.
    https://dl.dropboxusercontent.com/u/3408266/ball%20layers.jpg
    https://dl.dropboxusercontent.com/u/3408266/ball.psd
    I have 2 adjustment layers up top.  I need to get rid of them by applying them to each layer! I cannot merge any of the layers. We need all those layers for production.
    I can apply the adjustment layers manually and this works GREAT for all Layers set to normal.  THey take on the colour change just FINE.
    However, The issue is that layer 6 and layer 4 are both set to mutiply and this screws up the colour once i apply the adjustment layers to each layer manually...
    How can i apply my adjustment layers to a file like this with some layers being set to multiply while keeping the layers exactly the same configuration  and The new colour taking efffect exactly how i looks before i apply the adjustment layers?
    Now the simple solution is to merge the multiply layers to the layer that it affects HOWEVER I NEED those multiply layers to be seperate! 
    I'm assuming what I want to do is impossible? Hope this isnt confusing.  As far as i know its impossible to do what I want it to do.  but just wanted to ask and see.
    I would REALLY REALLY love to talk to a adobe programmer/ technician/pro working at adobe about this.  Theres just no way to get in touch with anyone... =(
    any thoughts ?

    Sure... if you want to put it that way. Either way its not the desirable outcome. 
    its just frustrating that theres no way to apply adjustment layers to hundreds of layers while keeping them in the same configuration ( blendmodes,  layer order ,  without merging)  while keeping the same end result.
    works great if all your layers are set to normal though..    But I really need to keep shadow layers seperately and be able to adjust on the fly aswell as apply those adjusment to all my layers.
    I suppose that just isnt possible.   I understand the math required for this would be tremendous/ complicated if something like this would ever be implemented.  Would be nice if adobe could come up with some solution to this.  Its really a huge issue in my work flow and theres no alternatives.    How else can I adjust colours to 100+ layers  with a few clicks that lets me play around the the adjustment until im happy with the outcome.    Really wish i could adjust and the quickly apply that adjustment to all my layers regardless of blend mode.   LIke If the Layers with blendmode could somehow take the properties of the adjustment layer and keep adjusting those layers undereathe on top of that blended mode that its doing...   

  • Blend Modes not working in CS6

    My blend modes aren't working. If I try to apply a blend mode, no effect.

    Hi, Noel. I'm very new at this, so I'll try to give you as much information as I can. Using blend mode on the single merged layer was working for me several hours ago. My process was Gaussian bur on layer, blend mode set to multiply on layer, and then desaturate. When blend mode was working, desaturation looked kinda funny (something wasn't right). I'm following this tutorial: http://wegraphics.net/blog/tutorials/how-to-design-a-vintage-style-ski-poster-in-photoshop /
    I tried adding a new layer under the old layer, but still not working. How do I set new layer as a background? I have no intent to save it as a partially transparent PNG.

  • ONLY screen blending mode doesn't work...?

    I have Windows 8, and Photoshop CS6. All of my blending modes work, except for Screen. I don't know why it doesn't, but I do use it somewhat frequently, and it's really holding me back at this point.
    Is this related to all the other problems people have been having with Photoshop running on Windows 8? Or is this an issue that I'm going to have to fix myself, somehow?
    Thanks!

    Do you see the problem if you disable the [  ] Use Graphics Processor setting entirely (remembering to restart Photoshop before testing)?
    What video card (aka graphics adapter) do you have in your system?
    What driver version are you running?
    Have you looked for alternative versions e.g., on nVidia.com or AMD.com?
    -Noel

  • How to apply blending modes to a gif in CS6?

    Hello everyone! I am in need of a tutorial or at least a how-to-step-through on how to apply the different blending modes on a gif.
    For this specific situation, I have a gif with a black background and a white semi-glowing scope, but I just want the white glowing scope to show.
    I think that Lighten would be a good blending mode, but I just don't know how to produce the results I want.
    Could anyone give me a reference or a guide on how to do this?
    I'm not sure how to edit a gif either, being that there are so many tutorials saying this and that, leaving me confused in the end.
    If someone could break all this down for me in detail(as simple as possible) and what not, that'd be great!
    Until then, thank you!

    GIFs are in indexed color and don't support any blending modes nor layers. You need to do an Image --> Mode --> RGB and then a whole new world will open up...
    Mylenium

  • Quickly switching blending modes

    in windows, you can select a Blend mode (Overlay, Screen, etc) and using the mouse wheel, select new ones.  However on a Mac, you have to click and select one everytime.  Is there some secret to achieve a similar quick switch like on Windows PS?  thanks

    Try shift +/- with a tool selected that doesn't have a blend mode associated with it (eg. Move tool (v)). This will walk down/up the modes while previewing the change.
    You can also click the blend mode in the Layer panel to give focus, and then use the arrow keys to cycle thru the modes. This won't preview the change until clicking return.

  • AS3 Blending Modes

    Hi all, I'm trying to apply the Screen Blending Mode to a Movie Clip.  I know how to do this using the properties panel if the clip is on the stage, but I need to do this purely with Actionscript 3 and I'm having difficuly finding how to do this properly. 
    I have another object which is a PNG file that I load into the swf behind object1.
    var object:object_mc = new object_mc();
    var imgLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("box.png");
    imgLoader.load(url);
    addChild(imgLoader);
    imgLoader.x = 0;
    imgLoader.y = 0;
    addChild(object);
    BlendMode.SCREEN; // This doesn't produce any errors, but doens't apply the effect.
    object.x = 6;
    object.y = 6;
    Any help is much appreciated,
    Thanks =)

    And you might still want to use:
    object.blendMode=BlendMode.SCREEN;
    Using the static class property helps in that the compiler can check. If you did something like:
    object.blendMode="Screen"
    It might or might not work, but the compiler couldn't tell you that it wasn't supposed to be capitalized.

  • Layers & blending modes

    Please can anyone offer advice on how to change the blending modes on multiple layers at once. I'm investigating star trails and would like to change a hundred or so layers to lighten all at once. Many thanks.

    If the layers in question are star trails on transparency, try this:
    Turn off visiblity on all layers EXCEPT the star trail layers.
    Target the top-most star trail layer in the stack.
    Shift-Option-Command-E to stamp all of those layers to a single new layer.
    Turn off visibility on all the individual start trail layers.
    Change blending mode of the single new layer.

Maybe you are looking for