Just curious, is there any way to use a baked world position texture to affect the shading of a material, vs using the vertices position to calculate shading?
I’d like to create an effect using world normal and world position textures to achieve a stylized npr effect, but I don’t know if it’s even possible in the current builds of blender.
Basically, I just want to know if I’m able to use a texture like this in a shader in leu of using the vertices positions to calculate lighting with an effect I have in mind.
The question I’m asking is if there’s a way to utilize a baked position texture map in blender, to affect how lighting is calculated. IE, can I bake vertex positions to a texture, load it into photoshop, apply some filters or distortions to it, throw it back into blender, and use that to affect the calculated lighting of my material.
Yes. You can do all those things. Of course, the lighting calculations will require a bit more math, than just to bake position and normal vectors (and most of the time you don’t even need to bake them since they are part of each vertex).
I want to bake them, so I can alter them on a per pixel basis in something like photoshop. I’m assuming this likely means writing my own lighting calculations, which i’m sure are even possible.
I think you’re still missing the actual question I’m asking. I’m not trying to convert from object space to tangent space, or from object space to world space or vice versa.
I only want to know if I can bake the object’s position attributes to a texture, manipulate it by hand in a third party app like photoshop or substance, then utilize that altered version in blender to calculate some funky npr shading effects.
Just use the Geometry node, plug the Position (or the Normal) into the Surface socket in the Material Output, Bake emission, and save as EXR (Float(full)).
This works by baking the position attribute to a low resolution texture then using that as input for a material in godot, assigning to an attribute called light_vertex, which is a duplicate of the vertex position, but only used for lighting calculations without affecting the position of any verts.
Yes, you can use a texture to store vector information and then use it as the coordinate system for anything else. You only need to have a very good image format (as EXR) to be able to store vectors.
I have the exrs already, as demonstrated by my godot proof of concept. How can I, in a material, use a position exr texture to affect the lighting? Do you have an example of this in use?
So without rewriting a complicated node group in blender, it is not possible to use a 32bit position texture to alter the built in lighting calculations used to shade a model?
It’s difficult to answer that… You cannot alter the lighting calculations… but you can alter parameters of your shader to produce results that may be considered unrealistic. For example by changing the normal of some closure, or affecting the position using displacements.