Bevel shader for EEVEE integration

Would it be difficult to implement the “bevel node” to work in EEVEE ? it would be absolutely amazing to have this function while modeling.

I think the bevel node in cycles uses some raytrace functionality so it might be not easy to port it to Eevee.
I also have never seen anything like that in any realtime engine, so this might be the reason for that.
Can’t you use a real bevel modifier while modeling? I mean why the need for an render-solution when you can get the real thing?

the bevel shader is useful for intersecting shapes which the regular bevel modifier cannot do (nor hard-ops for instance). Seeing it in realtime would be a major speedup since you would see the result in realtime.

Maybe this is a question I should rather ask on blenderdevelopers.org

1 Like

Would it be difficult to implement the “bevel node” to work in EEVEE ?

Yes

6 Likes

Yes you are right, this makes modeling very easy if you can just stuff things into each other and they look like they are connected. I totally forgot about that.
But as i guessed, its not easy and also probably not on somebodies priority list.
No way around than having to bake or render.

what about using a scene bvhtree and getting the points in a radius?

this can be very very fast and I think it exposes the data you need?

1 Like

do you know “why” ? and what about not a “final render” result but an “approximation” ? something to just get a visual on how the 2 objects would blend together.

Like @Romanji said, Cycles uses raytracing for this. But Eevee does not do real raytracing. Even if it would, it would only be deferred passes (as in, not during shading) and it would be already too late for getting the beveled normal.

Another approximation would be to do it in screen space (like blurring a normal pass) and I don’t know if that would give satisfactory results. And even then it would be incompatible with Eevee’s rendering pipeline because the shading is not deferred so the objects would have to be rendered two or three times.

I don’t say it’s impossible, I just say it is hard and complex. Also I never saw any example of this in realtime engines.

2 Likes

Unigine has Screen space Bevels.



2 Likes

Damn! That’s a very nice clean result. I guess there must be a way to do it using depth, normal and some kind of object id buffers to avoid beveling everything. I wonder how expensive it is to calculate.

Whilst it would be sweet to have that in an Eevee shader, I doubt it will happen for 2.80. What we have now is really awesome, but hopefully Eevee will get regular upgrades and performance improvements as cycles has, so perhaps one day in the 2.8 series we’ll be closer to the performance and quality of some game engines.

1 Like

that is very impressive. You can actually set it Per material. Imagine how much faster games can be created when mainstream engines like Unreal Engine uses this. Instead of baking/making high poly’s you can just straight texture low poly and import into the engine:

Screen Space Bevels

Introducing a new effect beveling edges of arbitrary geometry without the need to bake normal maps and any extra polygons. Ideally suitable for various high-poly engineering CAD models, where baking normal maps is difficult and beveling by adding more geometry is unacceptable due to a significant impact on performance. This feature can also be useful in various architectural visualization applications for buildings, furniture and other such geometry required to have smooth and neat beveling. The performance of this effect is is absolutely independent of geometry complexity. It can be adjusted per material and even modulated using a custom texture if necessary.

A sample illustrating this effect called SSBevel can be found in the Samples demo package, included in the SDK.

2 Likes

Yes it does look nice.

But they use a deferred shading system in which these kind of treatment on shading data is trivial.

Eevee is not deferred and it’s not going to be soon.

3 Likes

Reviving this old thread I was wondering if it was possible to somehow turn this Unity shader into an EEVEE shader: https://www.quizcanners.com/single-post/2018/02/08/Mobile---friendly-Bevel-Shader-Unity

1 Like

Looks nice.
Does this work with Eevee’s forward shading system?

Not exaactly a bevel shader, but can work if the angles aren’t very sharp

Is AO node work in EEVEE?

Yes it works, but you have to remember to enable ambient occlusion on the eevee settings.