(?) Using World Position Textures

But what effect are you hoping to achieve? None of us have any idea what that is.

1 Like

A variation of the texel space shading sample that I showed above.

Here’s another sample. This was captured in Godot:
image

This was created by combining object space normal map with an object space position texture. Lighting here is calculated per texel, so each texel is a solid color, save for the texels that are partly in shadow.

I’m looking to achieve something similar, but rather than per texel lighting, I’m looking to use arbitrary shapes like voronoi cells or brush strokes.

Just try it… bake what you need and use the same logic you’re using in Godot (which we still don’t know what it is). If it works, it works! :slight_smile:

1 Like

That’s what I’ve been trying to ask, what’s the logic to accomplish this?

In godot, there’s a parameter called “light_vertex” which allows me to input an object space texture to use for shading, I’ve been trying to ask if there’s something similar in blender that anybody knows of.

Do you mean the LIGHT_VEC?
If so, you need to calculate that your self.
The current Renderers in Blender don’t give you the Light vector. But if you know where the light is (its position), then you can subtract the position of the point being sampled and the light position to get the ‘light vector’ (probably after normalizing the result).

1 Like

Forgive me, I probably missed it, but I don’t see anything special or notable in your Godot screenshots you couldn’t do with any rendering engine that can handle normal maps. You want “low-poly” lighting? Just make a normal map, that’s what they’re for

1 Like

No, I don’t want low poly lighting. Maybe it’s not that easy to see in my screenshots, maybe it’ll be easier to see here:

The shading here is done per texel. I’m looking to do something similar using a method that I prototyped in godot, so I know it works, I just need to know if it’s doable in blender.

1 Like

Short answer, yes that’s doable.
But the best way to do it will be limited by the way to use it.
For example, same effect, just by baking the shadows into a very low resolution texture…

1 Like

Sure, but that will only work for static lights and objects, and ultimately doesn’t achieve the outcome I hope to. Remember, I said that I want to snap the lighting to arbitrary shapes, not just to a texel. Shapes like voronoi cells or brush strokes.

well, that means that you have to make all shading and lighting calculations in the shader itself, and just output a computed color to the render.
And yes, it’s also doable… I’ve seen people using OSL to do custom renderers… Will that be efficient? probably not as much as if you write your own renderer… And you can use GLSL in Blender to render with the GPU (see here)…
All you need now, is to grab a good book about OpenGL and GLSL and take a big breath before diving in. :wink:

Hmm, thanks. I’ll take a look at that. Thankfully, I already know how to write shaders. I’ve been writing them for years but I’ve not tried to use them in blender before.

This reminds be of this thread; you may have seen it already (the op wrotes material but also means shadowy ( ← is this a word ? ) pixels )… [ directly linking to the solution ]:

After reading this with fresh eyes, I believe @Indecom4000 is looking for that painterly effect trick with normals, but the lazy version using a voronoi instead of manually painting the normals…
Something like this perhaps:

3 Likes

What did you do to get the shadows to be distorted like that? Is it a baked texture?

For the shadows: Bake Combined, and use a voronoi between the UV coordinates and the Bake.
For the glossy: Bake Normal instead, and the same construct as for the shadows.

1 Like