Jump to content
Sign in to follow this  

Polygon Selection based on Fresnel?

Recommended Posts


Is there a way to create polygon selection based on fresnel (i.e. grazing angles based on camera view)? 

 I couldn't find a "shader" option in field list, so I'm not sure how to implement the effect. 

Is there a way around this?


Share this post

Link to post

What are you trying to do with that selection? As far as I know, a real polygon selection is not really possible without plugins.

Share this post

Link to post

I can't imagine a way to do that so far. There are 3 ways we have of making material properties influence models (vertex maps, fields and proximal) but I am not aware of any ways to make any of those interact with fresnel, which I don't believe is even calculated until render time...



Share this post

Link to post

Seeing the answers so far, I may be on the wrong track. Please bear with me, if I'm running into the wrong direction.
As I understood the question, the goal is a polygon selection based on Fresnel. Now, for me in this case Fresnel is basically the angle between two vectors (actually I think, it's rather the change of the angle of a ray of light, when entering a material with different optical properties (still way simplified)), the vector defining the direction of the polygon (normal vector) and a camera ray.

Now, this could be achieved with a bit of Python. But we shouldn't reinvent the wheel, but instead give some credits to Donovan Keith, who already used the Python tag to create the "CV-Parametric Selection Tag".

The CV-Parametric Selection Tag provides us with means to select polygons based on different conditions. One of them being the direction a polygon is facing. This is actually already one pat of the equation, we are interested in, the polygon normal. Now, in order to answer the question correctly we'd need to take the camera ray which hits the polygon into account. But to make it a bit simpler (and also because it's probably not possible with this approach), I will only use the direction from object origin to camera position instead of the actual camera ray.


Using these ingredients, I get the following:



I doubt, I'd be allowed to upload a scene, because Donovan's tag is actually Cineversity content.


Instead, here's how I set it up:



A very small and simple Xpresso tag to feed the view direction from the camera into the CV-Selection tag:


Data type for subtraction has to be Vector, the "Vector" input of the CV tag is the one from the "Facing" parameter group (see below).


And finally the CV-Parametric Selection Tag:



As said before, I utilize the "Facing" condition. With above setup it would select those polygons facing the camera with a certain tolerance- That'SA why the "Invert" checkbox is set. Playing with "Tolerance" you can change the amount of selected polygons. Depending on what you are after, you may also want to set "And Opposite" to also care for the backside.


As said before, this is not a mathematically correct solution, but I think depending on the view parameters and an objects geometry, it may already be sufficient. And hopefully serves you as a starter for better solutions.




Additional notes: Due to C4D's handling of Selection tags, Donovan's tag can be a bit finicky to use. Be a bit careful, save often and read the tag's docs carefully (are there any? I didn't check, but given the internal  implications thee should be...). Hopefully, what MAXON just demonstrated with Neutron will enable us in future to achieve tings like this way easier.


Edited by MighT
Additional infos

Share this post

Link to post

You know what you are @MighT? You are a clever b*stard 🙂 Excellent work, and I stand wholeheartedly corrected, and massively happy to be so !



Share this post

Link to post

No, I am not. I wish, I were.

Actually the entire idea of such a selection tag is from noseman. Back in those days, he made Donovan and me develop such a tag in parallel. When we discovered we were doing the same in parallel, I simply dumped mine. But since then, I have quite a good idea, of what can be done with this approach. 


Share this post

Link to post

I just realize, this might have been a bit ambiguous. Clever I am not. Bastard may be of course. I'll ask my mom for more details... 😉



Share this post

Link to post

There is a shader field and it works with the fresnel shader as well. Update is a bit limited though. You can set it to update each frame but when navigating on a fixed frame it won't update live. You can preview the effect by running the scene though. 

Share this post

Link to post
  • Topic Author
  • Author of the topic Posted

    Thanks for the response! 

    Both @MighTand @Havealot solutions seems to work as expected.  

    My bad on missing out that there is actually a shader field option in the list. 

    Have a great day ahead! 🙂

    Share this post

    Link to post

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    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.

    Sign in to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    • Create New...


    Dear members, we are aware of few more bugs that are still present withing the theme.We just wanted to let you know that we are working to fix them as soon as possible.


    Please be aware that we are manually approving all new registrations, due to spam prevention. Please be patient in case you cannot login right away, we will approve you within 12h or less if we decide you are not potential spammer. 


    Thanks for understanding! :cowboypistol: