Worldspace Normal Texture? [SOLVED]

Dx Shaders, Vray Materials, LW materias,Textures and more..
Post Reply
User avatar
Draise
Captain
Posts: 3020
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia
Contact:

Worldspace Normal Texture? [SOLVED]

Post by Draise » 29 Apr 2014, 02:35

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.
Last edited by Draise on 29 Apr 2014, 16:30, edited 1 time in total.

clintonman
Captain
Posts: 2363
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Worldspace Normal Texture?

Post by clintonman » 29 Apr 2014, 14:11

You can use the normal output in the shader for rgb for xyz direction. I don't know about negative values.
Attachments
Sphere.zip
(13.37 KiB) Downloaded 58 times
Clinton Reese

http://clintons3d.com

User avatar
Draise
Captain
Posts: 3020
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia
Contact:

Re: Worldspace Normal Texture?

Post by Draise » 29 Apr 2014, 16:29

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)

Image

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.

Post Reply