Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Point selection under specific parameters

    Plugin Requests
    0
    2
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 17/08/2016 at 12:43, xxxxxxxx wrote:

      Hello,

      I'm trying to figure out a way to make a point selection in an object based on a parameter and I thought it could be achieved with python. For example: I have a scene with and object and a light and I want to select only the points in my object that are being hit by the light. Is this possible?

      Thank you all.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 18/08/2016 at 03:15, xxxxxxxx wrote:

        Hi,

        welcome to the Plugin Café forums 🙂

        We are not sure, if you are looking for somebody to develop such a plugin for you (as the chosen sub-forum suggests) or if you are seeking advice on how to achieve something like this yourself?

        In the later case, I'd move your thread into the Python sub-forum, just let me know.

        If anybody wants to dive into this, here are a few infos to start with:
        Selecting points of a PolygonObject is just a matter of editing the selection BaseSelect, retrieved by GetPointS() from a PointObject (where the PolygonObject is derived from).

        The harder part is of course finding the points to select.

        The simplest (but in the end not entirely correct for all shapes of objects) solution would be to just check the normals (either poly or vertex) are facing the light. NormalTag or CalcFaceNormal() (which is unfortunately missing in Python currently) would be start points here. There's also a manual about the NormalTag in our C++ documentation.

        In order to get a more correct solution (like hard shadows, including selfshadowing and occlusion by other objects) it can get way more complex. I'd start looking into the GeRayCollider for this.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post