Jump to content
sibarrick

Micro Bevels

Recommended Posts

Hi all,

I've been experimenting in vops again and thought I would share the results so far.

This might be interesting for those of you keen on lego :)

The idea here is to be able to add tiny micro bevels to edges to get away from that razor sharp cg edge look.

Here's some piccies of the results so far

test_bevel.jpg

Bevelled

test_nobevel.jpg

Not bevelled

and here's the vop network, Mario if you take a look at this you may need a stiff coffee, its a terrible vop network that needs optimising heavily, its just a test :) at present

Hip file

Uploads don't seem to be enabled yet on here, or I can't find how you do it, so the above are links to my ftp site...

Edited by sibarrick

Share this post


Link to post
Share on other sites

This would be really great shader. I've found it common problem to deal with bevel edges in render/shading process!

Very intresting! Thanks Simon!

cheer!

sy.

Share this post


Link to post
Share on other sites

Yes! I was banging my head on the wall last night trying to create a procedurally animated (carved nurbs tube with caps etc.) geometry with nice edges...

I think that might work... but even it does not work for that specific example... it is a great tool... Thanks.

Share this post


Link to post
Share on other sites

hi Simon!

was a while since this topic has been updated.

This is a very useful shader, is it possible to update it for 9.5, since it renders strangely, and the network is a bit complex for me.

thanks!

Share this post


Link to post
Share on other sites
hi Simon!

was a while since this topic has been updated.

This is a very useful shader, is it possible to update it for 9.5, since it renders strangely, and the network is a bit complex for me.

thanks!

Looks like this is broken because the ray-hit vop node is screwed. It returns garbage if you try to get P or N, ray dist still works though. You could try to replace this with a gather vop, I much prefer the simplicity of ray hit though.

S

Share this post


Link to post
Share on other sites
Looks like this is broken because the ray-hit vop node is screwed. It returns garbage if you try to get P or N, ray dist still works though. You could try to replace this with a gather vop, I much prefer the simplicity of ray hit though.

S

Yup the ray hit vop seems busted. I'll have to send off a bug report and see what Sesi say.

Share this post


Link to post
Share on other sites
Yup the ray hit vop seems busted. I'll have to send off a bug report and see what Sesi say.

Thanks Sibarrick, hope sesi fixes it quick.

BTW, from the looks of it you could do a nice and and fast curvature detection shader with it. I would try it myself but I'm struggling to wrap my head around all those subneted for's/if's/and's/or's. :blink:

cheer's

S

Edited by Serg

Share this post


Link to post
Share on other sites

SESi fixed the rayhit bug, and the old scene now works :)

Yeah the shader is very complex, at least to me.

Share this post


Link to post
Share on other sites

It would probably be a very short piece of VEX code.... :)

From memory...

All I'm doing is offsetting the shading point P back along the normal so that it is inside the object then doing a rayhit test in X and Z of the object space (as I remember, checking in Y too didn't seem to make much difference to the final effect, I might be aligning these axes to the poly normal but I'd have to have a look at the network which I can't at the moment) and checking for self hit surfaces, if any of the hit normals are different to the original P normal I assume I'm running into another polygon at an angle to the original one containing P (its important to only cast rays as long as the bevel size + the bias amount which offsets the original point inside) then I either set the shader normal to half way between the original and the hit one for flat bevels or lerp between them based on the hit distance for curved ones.

It was a bit of an exercise in pushing Vop networks, but it would be a good exercise to re write in Vex code if you are learning it.

Share this post


Link to post
Share on other sites

Hi,

I tried to install your network under H10. after putting down, the microbevel VOP gives the following errors:

Full Name:     /obj/shopnet1/material1/vopsurface1/microbevel1
Operator type: microbevel
Defined by:    /Users/mate/Desktop/microbevel/microbevelv2.otl?Vop/microbevel
______________________________________________________________________________________
Synchronized with definition
______________________________________________________________________________________
Time Dependent: No
______________________________________________________________________________________
Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/twoway1]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/abs1]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/normalize1]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/twoway18]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/abs1]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/mix9]

Warning:     Problem while synchronizing child node:
             Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/edgetest1/twoway2]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/edgetest1/mix2]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/edgetest1/shift2]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/edgetest1/twoway11]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/edgetest1/normalize3]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/edgetest1/dot2]

Warning:     Skipping unrecognized parameter "std_switcher_0".
        [/obj/shopnet1/material1/vopsurface1/microbevel1/if1/axis/for1/edgetest1/twoway1]

If you point me into the right direction, I would be happy to help fix this.

Thanks again!

bmt

Share this post


Link to post
Share on other sites

Those are just warnings. Does the file not work despite them?

Share this post


Link to post
Share on other sites

think i'm just panicked.. ;)

the file opened with the warnings, and didn't render because the output picture was set to an nonexistent folder. switching back to 'ip' did the thing.

thanks Edward and sorry for polluting!

bmt

Share this post


Link to post
Share on other sites

How can I use it?

As a normal Input?

Edited by Mzigaib

Share this post


Link to post
Share on other sites

This seems to be broken again in H11, haven't got to the bottom of why yet but I'll start by looking at the ray hot vop again.

Edited by sibarrick

Share this post


Link to post
Share on other sites

I am getting the same errors on 12.5, it's working but it's is annoying is there a way to fix it?

Share this post


Link to post
Share on other sites

Thanks for the link but since I am not that tech savy I think it's easier to just try to remove the warnings.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×