Jump to content

Micro Bevels


sibarrick

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
Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 1 year later...
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

Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

  • 7 months later...

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

Link to comment
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

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...