Sunday, December 3, 2023
HomeVisual EffectsFresnel Repair for Cylinder Shapes

Fresnel Repair for Cylinder Shapes


Hey, I don’t put up right here typically however I assumed I’d share my resolution to Fresnel results on cylinders to ensure they don’t go utterly invisible when viewing from the identical path it factors to.

Helpful for power beam kind results.
Accomplished in Unity however can be utilized in Unreal. It includes rotating the vertex normals by the cross product of the ahead vector and think about path.

Take pleasure in!




4 Likes

As you urged within the video, it may be completed a bit less complicated.
Merely subtract the axis aligned part from the view path and normalize to get a strictly orthogonal view path.
Then dot the traditional on that to get the ratio between the present regular and that orthogonal vector pointing to the digital camera.
This fashion you simply want 1 dot product and 1 sq. root.


For the axis, one factor I love to do is to make use of the tangent / binormal and ensure these are aligned to the path of the cylinder. Like this you may also considerably assist tubes by ensuring the tangents are aligned with the path of the tube. (however it breaks if the tube curves an excessive amount of)




12 Likes

Superior! I like your resolution so much higher. I used to be in some way near it earlier than by multiplying the view path by abs(1- axis), however that resolution solely labored at sq. angles like (0,0,0), (90,0,0), or (0,0,180).

I’m glad the information is lastly on the market too. For some cause I’ve been googling this many instances over time and by no means noticed an answer. Possibly I simply wasn’t utilizing the best phrases, however I believe this ought to be simpler to seek out with the phrases “Fresnel” and “Cylinder”.



2 Likes

That is fairly cool! Thanks for sharing!

Would this nonetheless give okay outcomes on cylinders with one finish scaled means down or means up (cone-ish form)?

Sure, cones must also work.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments