Sobel Edge with Source Kernel Color Info?

If anyone is interested, Im now running a TigSource devlog with concurrent project updates. Check it out!

I’ve pretty much mastered Kernel work with Sobel Edge and can out of nowhere process the concept properly no matter what i’m working on. That’s good and all, but i’m now moving toward more advanced concepts.

I have a sobel edge solution, which defines the color (black or white) depended on if that line is in light or shadows. Sadly, that samples the color of whats behind the that sobel edge, which when that surface is in the shadow when the originating texel is in light, it’ll give the wrong color. Here is an example of the sobel edge sampling.

So you can see, the current way for how my lines are colored are…inaccurate, but I can’t figure out a way to sample the source kernel’s color for each pixel outline, or at least giving a more accurate read.

Below is a better example of how I’d like future outline work done, but it at least has a better read on what I want to do in term of getting the correct lighting information from the source’s texels when applying to the edges.


Is this possible? Or will I need to rethink everything to get everything to look properly?

For a better idea of my visual goals and inspiration, check out Obra Dinn. It properly displays each edge pixel based on lighting…and haven’t seen any information surrounding the development that could lead me at least in the simplest of directions besides “SOBEL EDGE”.

Interesting problem - you must have been thinking / developing this for a long time, so giving any useful advice is tricky.

The wireframe rendering on ‘Obra Dinn’ seems the least advanced part of the rendering workflow, though you’re right that there isn’t a lot of detail on this part. To me it looks like the edges are generated white, and then inverted based on a secondary high-contrast lighting buffer. If that what you are doing in your own system?

Basically what I did was get lighting information with the scene depth plugged into a diffusecolor scene texture and divide that with the post process to get a clean grayscale lighting map. Then I used an IF statement that has a scalar parameter to define what shade of gray will the edges switch between black & white. Simple, and might actually still work.

I think whats going on here is perfectly fine, but the stenciling needs to be rethought. I think a lot of the issues spawn from the fact i’m using a broad range of grays to get that 1bit photograph look of classic mac adventure games (opposed to the solid dithering colors like in Obra Dinn). Since my game is a horror, I loved that 1bit photograph look that captures those newspaper photographs of crime scenes and what not. Which diverges greatly from what Lucas Pope needed in his game. So such to think about, but I think i’m heading in the right direction.

If anyone is interested, Im now running a TigSource devlog with concurrent project updates. Check it out!