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!
Crowds - Agent Unpack to fix Normals, and Repack/Assemble?
3362 7 0- Totheroo1
- Member
- 10 posts
- Joined: Aug. 2018
- Offline
- Enivob
- Member
- 2536 posts
- Joined: June 2008
- Offline
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.
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.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- Totheroo1
- Member
- 10 posts
- Joined: Aug. 2018
- Offline
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.
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 - Oct. 26, 2018 12:32:59
- Enivob
- Member
- 2536 posts
- Joined: June 2008
- Offline
I think you have the attribute named wrong, use capital “N”.
Try this in your primitive wrangle.
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 - Oct. 29, 2018 09:46:19
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- scorpes
- Member
- 24 posts
- Joined: Nov. 2006
- Offline
- scorpes
- Member
- 24 posts
- Joined: Nov. 2006
- Offline
- wlvl_yfx
- Member
- 14 posts
- Joined: April 2019
- Offline
- mmaduri7
- Member
- 6 posts
- Joined: Sept. 2017
- Offline
-
- Quick Links