Pivot Painter 2.0 for use with Unreal Engine ?

   10824   15   3
User Avatar
Member
113 posts
Joined: Dec. 2007
Offline
Hello,

I'm curious if pivot painter 2.0 is still on the roadmap for sidefxlabs? It supports deeper hierarchies.
Found this on the old github https://github.com/sideeffects/GameDevelopmentToolset/issues/71 [github.com]
If yes would love to get a rough idea of when? I might give it a shot myself if it's low priority for you

Thanks a lot!
Edited by vinz - July 16, 2020 13:59:50
User Avatar
Member
197 posts
Joined: July 2015
Offline
Hi,

It is on the roadmap, but very low priority unfortunately.
If you end up building it yourself before we do, feel free to submit a pullrequest to merge it in.

Paul
Paul Ambrosiussen
Technical Artist, Freelance
twitter.com/ambrosiussen_p
User Avatar
Member
113 posts
Joined: Dec. 2007
Offline
Hi Paul,

Thanks for the reply! Ok I may give a shot then in a bit then, if it's not too junky I'll submit it
User Avatar
Member
8 posts
Joined: July 2018
Offline
Just wanted to voice my desire to see Pivot Painter get updated/fixed for Unreal as well. I spent a solid amount of time trying to troubleshoot the current pivot painter before finally coming to the realization that it currently doesn't work as intended with newer versions of Unreal.

You guys do solid work and you've got a TON going on over there, so I can see this not being high priority, but man would I LOVE to be able to use this tool.
User Avatar
Member
6 posts
Joined: April 2020
Offline
indeed i agree … the support for pivot painter 2.0 will be a great deal .
User Avatar
Member
12 posts
Joined: Oct. 2020
Offline
I'm also salivating at the thought of using this with Niagara.
User Avatar
Member
1 posts
Joined: Nov. 2019
Offline
Id love to try PivotPainter 2 too. Mixing it with Tree generator would be very powerful.
User Avatar
Member
197 posts
Joined: July 2015
Offline
Hi,

Just dropping in to announce I will be releasing PP2 in labs by the end of this week.
Paul Ambrosiussen
Technical Artist, Freelance
twitter.com/ambrosiussen_p
User Avatar
Member
113 posts
Joined: Dec. 2007
Offline
Hi Paul,

Thanks a lot for the update and Pivot painter 2 support!
I went through your youtube tutorial and was then trying to get a MAT with the PivotPainter2FoliageShader MF to work (the one that does the wind effect) but it doesn't seem to work as intended right now.
I think I've narrowed it down to the parentIndex not being correct, looking at the Set_Parent_Index attribute wrangle, I see :
i@parentIndex = max(len(hierarchysplit)-2, 0);
This seems to point to the parent hierarchy level but not the actual parent index?
for numberOfStepsFromRoot you have i@numberOfStepsFromRoot = max(len(hierarchysplit)-1,0); which is pretty close and makes sense.

I'll try to dive a bit deeper, but let me know what you think!
Thank you!

edit : a minor comment : it would be great if pivotpainter1 was not templated be default inside, since the layout lightmap uvs is on and the flatten uv operation is pretty slow! (I also noticed you still had the PP2 placeholder inside PP1 )
edit2 : for other that have issues, with PP2 I had to uncheck generate lightmap UVs in Unreal which is on by default, otherwise it overwrites the necessary UVs created by the HDA.
Edited by vinz - Feb. 7, 2021 15:49:45
User Avatar
Member
8 posts
Joined: July 2018
Offline
Ambrosiussen
Hi,

Just dropping in to announce I will be releasing PP2 in labs by the end of this week.

I just saw there was an updated video on the site for this so I popped over here and found this. Haven't had a chance to test this yet but you have no idea how huge this update is for me. It is such an essential part of what I'm trying to create for my game. THANK YOU!
User Avatar
Member
197 posts
Joined: July 2015
Offline
IamBramer
Ambrosiussen
Hi,

Just dropping in to announce I will be releasing PP2 in labs by the end of this week.

I just saw there was an updated video on the site for this so I popped over here and found this. Haven't had a chance to test this yet but you have no idea how huge this update is for me. It is such an essential part of what I'm trying to create for my game. THANK YOU!

Very welcome! Be sure to share some results once you have something cool to show

vinz
Hi Paul,

Thanks a lot for the update and Pivot painter 2 support!
I went through your youtube tutorial and was then trying to get a MAT with the PivotPainter2FoliageShader MF to work (the one that does the wind effect) but it doesn't seem to work as intended right now.
I think I've narrowed it down to the parentIndex not being correct, looking at the Set_Parent_Index attribute wrangle, I see :
i@parentIndex = max(len(hierarchysplit)-2, 0);
This seems to point to the parent hierarchy level but not the actual parent index?
for numberOfStepsFromRoot you have i@numberOfStepsFromRoot = max(len(hierarchysplit)-1,0); which is pretty close and makes sense.

Thanks for reporting this! Could you please file a bug with support so I can better track it?
Paul Ambrosiussen
Technical Artist, Freelance
twitter.com/ambrosiussen_p
User Avatar
Member
113 posts
Joined: Dec. 2007
Offline
Thanks for the update Paul, it took me a second but I eventually filed a bug, though still hoping I'll eventually have a bit of time to look into it as well!
User Avatar
Member
1 posts
Joined: Feb. 2019
Offline
Yes, the parent index is wrong.

Changing the Set_Parent_Index AttributeWrangle to something along these lines:

string hierarchysplit[] = split(s@hierarchy, "/");

i@parentIndex = max(len(hierarchysplit)-2, 0);

if (len(hierarchysplit)>1)
{
    string parentString = hierarchysplit[len(hierarchysplit)-2];
    
    for (int primitive=0; primitive < nprimitives(0); primitive++)
    {
        string currentsplit[] = split(prim(0,"hierarchy",primitive),"/");
        string currentname = currentsplit[len(currentsplit)-1];
        if (parentString == currentname)
        {
            i@parentIndex = prim(0,"selectionIndex",primitive);
        }
    }    
}

i@numberOfStepsFromRoot = max(len(hierarchysplit)-1,0);
f@random01Value = rand(random_shash(s@hierarchy));

should fix it.
User Avatar
Member
113 posts
Joined: Dec. 2007
Offline
DodgeRollBrent
Yes, the parent index is wrong.

Changing the Set_Parent_Index AttributeWrangle to something along these lines:


Thank you, that was helpful! finally had time to dig more into it, and the other change that was needed was to use the "index" attribute that's created further down (and so have the wrangle further down), and it now appears to work as expected, but will do more testing.
Edited by vinz - April 9, 2021 10:57:56

Attachments:
fixForFoliageShader.JPG (64.9 KB)

User Avatar
Member
197 posts
Joined: July 2015
Offline
Hi, thanks for reporting these issues. I have verified and fixed them.

If you update Labs, drop down a NEW instance of PivotPainter you will have the improvements.

Additionally you can now provide an up vector, which the tool will use when encoding the information, rather than trying to derive it automatically. If no up is found on the pivot points, it will fall back to old behavior.

You can now also customize the range used for encoding. Previously this was hardcoded to 2048 (like in 3dsmax), but this has now been made a variable you can tweak. Lowering this number will give you far superior precision, and this change is coming to the max plugin soon too.
Paul Ambrosiussen
Technical Artist, Freelance
twitter.com/ambrosiussen_p
User Avatar
Member
113 posts
Joined: Dec. 2007
Offline
Great, thank you Paul!
  • Quick Links