Page 1 of 1

Worldspace Normal Texture? [SOLVED]

Posted: 29 Apr 2014, 02:35
by Draise
Would it be possible to create a normal based projection system? (red postive, red negative, blue positive, blue negative, green positive, green negative along an X, Y and Z axis projected to all object with such a shader, creating a Normal Pass)??????

Or can this be done with lighting? I am looking to do this specifically in the WS with the directX system.

Re: Worldspace Normal Texture?

Posted: 29 Apr 2014, 14:11
by clintonman
You can use the normal output in the shader for rgb for xyz direction. I don't know about negative values.

Re: Worldspace Normal Texture?

Posted: 29 Apr 2014, 16:29
by Draise
THANK YOU CLINTON! I did not know that you could do that. That opens up doors!

I did the "negative" R, G, B with infinate lights, does the trick, will be handy for compositing rim lights and other effects later on in post production. My theory also is that with Normals, you can create some kind of false GI also in post.

The idea is you get one color, the color you want as the mask for any attribute in post within Blender Composite (say the B 255 value, and that would be the mask for a Z bloom or glow or something, a color bleed, or a rim light)


And.. this would all be rendered out in near realtime.

I still need to work on my pass/shader system... for animations (so the passes change in WS with a click of a button)... it is quite rigorious to set up with all the scripts and all...

Thanks for this Clinton :D .

Ah, the lights are set to the "opposite" by putting in the value 255,0,255 if the other side be 0,255,0. I also put the constant shader in the normal texture to 128,128,128, a mid grey so the lights fit on nicely. Don't forget to delete all other lights.