UPDATE - 1

Since GameDevToolset version 1.27, the import settings for FBX meshes in UE4 have changed! See revised import settings in the "New Import Settings" section below.


Pivot Painter is a Houdini Digital Asset (HDA) that stores model pivot and rotation information in the model's vertex data and additional UV channels. That information can then be referenced inside of Unreal's shader system to create interactive effects.




Features

METHOD 1: PER OBJECT BASIS

Method 1 allows users to animate any non-hierarchical sub-meshes of a mesh to be aimated using its pivot location and rotation. Using this data, you could generate interesting looking motion on things like grass, bushes, hair, abstract vfx and much more. Simply plug in your geometry and pivots into the tool and you are ready for export to an engine such as Unreal Engine.

The examples shown in the video mainly use Method 1, which is the most frequently used functionality of the tool. You would only really use Method two when desiring multi-layered motion.

METHOD 2: HIERARCHICAL BASIS

This functionality of the tool is used to store child parent relationships like the relation between a branch and leaf for instance, as well as the model pivot and rotation information in the meshes. It is important to note that this mode has two ways of processing pivot information: 1. Generate Pivots: When selecting this option, the tool will figure out what the optimal position is for the pivots on every single sub-object. This allows the user to import non-procedural assets, and make them pivot painter compatible. 2. Custom Pivots: Should the user have generated the object to be processed by the tool, and have access to the original pivot points, this option should be used. This allows the user to have fine control over the pivot positions used in the vertex shader.


Prerequisites



The tool is rather light on prerequisites for most of its application.

Per Object Basis & Hierarchical Basis:

@N (Normal) point attribute for the pivots orientation. (This is forward)
@name point attribute relationship on both the geometry and pivots. (So the tool knows which vertices belong to which pivots)

Only Hierarchical Basis:

Primitive group for the leaves, and branches. (Trunk on tree would be included in the branches group) 


Note: Only the Per Object Basis functionality absolutely requires the pivot input to be connected. The Hierarchical Basis offers the possibility to generate the pivots while processing.


Realtime Application



Within unreal you can now create a material which drives your motion, by reading out the data stored by the Pivot Painter tool. Simply use the material functions provided by Epic Games, or modify them to suit your needs. There are different material functions for both the Per Object Basis and Hierarchical Basis. For examples please refer to the Content Examples provided by Epic Games. 

Documentation


Benefits

Creating motion this way has its benefits. A model processed using this technique is only 18% larger in terms of memory than a standard Static Mesh. Animations are far less expensive than skeletal animations because they do not need to be stored as they are calculated on the fly. Vertex shader instruction counts are generally less of a performance concern than pixel instruction counts, due to the number of vertices on a model compared to the number of pixels on the screen.

Reference


New FBX Import Settings

Since GameDevToolset version 1.27, the import settings for FBX meshes in UE4 have changed! This has mainly been done to no longer be required to disable the "convert scene" checkbox. This prevents any complicated workflows when trying to use PivotPainter for assets used in the Foliage Actor in UE4. Full settings seen below.


CREATED BY

PAUL AMBROSIUSSEN

Paul Ambrosiussen is currently a Technical Artist at Bismuth Consultancy. He was the Lead of the Labs initiative at SideFX before that. Paul finished his BASc in International Game Architecture and Design at NHTV University of Applied Sciences in Breda. Paul enjoys writing tools to support effective art-pipelines, and maintaining tool / workflow quality for the artists he is assisting. His goal is to help others create amazing things in a better, faster and more flexible way. He creates tutorials, gives live lectures, attends events, and presents custom workshops to customers.

More from Paul Ambrosiussen

