One of the coders back at 38 helped us come up with this exact same series of nodes. He called it 'sphere mapping' though. Dunno if that's some official technie-graphics-programmer term or not. Pretty cool stuff though!
Hey folks, so I've been wanting to do this for a while but I finally got lit spheres working in the UDK. Below are 3 screens (including the shader). I also figured out a hacked way to get the lit spheres working in world space instead of camera space (the material has a switch built in). It involves stretching the image so…
The custom node at the top was just multiplying the UV's by 1,-1 (idk why I used a custom node heh) The custom node using Keen's work was used to rotate the normal vector used by 180 so that the gradient created by projecting the image across the normals faces the right direction :)
Ok that makes more sense! I wasn't quite sure what your approach was with the custom nodes in there, but it looks like the CommanderKeen stuff is for the world space. Very cool and useful.
@Gestalt: Thats pretty cool man! Your method is actually identical to mine :) The +1/2 is what the ConstantBiasScale node does. @Joopson: The litsphere would go in both the texture slots at the far left of the chain (the Tex2Dparameters). @Ged: The camera space one always applies the lighting based off of your camera, so…
Really cool! I actually wanted to do something like this but I never got around to it. I don't like custom nodes and inverse trig functions so I came up with an alternative method that seems to work. If anyone's interested here's the setup: I should probably go through it and double check the semantics of things, but it…
Just out of curiosity what are you going for with the world space version? The texture doesn't give you a sphere, just a hemisphere. I set up a version that reuses the same hemisphere on the back as the front and just maps the color to the directions, so not environment reflections but still cool. You can do that pretty…