Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    How to get HairGuides* for feathers/fur

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 496 Views
    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 Offline
      Helper
      last edited by

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

      On 09/11/2012 at 10:30, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R9.6+ 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi,

      I would appreciate some direction on how one goes about getting HairGuides* for feather and fur objects, if it is possible to do that.

      I find no mention of these objects in the docs, nor any defined name for them in ge_prepass.h. However, I know their IDs, and given the hair_grass.cpp example, I have found some degree of success by sending them op->Message(MSG_HAIR_GET_OBJECT_TYPE, HairPluginMessageData* ). Casting the filled HairPluginMessageData::data field to HairPluginObjectData*, I do find that there are calc_generate , add_generate , and calc_hair functions present. However, in attempting to actually call calc_generate on the object, I have not been successful in generating a valid HairGuides*.

      Taking for example a fur object, if I pass HAIR_GENERATE_PASS_BUILD, I do get a non-null HairGuides*, but it has only one guide with seven segments, and it crashes unpredictably later, for instance, when calling HairGuides::GetRootUV. If I pass HAIR_GENERATE_PASS_INIT, calc_generate itself crashes. Most likely, I am just not passing correct parameters to calc_generate ; doc and op seem self-explanatory, but I am not sure what the others expect to be passed.

      The context is code running inside of a Hierarchy run with BUILDFLAGS_EXTERNALRENDERER, and I would appreciate if one of the developers could please post some example of how this is supposed to be done (if it is possible to get HairGuides* for these objects, that is).

      Thanks,
      JD

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

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

        On 16/11/2012 at 04:22, xxxxxxxx wrote:

        Just bumping this, please let me know if there is something wrong with the question.

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

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

          On 16/11/2012 at 05:52, xxxxxxxx wrote:

          I'm currently looking into this. I'll come back to you ASAP.

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

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

            On 16/11/2012 at 07:27, xxxxxxxx wrote:

            Thanks, I appreciate it. Please don't feel the need to hurry, though, if it is possible to get guides for these objects, it should take little time for me to augment my current hair code to accommodate them.

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

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

              On 06/12/2012 at 03:15, xxxxxxxx wrote:

              Hi,

              I got information on this from the developers.
              Feathers and fur objects use the hair API but invoking it in reverse is not supported. You could fake the hair calls to those objects but it was not intended to be used backwards.

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

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

                On 06/12/2012 at 03:39, xxxxxxxx wrote:

                Thanks for getting that info.

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