COMMENTS

  • WhimmY 6 years, 7 months ago  | 

    Great! Where to get the HDA?

  • DMNS 6 years, 7 months ago  | 

    Yeah, where do we get it?

  • Ambrosiussen 6 years, 7 months ago  | 

    Hey @zysnow @DMNS,

    You can download the latest SideFX Game Shelf tools in the GitHub Tool repository. Which can be found here:

    github.com/sideeffects/GameDevelopmentToolset/tree/Development
    /otl folder holds the tools (sop_pivotpainter.hda in this case)
    /hip holds example files to play around with some data

    Will add download instructions to the tutorial page!

    Have fun,
    Paul

  • art3mis 6 years, 7 months ago  | 

    Unity support......please!

  • limbicnation 6 years, 7 months ago  | 

    I would also appreciate a unity implementation :) Thanks!

    • Ambrosiussen 6 years, 7 months ago  | 

      Hey,

      I will be looking into Unity support very soon!
      Thanks

  • limbicnation 6 years, 6 months ago  | 

    Thanks, Looking forward hearing more about the process using Unity

  • alvarodoblezeta 6 years, 6 months ago  | 

    Thanks for this presentation¡¡¡
    I've been trying to reproduce the collision effect on ue4 when the character touches the object as samples in the video, but I have not yet been able to solve it. You could help me how to solve this problem. maybe a screenshot of the process?

    • Ambrosiussen 6 years, 6 months ago  | 

      Hi,

      Have you tried looking at the content examples provided by Epic Games? The grass shader found in the PivotPainter map does a good job of demonstrating how to approach this problem. Should you need any help, feel free to send me a PM. Then I can provide you with an example! :)

      Paul

  • Houdini4Games 6 years, 5 months ago  | 

    Hi,
    in the maxscript there were textures generated through the script. Are these specific to the mesh? If so, how can I generate these textures from Houdini?

  • kylda 6 years ago  | 

    Great job~
    I am keen to use this tech in unity~ But it doesn't work. Is that the problem of direction axis?
    Thank~

    • Ambrosiussen 6 years ago  | 

      Hey, the tool generates data to be read back in a shader. Unreal has that shader by default, but for unity you would need to write a custom solution. Once that's done, it will work for you in unity too.

      • kylda 5 years, 11 months ago  | 

        3Q very much and look forward to your works! :)

      • kylda 5 years, 11 months ago  | 

        In addtion,Would you offer a toggle fuction to store pivot position in local space? It maybe helpful in unity.
        Thanks a lot!

  • Matt Vitalone 5 years, 11 months ago  | 

    Paul, can you post the hip file from the video? I'm trying to run the pivot painter from the same tree model from the Unreal Pivot Painter content example but I get different results than you do. I want to make sure my scale/rotations/etc. match up with what you were doing.

  • Matt Vitalone 5 years, 11 months ago  | 

    Doh, nevermind I found it on Github

    • Ambrosiussen 5 years, 11 months ago  | 

      Good! :)
      All .hip files can be found in the /hip directory on Github.
      We have however been talking about putting them on the tutorial pages too. Is that something you'd like?

  • Matt Vitalone 5 years, 11 months ago  | 

    Okay so I grabbed the .hip file and exported to fbx from the "Tree Just Mesh Example". I added a PivotPainter node and set it to Hierarchical with Generate Pivots. When I bring it into Unreal I put it in the PivotPainter level from Content Examples and assign the materials from the existing version of that tree in the scene, "Tree_wb_branches" and "Tree_wb_leaves". However it doesn't match the results of the tree already in the whitebox. The bases of the branches separate from the trunk when animated. Did you use a custom material for your demo in Unreal, or should it work with the existing materials?

    • Matt Vitalone 5 years, 11 months ago  | 

      Here is a gif showing the tree exported from the hip file on the left, and the original tree on the right
      https://gph.is/2KIkc5h

    • Ambrosiussen 5 years, 11 months ago  | 

      Whoa, that doesn't look right. The shader I used is an exact copy of the one provided by Epic.
      I did however recently see an update on the Epic blog about PivotPainter. Perhaps they changed the logic a bit?
      What happens if you use the mesh locked into the provided .hip file?
      Could you send me an email about the above to paula at sidefx dot com?

  • DeGGeD 5 years, 10 months ago  | 

    Hello, Paul, hello, everyone.
    I've followed tutorial and have a question about Geometry Spreadsheet info after pivots baking SOP usage.
    Should there be an information regarding vertices pivots? Because with simple setup (please, see screenshot), there is no info about it after "baking SOP".

    https://ibb.co/ef0O5o

    Thank you for answer in advance.

    • Ambrosiussen 5 years, 10 months ago  | 

      Hi,
      The pivot information is stored as vertex attributes, not as point attributes.
      As for the .hip file, what version of Houdini are you using to open it?

      • DeGGeD 5 years, 10 months ago  | 

        Got it, thank you. Currently Im using version 16.5.268.
        Im asking because i have very strange result when asset being imported into Unreal Engine. It rotates (visually) not around Y-up vector, but like diagonal (XY-up vector) and Im not sure where is my mistake :(

        • Ambrosiussen 5 years, 10 months ago  | 

          That might be caused by the import settings you use in UE. Can you make sure you use the same settings I show at 3:03 in the tutorial?

  • DeGGeD 5 years, 10 months ago  | 

    Also, could You, please, upload new file version for pivot_painter_demoscene, because there is an error (Invalid .hip file header) while I'm trying to open it

  • TCarneiro 5 years, 9 months ago  | 

    Are the examples in the video available for download anyone?

  • Ambrosiussen 5 years, 9 months ago  | 

    Hi,
    All examples can be found on Github. Please see: https://github.com/sideeffects/GameDevelopmentToolset/tree/Development/hip

  • Sirvoxelot 5 years, 8 months ago  | 

    will this work on houdini indie

  • KevinZhang 5 years, 3 months ago  | 

    Hi @Ambrosiussen
    Unreal Engine has new PivotPainter 2.0 now, and new PivotPainter2Foliage shader is easy to use, Could you upgrade the Pivot Painter plug-in to a new one. it looks like only for PivotPainter 1.0 shaders. THX a lot.

  • Broetchaen 5 years, 3 months ago  | 

    I tried the tutorial and also downloaded the test scenes. Each time I export (even from the demo scenes) and import it into the engine, the animations I get are simply wrong.
    Vertex color seams to look all good though in the model inspector, but it seams like all the objects are rotating around a single pivot instead of their own.

    • sausage 5 years, 1 month ago  | 

      yeah, I'm having the exact same issue

      • Ambrosiussen 5 years, 1 month ago  | 

        Make sure your import options are correct inside Unreal! :)

    • gaxx 5 years ago  | 

      Hey,

      If anyone is having trouble with current version of Unreal/Houdini Pivot Painter tool the solution is pretty simple. When you import your mesh check the 'convert scene' checkbox to ON. Solved problems for me.

      • Aten 5 years ago  | 

        Funny I was just trying this and having the same problem, checked this page and saw your comment - 3 hours old. Convert scene fixed it for me, nice one :)

  • IamBramer 4 years, 1 month ago  | 

    As of Unreal Editor version 4.24.3 and Houdini 18.0.348 this doesn't appear to work as intended anymore. I've checked more than 10 times and tried numerous shaders directly from Unreal Engine's example file as well as trying many different export settings from Houdini. No matter what attempts I make, it seems it doesn't use the right axis information from the pivot as rotations happen off center and I'll get oblong deformations when trying to do any scaling or translating effects. I've tested with basic shapes and advanced shapes. I've tried with the old settings and the updated fixed settings as well as explored many other possible methods to fix with no success.

  • prowa 4 years, 1 month ago  | 

    I was test on Unreal engine 4.23 and Houdini 18.0.348 as well, the Piovt Painter don't work correct, but it works fine at 17.5 data, is there any debug plan for this tool? Thanks.

  • Bergerac 3 years, 3 months ago  | 

    Hey Everyone - I think i found the problem that you all might talking about i.e. the pivots not being in the right places.

    In the PivotPainter_PerObjectData material in the content examples, the TexCoords nodes are referencing UV channels that dont necessarily exist in you object exported from Houdini. If you follow the example files, only 2 UV channels are being created. In Unreal, these will be read as channels 0 and 1. The Material responsible for reading these values is set to use channels 2 and 3.

    If you set these to the correct corresponding channels then you should be good to go!

  • yao.liu 3 years, 2 months ago  | 

    Spend hours to make PivotPainter 1.0 works for Unity now without any changes to unreal_pivotpainter tool.
    Really ugly code. You can clone the repo and open the testscene to view the effect.
    PivotPainter 2.0 for Unity will coming soon!!

    https://github.com/Top61ly/PivotPainter_HoudiniForUnity

Please log in to leave a comment.