Friday, December 1, 2023
HomeVisual EffectsFresnel Repair for Cylinder Shapes

Fresnel Repair for Cylinder Shapes


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

Helpful for vitality beam sort results.
Finished in Unity however can be utilized in Unreal. It includes rotating the vertex normals by the cross product of the ahead vector and look at course.

Get pleasure from!




4 Likes

As you steered within the video, it may be finished a bit easier.
Merely subtract the axis aligned part from the view course and normalize to get a strictly orthogonal view course.
Then dot the traditional on that to get the ratio between the present regular and that orthogonal vector pointing to the digital camera.
This manner 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 course of the cylinder. Like this you may also considerably help tubes by ensuring the tangents are aligned with the course of the tube. (nevertheless it breaks if the tube curves an excessive amount of)




12 Likes

Superior! I like your resolution quite a bit higher. I used to be in some way near it earlier than by multiplying the view course 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 data is lastly on the market too. For some cause I’ve been googling this many instances through the years and by no means noticed an answer. Possibly I simply wasn’t utilizing the proper phrases, however I feel 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 manner down or manner up (cone-ish form)?

Sure, cones also needs to work.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments