EEVEE NPR Prototype - Feedback

thanks! and sure thing :+1: the files are a bit of a mess right now so i’ll clean them up soon and post the blends and maybe a little explanation if time permits :smile:
they are pretty hacky though so keep that in mind lol

4 Likes

Wait, i have simple question for you. Does it work with grease pencil too? I just want to cerious it.

I’m not sure what do you mean by synthesizer in this context.
But I agree that alpha handling must be improved.
It’s technically there, but material nodes give basically no control over it.
I think at the very least we should have a separate/join RGBA and a Mix Node option to take alpha into account for blending.

It works in the sense that you can have GP objects in the scene, just like with regular EEVEE or Cycles.
You can’t apply NPR materials on top of GP material since they’re not rendered by EEVEE.
Once EEVEE can render GP objects directly, then it should work just like any other object.

4 Likes

As in, an absolute coordinate in screen space instead of a relative one?
I think for that to be useful we should expose to nodes the render resolution and the current pixel coordinate (which we probably should, regardless).

3 Likes

Looking all very very promising.

1 Like

Okay, thank you for understanding but uhh why does it full of black plane?

Edit: Nvm, i fixed it. But yep, sadly it’s unsupported grease pencil :<

Alright folks I’ve fixed up my pixelized effect and made a handy little nodegroup, file is here!


I cleaned it up a lot based on my original nodes, its a lot less glitchy and has clean edges between pixels. if you check out the old version you’ll see quite a few nasty artifacts :sweat_smile:

The blend file explains everything pretty well but i’ll share some of the nodes here as well :+1:


(It should be noted that I’m using a square image plane in front of the camera)

all this does is take the image plane attached to the camera’s UV and uses modulo to duplicate repeat it a specified number of times. we then feed this back into the image sample node and it creates a simple pixel effect.


however this is effectively zooming into a single location for every part of the ā€œmodulo gridā€, because of this it creates some pretty noisy artifacts.

So i beefed up the node group, added the ability to subsample to smooth out the colors of the result. This also happens to allows you to also blur the final image and mask if you would like :sunglasses:

Adding blur to the mask is really nice because it lets you add the pixel effect outside the mask a bit, which should fix issues like this where you can see the object behind the pixelization

The node group itself isn’t too complicated but it definitely adds some quality of life improvements.

I’ll be working on cleaning up that trail effect now, its a little messy lol. That one would also require a little more explanation on how it works

Bonus:
Tried the pixel effect on only the shadow pass for the background, pretty neat- I bet it would pair well with a cool stylized effect in the foreground.

Tried scaling the pixel effect based on distance from the camera, it creates a weird DOF effect.

I ran into a weird issue with nested repeat zones, I have no doubt it’s been mentioned before but it only effected certain kinds of values, might be a limitation too idk

20 Likes

We now have a built-in Cavity node group asset thanks to @Vitalijs_Komasilovs !

It’s available on the latest build.

14 Likes

If this is something different from the issue you already reported, then open a new report please.
Nested zones are supposed to work.

1 Like

I’ll see if I can recreate it and write a bug report if so :+1:

1 Like

Something has changed rather dramatically in regards to NPR refraction, or AOVs, or… something.

I can’t do too much with that info. :melting_face:

There’s a bug with image to value conversion that should be fixed in the next build.

If the problem persists, please make a report with a repro file.

2 Likes

It really was a useless stream-of-thought un-actionable post… sorry about that. But the good news is, the new build from the morning completely fixed it. :clinking_glasses:

2 Likes

Alright folks I’ve been messing around with the trail effect and got some demo files to share!
Just like my previous posts these are pretty hacky demos, but I hope they can inspire some other effects and projects. More than anything I just wanted to see if I could find a synergy between Geo Nodes and NPR nodes.

Firstly, the oldest of the trail effect demos, this effect:
here’s the file


This file isn’t as clean as the other, and I’ve improved upon some things in the newer demos. I recommend looking through that file first as I explained things a little nicer in the nodes.

The main effect I wanted to achieve with this experiment was the ability to store and objects location and velocity over time. The cleanest way I could think to do that was to store it on the camera’s NPR plane.

(object’s location being stored every frame:)


(NPR plane parented to the camera:)
image

Every frame the NPR plane has a geometry nodes simulation that captures the location of the sphere and saves it to a different face on the (subdivided) plane.

Once we have the position every frame, we can then use this effect:

which makes the selected object appear completely static on the screen. Once our object’s position is negated we can convert our stored position into screen space and add it back onto the static image. This results in… pretty much the default render lol. However, now that we have older locations from previous frames this lets us select where in time we want the ball to be! Add a little repeat zone and some logic through extra nodes and voila! We have our trail :+1: :sunglasses:

However there are some issues you can see with the version above along with some serious limitations. You aren’t able to apply motion blur to more than one object! There is also a hard limit on how long the animation is which is a bummer.

So I rewrote the nodes one last time and added the ability to add up to 11 objects on the screen to apply motion blur to as well as reusing faces on the NPR plane so you can make animations as long as you want. 11 objects can hold up to 20 frames each of data, but this can be altered by subdividing the NPR plane and editing the nodes throughout the file to match the new face count
(I couldn’t be bothered to try and redo the nodegroup again i applogize lol)

Here is the file

(it appears there’s a few glitches that show up when rendering. not sure what is causing that yet, it doesn’t appear to show up in the viewport.)

I have two different methods for storing the mask per object, one is horrifying and I’ll let you discover that for yourself in the blend file lol, but it does fix this issue:


which is caused by overlapping objects removing a chunk of the trail.

I haven’t been super detailed in my explanation of how everything works in this post so I recommend downloading the demos and playing with the nodes yourself! I laid everything out as cleanly as I could.

Closing notes:
Overall this project was just a fun experiment testing the limits of NPR and what I can do with it combined with geometry nodes. I think final setup is a little too clunky to be used in a production setting but I hope the concepts explored in it can be useful to some other people’s projects. I’m looking forward to the future of the NPR branch and my hope is in the future recreating this effect will be super simple. I think a feature I would like to see added is the ability to access cryptomattes in the NPR tree, that would simplify a bit of node tree overall.

Shout out to the devs for fixing bugs!

Enjoy!

P.S. Please let me know if you want me to explain anything a little further here, the demos are a little clunky so I’d be happy to help clarify any questions

31 Likes

I knew it there was a geonode hack involved!! Nice work and thank you for the files!

We would really benefit from a way to store values from previous frames via pixel shader. Pixel sims let’s go!!

2 Likes

Hey there :wave:

Been a while since I posted here, but I discovered the npr branch a couple of days ago and really wanted to give you some feedback after using it for a couple of evenings. I am a former realtime rendering engineer who has been experimenting with post-processing effects and manually mixing/painting over various render outputs in PS in his spare time, trying to come up with a good stylized rendering pipeline as a hobby.

First of, I really love what you are doing here. This already feels a LOT more polished than some of the ā€œShader to RGBā€ stuff I have played around with in the past. Just the fact alone that I can access individual lights is just :chefs_kiss:.

However, there are some rough edges for my particular use case, some of which might be helpful for more than just me:

Default/World NPR setup

Since I am full-time software engineer, mostly using Blender on the weekends/spare time, I don’t really have the time to handcraft every asset for my renders. I mostly focus on my hero assets and use a couple of PBR asset packs for anything in the background.
A bilateral blur or kuwahara filter in the compositor usually do a good enough job at getting rid of the finer details, and combined with a bit of halftone shading and some paint over in PS usually result in decent results.

The problem is that I don’t really see a good way to emulate this workflow with the NPR branch. For every asset I append to the scene I would have to create a library overwrite, modify the material and add my npr nodegraph. Sure, it’s doable, but for large scenes with dozens or even hundreds of background assets this will become quite the chore.

An option to set a default/world NPR shader that is automatically applied to every material (even linked ones without library overwrites) that doesn’t already have its own NPR shader would vastly simplify that all and be very much appreciated.

Option to export custom passes

Right now, you can only output a single color in the NPR output. However, my current Compositor centered workflow uses plenty of ā€œFile Outputā€ nodes, which allow me to manually fine tune things in PS (I usually export ~20 images for a single render, just in case I need them later). While per-object npr nodes will hopefully require me to adjust the final render by hand less often, I doubt it will never happen again, so I would really love if I had a similar option with NPR nodes.

Option to create NPR Tree from the NPR workspace

This is something that threw me for quite a loop the first time I tried to use the NPR branch. In order to use the NPR nodes, you first need to switch to the material tab and add a ā€œNPR Treeā€ in the Material Output node. While I like how this allows you to repurpose the same npr nodegraph with a single click, it is somewhat unintuitive for new users who switch to the NPR workspace without setting things up in the Material workspace first.

All the add right-click options are just greyed out, with no explanation whatsoever. IMO there should be a centered text in the work area telling the user that the current material doesn’t have a NPR nodetree yet, ideally with a dropdown menu to either create a new node tree or select an existing one.

Built in alternative to the fullscreen plane

Reading through some of the other stuff people have already done I have come across a couple of people using planes in front of the camera for some really quite neat effects. Basically they are doing the equivalent of what in real time graphics we call a ā€œfullscreen quadā€ (or ā€œfullscreen triangleā€).

While this is a neat solution, I would love to see a better UI for this. Having to create planes for every camera in my scene (and then make sure each plane is only visible for it’s camera) sounds inconvenient. Ideally, I would love if I could just add a list of NPR materials to the camera.

Mind you, out of all my feedback this is the least important and probably out of scope for the release version of NPR nodes, but I still wanted to point it out for any future follow-up work.

9 Likes

Of course! Its fun doing these experiments and I figured someone might find them useful.

Exactly! I’d be really excited to see something like this added

Love the ideas here, I could see them all being incredibly useful.

This idea is really sick, I’ve ran into issues on non NPR projects where I wanted to apply an effect to multiple materials at once and had to write a python script to append nodegroups to every selected object’s material. A method for adding an NPR or even shader nodegroups at the end of a shader graph would be awesome!

This would be a really awesome addition, I could imagine organizing effects on a camera and being able to move NPR layers around - It would simplify a lot of NPR scenes and node graphs being able to separate things out into layers attached to the camera

1 Like

The NPR project currently applies ontop of the EEVEE Next render engine.

shame.
Thanks anyway.