Playback and View Display



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/12/2006 at 01:54, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.2-10.0 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    This is very much for users of my plugin. I note that no matter what setting for the "Wire" in View Configure, the animation playback speed for figures (using my plugin bones) is the same. And this makes sense, since it is probably doing all of the mesh deformations despite displaying as Box or Skeleton.

    The questions are these:

    1. How do I handle Views in this respect? Should I handle them?

    2. How do I differentiate between the deformations being called just for the View editor or when for Render (where they'll obviously need to be done)?

    Basically, when the user is in Box or Skeleton display 'modes', it would seem appropriate that the playback/scrubbing would be much faster, that is: without doing all of the mesh deformations that aren't visible.

    Thanks for any help!



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/12/2006 at 12:57, xxxxxxxx wrote:

    Hi,

    check out the HierarchyHelp passed to GetVirtualObjects(). and specifically at the VFlags. These are accordingly set. There is an example in the SDK if I remember correctly. :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/12/2006 at 16:05, xxxxxxxx wrote:

    Samir,

    That would be perfect, but these are modifier objects (deformers) and not generators. Modifiers use ModifyObject() whereas generators use GetVirtualObjects().   ModifyObject() doesn't get a HierarchyHelp. ;)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/12/2006 at 18:15, xxxxxxxx wrote:

    hmm. I would think that Cinema 4D handles this according to the object that is deformed. However, I doubt that these modes affect your deformation code. It´s only a display speed up. I just checked with one of my deformers and when I switch to Box mode, the display also gets faster but still all defomrations are done.

    So I would say, you shouldn´t handle them yourself.

    But maybe I misunderstood and you want to simply don´t do any calculations when in box or skeleton mode to actually create a speed-up? Well, then I don´t know how to handle this except for checking which display mode is currently active in the passed BaseDraw object in your draw method. :)

    Each object also gets a Render notification, before rendering. There you could set a boolean member variable to true and then check for it in ModifyObjects() and act accordingly.
    I don´t know if it´s sent before the ModifyObject() function though. :-/

    Or check the copy flags in CopyTo() and set to a member variable when it´s a whole document to be cloned (forgot about the name of the flag but it´s something including DOCUMENT :-D )

    Cannot think of anything else.
    Samir



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/12/2006 at 21:07, xxxxxxxx wrote:

    That's the thing. Whether in Gouraud Shading or Skeleton mode, animation playback is the same speed. Maybe there is a speed up for camera manipulation, but not in animation playback. And it seems that this is tied to doing the deformations whether or not the mesh is being displayed.

    Luckily, I already handle the RenderNotification message, so that is a possibility. As you note, not sure where in the pipeline the ModifyObject() is called in relation to the actual Editor view update (which is the only thing that concerns me - rendering just needs to let deformations happen).

    Time to tinker. :)

    Thanks,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/02/2007 at 11:29, xxxxxxxx wrote:

    Back at this (having been sidelined for other work, but reminded of the problem just today).

    The only method in my plugin object that has a BaseDraw is Draw(). But this doesn't have a direct effect on the deformations - only the box display for the plugin bone. My thinking here is that in Draw(), I get the display mode from the BaseDraw and then set a flag for whether or not the mode should cause consideration of deformations or not in ModifyObject.

    The downside here is that the check will be done every time Draw() is called (a couple times - sarcasm). It'd be better if there were a way to get notification only when the display mode has changed so as to avoid the repetitive checking (something about the SDK that always bugs me).

    What are your thoughts?

    Thanks,


Log in to reply