Crowds - Agent Unpack to fix Normals, and Repack/Assemble?

   5068   9   1
User Avatar
Member
10 posts
Joined: 8月 2018
オフライン
Hi all, the FBX export/import of my character seems to muck up the normals. Is there a way wrangle/unpack/etc to fix these and reassemble the agent?

I can dive into the imported FBX object and add a Normal node, but this could be an issue if changes are made to the FBX and it needs to be reimported. I'd have to do that every time to every FBX that's brought in, bleh!

If you think I'm missing something in the Maya FBX export that would fix the normals, please let me know!
User Avatar
Member
2658 posts
Joined: 6月 2008
オフライン
Couldn't you use setprimitinstrinc on the normal?
http://www.sidefx.com/docs/houdini/vex/functions/setprimintrinsic.html [www.sidefx.com]

You could unpack the original, set the normal then set the intrinsic attribute from the derived new normal.
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
10 posts
Joined: 8月 2018
オフライン
Thank you, Enviob! I feel like this is the right idea.

I'm uncertain how to proceed in the wrangle since I can't find an intrinsic “normal” or “n” attribute.

What I have so far isn't breaking, but it isn't fixing the normals either.




int totalPrims = nprimitives(1);
int nPrim=0;
for nPrim<totalPrims{
//setprimintrinsic(int geohandle, string name, int prim_num, <type>value, string mode="set")
setprimintrinsic(0,"n",nPrim, "60", "set")
nPrim+=1;
}
Edited by Totheroo1 - 2018年10月26日 12:32:59

Attachments:
normalsWrangl1.PNG (66.5 KB)
badNormals1.PNG (91.5 KB)

User Avatar
Member
2658 posts
Joined: 6月 2008
オフライン
I think you have the attribute named wrong, use capital “N”.

Try this in your primitive wrangle.
int success = 0;
int totalPrims = nprimitives(1);
for (int nPrim=0; nPrim++; nPrim<totalPrims){
    // Fetch normal from input 1.
    vector tempN = primattrib(1,"N",nPrim,success);
    if (success==1){
       // sucessful fetch of data, time to assign.
       setprimintrinsic(0,"N",nPrim, tempN, "set");
    }
}
Edited by Enivob - 2018年10月29日 09:46:19
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
25 posts
Joined: 11月 2006
オフライン
Hi, I'm having the same problem, but the
Try this in your primitive wrangle.
does not work on my agent.
Anything I can do?
Edited by scorpes - 2019年11月22日 08:30:44
User Avatar
Member
25 posts
Joined: 11月 2006
オフライン
I would like to add a rest position as well, with setprimintrinsic, I cannot get it to work, any help would be appreciated.
User Avatar
Member
14 posts
Joined: 4月 2019
オフライン
Hello,

I have tried the above mentioned method without success.
Was anyone able to make it work or have found a different solution?

Thanks
User Avatar
Member
6 posts
Joined: 9月 2017
オフライン
also having this same issue with none of the above working, anyone ever get a fix?
User Avatar
Member
8 posts
Joined: 3月 2019
オフライン
you have to clean it up first place in maya
User Avatar
スタッフ
792 posts
Joined: 10月 2012
オンライン
These days it would be simplest to use the FBX Character Import SOP to import into KineFX, clean up the skin geometry as needed, and then assemble the agent using the Agent from Rig SOP, Agent Layer SOP, etc. This avoids the extra step of importing to an agent and then trying to unpack and repack it
  • Quick Links