V-ray got rounded 'hard' edge shader.

It’s our turn. The old OSL shader for rounded edge is so far way too slow to be used in a game asset production pipeline.

Does something appear on the roadmap of 2.79 and 2.8? If not, I’ll start looking for ways to implement it, but currently have only really stupid ideas involving generating temporary bevel objects, bake them down and then normal map blend them together with other normal maps. (A very sad implementation, but once automated, it’s probably faster and more workable than the OSL shader)

Any advice or suggestions on where I should look at is welcome.

Cycles once had a developer known as Agus3D (who started a patch that would implement rounded-edge shading).

Unfortunately for us, he found a job that not only ended his development work, but his involvement in the Blender community (he hasn’t been seen in years).

It’s sad to see progress abandoned. Is there detail about the project?

#Edit:
Another thought. If there is a way to relay Blender’s Mesh UV map boundary information and the corresponding vertices normal information, I can see the possibility of drawing the rounded edge normal colour directly onto an image. Then, it can be combined with the rest of the normal maps.

https://rightclickselect.com/p/materials/Fgbbbc/bevel-rounded-edge-shading-node - 52 votes. As high as it gets on that site.


Model by Tor Frick

It’s very important feature for gamedev and visualization work. No - you cannot just use Bevel modifier everywhere, unless conditions are created where it will not spike and create other manifold geometry when working with denser meshes: https://blenderartists.org/forum/showthread.php?435274-Mesh-Fushion-Bevel-Boolean-fuse-�Blender-solution

These are very highly sought after features that will without doubt add a lot of interest for this software as well as create simpler workflows and higher quality outputs.

The OSL shader actually work quite well. Taking a ‘shader’ approach is the best, because first, it doesn’t touch on the geometry, secondly, it’s problem free(because it doesn’t involve geometry). I’m shifting my focus on a shader-based approach. Does Blender Render has any access point where I can fiddle around the GLSL shaders and maybe bake off normals from it?

After some testing about the “bevel object” method, I’ve found a major problem. The default bevel operation of Blender does not follow surrounding topology nor is there an option to do so. Therefore, the baked normal map from the bevel object works perfectly where the topology was followed, but creates significantly visible seams around places where the topology wasn’t followed.




If the surrounding faces’ normal are not all pointing at one direction, the bevel object’s normal will also not blend in perfectly when combined with other normals. I consider this “Bevel Object” method a failure. Unless there is a way to custom bevel the edges following surrounding geometry and blend the bevel with any non-flat surrounding faces.

Nvidia’s MDL was implemented into Substance Designer and there was a ‘Rounded Corner Normal’ that achieves exactly the same effect of MODO’s rounded edge shader.

I have send a email to the mail list of bf-cycles two weeks ago, you can see the petition in the mail list with explanation to developers of the importance of the shader.

for me more excited feature is baking smooth edges from V-rayEdgesText to Normal Map. OMG :slight_smile:

Can’t you cheat it using the pointiness node?

(or does it still require a bunch of geometry?)

very cool ! in Vray it looks more like a bump/normal trick that can be plug everywhere rather than a shader… anyway that look awesome…

here it says that raytracing is needeed : http://lesterbanks.com/2014/03/blender-osl-bevel-shader/
Haven’t searched a lot, but can you post a link to the osl script ?

I’ve tried using the pointiness or cheating with some smooth edges ( like a smoothed wireframe) and plug that into a bump node, that kind of makes something but I’m not sure if it can be enough to provide good results…

I wonder if something is possible with regular nodes, but I’m lacking basic math knowledge to know what to do (or what I’m doing) … maybe if that was easy someone would have already done it…

I guess having a kind of texture that involves raytracing may not fit the design of cycles, but maybe that can be done differently…

Sorry, I start to think out loud :smiley:

Ha! What do you think a “Shader” is? It does something to the shading of the object. In this case, it’s just altering the normals at the edges. So yes, it’s basically just a procedural normal map. :evilgrin:

Yeah the effect is cool. :smiley:
As mentioned Modo has it for years now. Tor Frick (goes by the online name of snefer) uses it a lot
in his works. He has been a lead artist on the new Wolfenstein titles for example.

The only downside is that you never get the model out of the program like this but as long as the right tangent space is supported and the baking gets quality results that should be fine. Would be nice if Blender also hat this. And an overhaul of the UV algorithms.

Below is the link to the bevel osl shader. It is an old somehow link. There too was mentioned that Blender needs to have inherently such a shading method (the osl way is too slow in rendering times) but… it remains a request to this day.

It is a feature that does not need a so big effort to implement but as it seems there must be a more intense pressure from the side of the user community for developers’ doing something.

Just out of curiosity, is there a way to write a shader for cycles that is supported both in GPU and CPU?

I repeat, just out of curiosity, I don’t know a thing about writing shaders, not even in Unity or Unreal.

Cheers.

https://lists.blender.org/pipermail/bf-cycles/2017-August/003108.html

Ok ! the name Shader always confuses me a bit, thanks for the clarification !

@juang3d , If you’re talking about OSL, it’s not working on the gpu,

For games you could make a external tool that create only a normal with bevel, for example.

Making external tool is not something I’d consider trying.(I have no clue on how to do it), another reason that it’s better to be inside blender is that will be easier for anyone to tweak and control how the rounded-edge would look like, and where it should appear and where it shouldn’t.

After some searching I came over this:

in the #6 post JohnDoe0 shared a video that demonstrates how to create rounded-edge normal map inside substance Designer. it’s quite interesting.

While this is pretty useful in itself it is not the true power of the bevel shader in rendering.
What the rounded edges in rendering do is bevel beween not connected, intersecting geometry parts.

See screenshot from Modo here:

The two cubes are complete separate objects and only intersect yet the edge rounding can occur not only on the same object but over all objects sharing the same material. Which can in some cases render boolean and subdiv modeling irrelevant if you only need the mapdetails for a game object from it.

Has its darwbacks of course since you are bound to the renderer and/or program if the external baker does not support a similar setup. Otherwise it’s super fast and can create very nice game assets.

Again … Tor Frick does it. Very impressive.

(edit) Ultimately it still is a shader effect, though. The Edges in the silhouette won’t be rounded (see the outer corners of the cubes in the rendering below). It works best on concave geometry and intersections. Basically anything that needs to look like it is fused together. Normal maps created that way read really nice in games.

I’ve seen this repeated by many people now. Yes, I know how the concept works, I’m looking for a way to achieve the result. I know a shader would be the best way, but at the moment I have no clue where to start about the shader. Maybe Eevee or the 2.79 Cycles already have this feature. If not, someone has to make it, or every game artist is going to switch to MODO. After I tried MODO… I think it might be a good move if I want to be sure to always have the newest modelling tools that saves me time.

At least somebody understand this.