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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Alembic Export to Unreal - RootUVs?

    Scheduled Pinned Locked Moved Cinema 4D SDK
    2024
    2 Posts 2 Posters 37 Views 2 Watching
    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.
    • M Offline
      mp-grafix
      last edited by mp-grafix

      I'm trying to properly export my Cinema4D hair groom to Unreal, and I manage to get the splines via Alembic export, but the Alembic file seems to lack the "RootUVs" on import to Unreal.

      This is neccessary to texturize the fur/hair according to the UVs of the base mesh it is bound to (not sure what the process here is, sampling on binding or writing on export).

      Does anyone have some idea how to get hair over to Unreal with RootUVs or how to implant this info with a script solution afterwards into the alembic cache somehow?
      This thread and maya script sounds like it tries to solve this, too:
      https://devtalk.blender.org/t/adding-uv-data-to-alembic-on-export/24463

      Cinema Version is 2024, maybe this is solved in newer verions?

      Thanks for ideas!

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF Offline
        ferdinand @mp-grafix
        last edited by ferdinand

        Hey @mp-grafix,

        I am not really an expert on this subject, but the Alembic format does not provide a "root uv" concept as you somewhat imply. There are zero hits for these terms in the Alembic docs. groom_root_uv is a custom Alembic attribute that is supported (and defined) by Unreal (link). This link also explains how to compute this a bit ambiguous term. One might think a root uv would be the uv coordinate on some scalp mesh, but it is actually just the spherical projection of a hair root (that is at least how it is explained in the Unreal link). Unreal will also autogenerate this attribute for your when it does not exist.

        The UV computation of our hair library can be found in c4d.modules.hair.HairLibrary.GetPolyPointST but this is per polygon. You can look at this example for how to use it on a whole mesh. But as far as I understand the Unreal docs, that is not what Unreal wants from you.

        The official Alembic repo also contains the Python bindings, PyAlembic, with them you could add any metadata you want after Cinema exported the file. Hurdle number one is that the Alembic repo does not seem to provide binaries, i.e., they expect you to compile this yourself, which might be a hurdle to high for some users. Hurdle number two is to match the exact format Unreal expects. That is best solved in Unreal forums.

        I am not very much into Unreal, but does our Cineware Unreal binding not solve this? I would say you have much better chances to be heard there, rather than us conforming with our Alembic export to the very specific custom attribute format Unreal expects.

        Cheers,
        Ferdinand

        edit: Our Cineware for Unreal developer is currently on vaction until the middle of August. When you bump this topic then again, I am happy to ask him what his take on this is.

        MAXON SDK Specialist
        developers.maxon.net

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