[H16] Unable to get detail value through pointvop
3172 6 2- Superbuff
- Member
- 6 posts
- Joined: May 2017
- Offline
Hello!
I added a custom detail called “projection_dir” and i'm trying to get the value in a point vop (also tried an attribute vop) by using the import detail node, added in the detail name but printing it out still gives me a vector(0,0,1) no matter what i do, even though the inspector shows other value's in the geometry inspector panel.
Any idea's what im doing wrong?
I added a custom detail called “projection_dir” and i'm trying to get the value in a point vop (also tried an attribute vop) by using the import detail node, added in the detail name but printing it out still gives me a vector(0,0,1) no matter what i do, even though the inspector shows other value's in the geometry inspector panel.
Any idea's what im doing wrong?
Edited by Superbuff - Oct. 27, 2017 18:37:46
- tamte
- Member
- 8785 posts
- Joined: July 2007
- Offline
- Superbuff
- Member
- 6 posts
- Joined: May 2017
- Offline
Odd, i'm doing the exact same thing at work (same version of Houdini) and there it doesnt work. I'll update my version.
Ive attached a copy of what i'm trying to do however.
Rotating a UV Projection node to match the orientation of the averaged normals. Not quite right yet. Anyone see what i'm doing wrong?
Ive attached a copy of what i'm trying to do however.
Rotating a UV Projection node to match the orientation of the averaged normals. Not quite right yet. Anyone see what i'm doing wrong?
- tamte
- Member
- 8785 posts
- Joined: July 2007
- Offline
- well, the projection seems to align with normal direction, the problem is that the normal doesn't define full orientation so the rotation around N axis will be arbitrary as you can see
you can use Lookat VOP instead of align to get more control, however you'll need to provide correct up vector, which you can either extract from the topology or depending on the purpose of your setup you may have clear idea how you want your projection to behave and what should define your up vector
What are you trying to achieve? There may be simpler ways than trying to link live projections to your geo, like bring geo to rest, UV that and just copy UVs, or since it's just a planar projection you can easily do that in VOPs
- use Set Attribute instead of Add Attribute, as Add Attribute just sets the default value, it doesn't cause any issue in your particular scene since you are using it to store just one detail value, but I'd recommend to use Set Attribute anyways
- instead of Point VOP and importing Detail attrib just to store Detail attrib, just use Attrib VOP in Detail mode and Bind the projection_dir and Bind Export eulerAngles
you can use Lookat VOP instead of align to get more control, however you'll need to provide correct up vector, which you can either extract from the topology or depending on the purpose of your setup you may have clear idea how you want your projection to behave and what should define your up vector
What are you trying to achieve? There may be simpler ways than trying to link live projections to your geo, like bring geo to rest, UV that and just copy UVs, or since it's just a planar projection you can easily do that in VOPs
- use Set Attribute instead of Add Attribute, as Add Attribute just sets the default value, it doesn't cause any issue in your particular scene since you are using it to store just one detail value, but I'd recommend to use Set Attribute anyways
- instead of Point VOP and importing Detail attrib just to store Detail attrib, just use Attrib VOP in Detail mode and Bind the projection_dir and Bind Export eulerAngles
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Superbuff
- Member
- 6 posts
- Joined: May 2017
- Offline
Im actually following a GaTu tutorial on procedural walls, looking to start incorporation houdini into my studio's pipeline.
There is a video where we've just sweeped a curve and are now trying to cap the geo. This uv projection stuff with the normals is to properly create uv's for the cap no matter rotation.
I'll give these suggestions a try when i get back in the office!
There is a video where we've just sweeped a curve and are now trying to cap the geo. This uv projection stuff with the normals is to properly create uv's for the cap no matter rotation.
I'll give these suggestions a try when i get back in the office!
- Superbuff
- Member
- 6 posts
- Joined: May 2017
- Offline
Right so, i cant make this work in my file for some reason. I just attached the project. If you go into obj > Wall_base
At the bottom you'll see the atribtue VOP with the exact same setup as i attached earlier but it simply doesnt work. the importdetail node in the VOP returns 0,0,1
EDIT So i think i found the problem, something to do with float precision, turning -3.32609e-08
into 0. Trying to rint(val * 1000) / 1000 still returns 0.
Upon further inspection of the video the Normal array is typed as 3fn but mine is typed as Nml. Perhaps Import Detail can't deal with this?
At the bottom you'll see the atribtue VOP with the exact same setup as i attached earlier but it simply doesnt work. the importdetail node in the VOP returns 0,0,1
EDIT So i think i found the problem, something to do with float precision, turning -3.32609e-08
into 0. Trying to rint(val * 1000) / 1000 still returns 0.
Upon further inspection of the video the Normal array is typed as 3fn but mine is typed as Nml. Perhaps Import Detail can't deal with this?
Edited by Superbuff - Oct. 30, 2017 13:00:27
- galagast
- Member
- 252 posts
- Joined:
- Offline
Tomas's suggestions are great. Definitely worth a try.
I looked at your network, and figured that maybe you could simply build the UV's on your plane before sweeping. I then set the sweep not to inherit the UV's from your path to maintain the UVs from the plane. Will this work for your case?
H16.0.0736 Indie - Nodes I added/modified are in yellow.
I looked at your network, and figured that maybe you could simply build the UV's on your plane before sweeping. I then set the sweep not to inherit the UV's from your path to maintain the UVs from the plane. Will this work for your case?
H16.0.0736 Indie - Nodes I added/modified are in yellow.
-
- Quick Links