How can I do the Screen layer effect of Photoshop in the Material Editor? I have two nodes I need to combine, but I need to set my top node to screen over my bottom node.
Lerp which takes the inputs of your two nodes or textures and a constant one vector with a value of 0.5 should do the trick. You can modify the constant one vector for how much you want to screen A value of 1 means that A is now 100% transparent/opaque and a value of 0 is B 100% opaque.
No. Add isn't overlay. If 0.5 is halfway between white and black, Overlay seems to take everything over 0.5 and adds it, and anything below 0.5 and subtracts it.
The way the math nodes work is with basic math :P You add a pixel of 0.15 brightness to another with 0.35, you end up with a mid-grey pixel of 0.5.
Multiply, subtract and divide nodes work in similar ways, as expected.
Photoshop's multiply doesn't work like that because of it's inability to go above a brightness of 1.
Ok from what I read up on, screen is the inverse of multiply. so formula would go something like
Constant 1 - A * Constant 1 - B
Tried this in UDK and it did work though I dont have photoshop installed to ensure it works correctly.
EDIT: Installing photoshop and will report back if its correct.
EDIT2: Nope Still going think Im getting somewhere..
EDIT3: Tell me if this works, seems like Im replicating what GIMP is showing
1 - ( (1 - A) * (1 - )
Yup that should work
What I was supposed to get - (Stole the images off some tutorial as I had 0 knowledge of working in gimp and photoshop didnt want to install)
Pretty simple math, just took some time reading what it is actually doing
I use UDK's constant clamp in situations where I'd normally us PS's levels. It's not quite as tuneable, but it works great when all I want to do is nudge blacks up into dark greys, or whites down to light greys.
Also very handy for when you want to make sure your values are between a certain range, or to get rid of unwanted bloom.
wish you showed me that page haha Ben. Also yeah still working on my stereoscopic post process though went a different route which reminds me I should get to work on finishing that.
Replies
glynnsmith: Isn't Add, Overlay in PS?
The way the math nodes work is with basic math :P You add a pixel of 0.15 brightness to another with 0.35, you end up with a mid-grey pixel of 0.5.
Multiply, subtract and divide nodes work in similar ways, as expected.
Photoshop's multiply doesn't work like that because of it's inability to go above a brightness of 1.
Might help:
http://www.cgtextures.com/content.php?action=tutorial&name=blendmodes
Constant 1 - A * Constant 1 - B
Tried this in UDK and it did work though I dont have photoshop installed to ensure it works correctly.
EDIT: Installing photoshop and will report back if its correct.
EDIT2: Nope Still going think Im getting somewhere..
EDIT3: Tell me if this works, seems like Im replicating what GIMP is showing
1 - ( (1 - A) * (1 - )
Yup that should work
What I was supposed to get - (Stole the images off some tutorial as I had 0 knowledge of working in gimp and photoshop didnt want to install)
Pretty simple math, just took some time reading what it is actually doing
glynnsmith: Thanks! I'll read up on that
Trying to create a stereoscopic material =p
EDIT:
It worked! I got the screening effect. Thanks!
Add = Screen
Multiply = Multiply (doh)
OneMinus = Invert
Power = Contrast
Clamp = Limit Dark/Light Min/Max value
Also very handy for when you want to make sure your values are between a certain range, or to get rid of unwanted bloom.
http://www.laurenscorijn.com/articles/colormath-basics
It also links to some other pages with more photoshop math.
EDIT:
juanitudev1 you might be interested in the
How do I make my work stereoscopic? thread.
wish you showed me that page haha Ben. Also yeah still working on my stereoscopic post process though went a different route which reminds me I should get to work on finishing that.
Helpful stuff
I'll post my Stereoscopic Mat if I get it working :0