Ray Operator



  • On 30/09/2015 at 01:08, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R17 
    Platform:      Mac OSX  ; 
    Language(s) :      XPRESSO  ;

    ---------
    Hi,

    I'd like to know whether it is possible or not to use the ray collision node to calculate touch collisions.
    For example, a ray that goes through a single edge (not polygon) of the object?
    Or even a ray that stops at the exact position of that edge?

    I've had some different results with my tests, so I'd like to know for sure.

    Thanks in advance for your help and time!



  • On 01/10/2015 at 09:45, xxxxxxxx wrote:

    Hi Casimir,

    I guess you are talking about the GeRayCollider?
    Can you please provide me with some code, showing me what you did and how to reproduce the problem?



  • On 01/10/2015 at 10:22, xxxxxxxx wrote:

    Hi Andreas,

    I'm actually just talking about the ray operator (XPresso node) without coding at all.
    I think the forum also covers that, right? If not, you can ignore this, and I will be sorry!

    To go more into detail: I did some testing with the ray operator, with cut collisions as well as touch collisions. With both of them I had files where they worked perfectly, as well as files where they didn't work at all. Due to this, I have no clue at all how to reproduce the files with the problems.

    Because of this, I'd like to know what the ray operator is supposed to handle without a problem, and what I really should not do with the ray operator.

    If you need more information, just ask me.

    Thanks for your help and time!!



  • On 01/10/2015 at 10:29, xxxxxxxx wrote:

    Hi Casimir,

    actually we do not cover Xpresso in these forums. Sorry, it's beyond the scope of this forum.
    Sometimes there may be easy Xpresso solutions for programming questions asked. In these cases, we don't mind posting an Xpresso solution in here (and I did so several times myself).
    But problems with Xpresso setups and Xpresso nodes shouldn't be discussed in here, as it has nothing to do with the SDKs (C++, Python, Melange and COFFEE).
    I think, it may be a question for our support or to be asked on cgsociety or similar forums.



  • On 01/10/2015 at 10:32, xxxxxxxx wrote:

    Hi Andreas,

    Okay, that sounds fair.

    Sorry that I have bothered you with this!

    Thanks for your help and time!



  • On 02/10/2015 at 04:52, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Hi Casimir,

    actually we do not cover Xpresso in these forums. Sorry, it's beyond the scope of this forum.

    Probably the forum description should then be changed from "COFFEE, C++ and Xpresso Q&A" to "COFFEE and C++ Q&A" 😉



  • On 06/10/2015 at 10:30, xxxxxxxx wrote:

    Hello everybody,

    the description of the SDK Help subforum is actually a relict from the times before the new SDK Support Team took up its work. To be honest, we never realized the Xpresso part in that description until we were made aware in this thread. But we took this as a chance to discuss the scope of the team and the Plugin Café forums.

    This is what we came up with (I'll also make an announcement about this) :

    • We will continue to take care of Xpresso related programming questions (like for example how to program a node or on problems with the Python node).
    • We will also continue to propose Xpresso solutions for programming questions, where we deem these good solutions.
    • Any Xpresso topic may be discussed in this forum by the community.
    • We'll discuss such Xpresso questions within our team and will decide, if we take these over or not. This decission will be made up based on our resources, severity and complexity of the question. For example a question on how to use an iterator node has less chances, than a question about a node not doing what to be expected (like in this case). Questions about how to achieve a certain effect using Xpresso, will have very small chances. The decision will be made public by either a marker in the thread's title or by a post in the thread, we are not completely sure, yet.

    We really hope, you don't mind our decision. We are simply afraid, that we won't have the resources to answer all Xpresso questions and we think, most members in these forums will appreciate, that we still have some time left to work on new SDK documentation, better SDK QA and nice new SDK examples. Furthermore, we (SDK Support Team) also lack the user expertise to do efficient support on Xpresso and C4D itself - makes us somewhat ill suited for the task. But we promise to learn and give our best.

    @Casimir: Now, for the actual question in this thread: If you can provide us with a scene showing the problem we'll look into it. Maybe we will still need to forward you to MAXON's user support, but at least we'll check.

    @Samir: Thanks for making us aware. We hope, the outcome doesn't disappoint too much.

    Cheers,
    your SDK Support Team



  • On 06/10/2015 at 10:42, xxxxxxxx wrote:

    Hi Andreas,

    Thanks for the information!

    I find this a very good decision, since the MAXON support is already there to answer those questions. Also, this forum should be focused most on the SDK in my opinion (like it is :D), so that sounds fair.

    I really love the part where we are still allowed to discuss our XPresso questions/issues.
    It's really nice we don't have to go to another forum for this.



  • On 06/10/2015 at 13:32, xxxxxxxx wrote:

    Rather the contrary: this is most excellent. Thanks for taking the time to make this a topic at all. 👍



  • On 07/10/2015 at 04:16, xxxxxxxx wrote:

    Hi Casimir,

    I looked into both scene files you have sent me. Here in both scenes, the Ray Collision nodes deliver True. I'm not sure, what I should see in the case it's not working.
    But I can easily imagine, that it may give different result on different machines. The Ray Collision node tests for collision with polygons. There's no real concept of edges in Cinema 4D. And you are trying to hit the objects right at there edges. This is depending highly on Floating Point precision and may or may not work. For example I could imagine, that your setup, that's working, might already stop working, if you simply move the scene content just a bit in space, simply because due to FP precision.

    So, I'd say the Ray Collision node works as to be expected. But I'd like to leave this open for further discussion by the community. Perhaps you can provide the community with your setups in this thread. Maybe somebody is of a different opinion and can convince me, then I will happily file a bug request.



  • On 07/10/2015 at 05:49, xxxxxxxx wrote:

    Hi Andreas,

    Thanks for your help and time!

    I've put the files on Dropbox, with this link: https://www.dropbox.com/s/tomxukonwncuk9y/Ray_Collision.zip?dl=0

    The "working" file still gives collision if you rotate and move the parent object.

    If I do the same with the other file, you can see that it "doesn't" collide anymore at some times.
    While you can clearly see a collision in the viewport.

    I know this could be caused by the floating point precision, yet I'm wondering why this happens in one file, but not in the other.

    Also, if it is expected to not work perfectly on edges, I would change the example in the help window, since this is with a ray cast exactly at an edge (as far as I can see).

    Thanks again for your help and time!



  • On 07/10/2015 at 09:01, xxxxxxxx wrote:

    FYI.
    There are a couple of really wonderful old threads about collisions in the archives.
    Giblet posted a lot of excellent code examples in them.
    https://plugincafe.maxon.net/topic/6579/7123_object-collisions&PN=2
    https://plugincafe.maxon.net/topic/6493/6983_null-object-dimensions

    -ScottA



  • On 07/10/2015 at 09:07, xxxxxxxx wrote:

    Hi Scott,

    Thank you very much for the information!! :)


Log in to reply