[H16] Unable to get detail value through pointvop

   2849   6   2
User Avatar
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?
Edited by Superbuff - Oct. 27, 2017 18:37:46

Attachments:
Screen Shot 2017-10-28 at 12.19.40 AM.png (53.3 KB)

User Avatar
Member
8539 posts
Joined: July 2007
Offline
should work, as long as projection_dir is detail vector attribute on the first input geometry

Attachments:
import_detail.hip (82.1 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
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?

Attachments:
import_detail.hipnc (77.2 KB)

User Avatar
Member
8539 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
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
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!
User Avatar
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?
Edited by Superbuff - Oct. 30, 2017 13:00:27

Attachments:
Wall_System.hiplc (443.5 KB)

User Avatar
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.

Attachments:
Wall_System_v2.rar (96.6 KB)

  • Quick Links