I’m trying to make shader-embedded sprites like the gel bubbles in Portal 2, but I’m running into an issue when making the UV texture.
To illustrate, I made a perfectly linear gradient in Photoshop (0-255) and brought it into UDK to use as texture coordinates.
Here is the test diffuse texture using UDK’s procedural texture coordinates.
Here is the test diffuse texture using the gradient I made in Photoshop as texture coordinates.
Here is the test diffuse texture using the gradient I made raised to the power 0.48. This is the closest I could get it to match UDK’s procedural texture coordinates.
That would be a linear vs gamma issue (pow 0.48 is close, but not quite there; the actual number would be 0.4545454, or 1/2.2). For textures that are meant to represent “numerical” data (as opposed to colors), be sure to set their sRGB flags to false.
Also double Check the “smoothness” slider in photoshops gamma editor. It’s kind of a hidden option but can have a big effect on how linear your gradients are.
This sounds really cool but… I have no idea what you guys are talking about! :D:
I’d love to learn. What is this about the Portal 2 bubbles? And embedded sprites in the shader?
I know UDK and the material editor pretty well and understand linear work flow at a high level, but most of what you’re trying to accomplish went over my head a bit, but am eager to know what the heck it is you’re doing!
Basically what I was doing was using a texture I painted in Photoshop in place of a Texture Coordinates node.
I’ve figured out that what the Portal 2 paper calls “View Forward Vector” is similar to UDK’s Camera Vector node, but I think it needs to be multiplied by -1. I think “Camera Side Vector” might be done by rotating the Camera Vector a quarter turn around the Y axis and transforming it from Tangent to View.