Navigation

    • Register
    • Login
    • Search
    1. Home
    2. danniccs
    D

    danniccs

    @danniccs

    0
    Reputation
    4
    Posts
    2
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    danniccs Follow

    Best posts made by danniccs

    This user does not have any upvoted posts yet.

    Latest posts made by danniccs

    RE: Get parameter value at given time.

    Hi @ferdinand and @Cairyn, thanks for the answers.

    There may be a simpler way to achieve an effect similar to what we want (for example, by caching the world matrix at the time t) but I'm still thinking of alternate ways to be able to access the full mesh information at time t. Caching the full mesh is probably not a good option since we would have to update that cache every time the mesh is changed at any time before t (since this might change the mesh at t). A possible option is to restrict the usability a bit and always evaluate the mesh at time 0, I'm checking if this is something we can do.

    Feedback loops could be an issue, but it should never happen that (using the example @ferdinand wrote) P relies on T and T also relies on P in this specific plugin. Also, t should always be a time before the current time, although that might not alleviate this particular problem.

    In any case, I'm going to go ahead and mark this as solved, I think I got all the information I need to find a solution.

    Thank you both very much for helping me out,
    Daniel

    posted in Cinema 4D SDK •
    RE: Get parameter value at given time.

    I might not have been clear in my previous post. The parameter is a BaseLink to a mesh, and that parameter is not animated. It should always be a link to the same BaseObject. The mesh itself has animated parameters, and I need to access the mesh object at a specified time t. At the very least, I need to know its position, rotation and scale values at t.

    I have tried using CCurve.FindKey() and CKey.GetGeData()/CKey.GetValue() to get the mesh position at t, but the parameters in obase.h don't have tracks themselves. What I was wondering is if there is a way to get the world matrix of an object at time t without using ExecutePasses().

    posted in Cinema 4D SDK •
    RE: Get parameter value at given time.

    Hi @ferdinand, thanks a lot for the answer.

    The parameter I am trying to evaluate is actually a BaseLink to a BaseObject representing a mesh. As such, I cannot use the CCurve::GetValue approach directly on the parameter. However, if possible I want to avoid running ExecutePass, since this would probably be quite slow.

    I realized I can solve my issue if I can get access to the world matrix of the mesh at the given time. Is there a way to get the interpolated world matrix at a specific time from a BaseObject? If not, can I get the CTrack associated with that world matrix? I could then interpolate the values between keys and use the resulting matrix. If neither of those is possible I will probably end up using ExecutePasses.

    Thanks again for the reply,
    Daniel

    posted in Cinema 4D SDK •
    Get parameter value at given time.

    Dear community,

    What is a good way to evaluate a parameter value at a given frame from a threaded context?

    I need to get the value of a parameter at a given time within the ModifyObject() function of a class derived from ObjectData. I need to do this when using bucket rendering. The required time is stored in a BaseTime member. The solution I've found so far is to use ExecutePasses(bt, true, true, true, BUILDFLAGS::EXTERNALRENDERER). However, this causes issues because the ModifyObject() function is called again. Additionally, I would like to avoid calculating the entire scene again. Is there a better way to do this?

    On a related note, I get a debugbreak when calling ExecutePasses, is this due to the way I'm calling it?

    Thank you for your attention,
    danniccs

    posted in Cinema 4D SDK •