Skip to content

An alembic batch importer plugin in Unreal Engine 5.2 for Houdini user

License

Notifications You must be signed in to change notification settings

wzhang1998/unreal-alembic-batch-importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unreal Alembic Batch Importer Plugin

An alembic batch importer plugin in Unreal Engine 5.2 with Houdini space transform option.
Using this plugin you can easily import multiple alembic simulations as geocache from Houdini without checking settings everytime.

alembicbatchimporter

Install

  • Install required packages:
    • option 1:pip install the Python dependencies to ...\Your-Unreal-Project\Content\Python\Lib\site-packages (you can use --target with pip install)
      • PySide2
      • unreal-qt
    • option 2 (recommended):Copy the pre-download library (Python folder) to your Unreal project's Content folder ...\Your-Unreal-Project\Content\Python
  • Copy the folder to your Unreal project's plugin folder ...\Your-Unreal-Project\Plugins\alembicBatchImporter
  • Restart Unreal and Enable the plugin

Prerequisites

  • In Unreal Editor, open Edit - Plugins window, enable Alembic Importer plugin alembicimporter
  • Add ...\Your-Unreal-Project\Content\Python\Lib\site-packages to your editor python path, see Unreal doc

How to use?

  • When the plugin enabled, a button will add to editor tool bar, press the button, and a window like this will show up.

  • Import Destination: Type in your alembic geocache import destination, eg: /Game/ABC.
  • Transform from Houdini Space?: Choose your import transform space, by default it sets to from Houdini space to Unreal space: scale=unreal.Vector(100, -100, 100), rotation=unreal.Vector(90, 0.0, 0.0).
  • Select Files: Choose your .abc file folder from the computer.
  • Import All Alembics: Import all at once!!

Tips

  • I used this script to change all geocaches' material
    def returnMaterialInformationSMC():

    levelActors = unreal.EditorActorSubsystem().get_all_level_actors()
    testMat = unreal.EditorAssetLibrary.find_asset_data('/Game/StarterContent/Materials/M_AssetPlatform.M_AssetPlatform').get_asset() # replace your material path

    for levelActor in levelActors:
        if (levelActor.get_class().get_name()) == 'GeometryCacheActor':
            geometryCacheComponent = levelActor.geometry_cache_component

            print(levelActor.get_name())
            materials = geometryCacheComponent.get_materials()
            for material in materials:
                print(material.get_name())
                try:
                    for item in material.texture_parameter_values: print(item)
                except:
                    pass
                print('_')

            for i in range(geometryCacheComponent.get_num_materials()):
                geometryCacheComponent.set_material(i, testMat)

    returnMaterialInformationSMC()

About

An alembic batch importer plugin in Unreal Engine 5.2 for Houdini user

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published