adding "mount points" for props to a procedual pol

   12964   16   1
User Avatar
Member
24 posts
Joined: 2月 2006
Offline
Hi there,

I'm quite new to houdini… so please bear my stupid questions

I have an poly object which I model procedurally.
Let's say it's the base of a house.

Now I want to be able to add “props” in random amounts to it… but in certain locations. A good example would be various chimney-types or antenna's and satellite dishes, doors, windows, etc.

I need a sort of “mount point” for those that I want to keep on the geometry in certain specified locations. These should not change even if I subdivide the faces, polyextrude them, etc. They just move with the new geometry then in orientation and location.

Trying face-numbers sucks kinda. My other idea was getting the bounding-box Y-max to place stuff on top… but that doesn't fix the other location issues.

Can I somehow assign a point/vector/handle/whatever onto a face x, which stays there when the modelling process continues?
ideally with a transform-node or something?

greetz,
-elderic
User Avatar
Member
7868 posts
Joined: 7月 2005
Offline
Does using the Group SOP work (make sure you create a “primitive” group)? In most places where you use face (aka primitive) numbers, you can use this named group instead.
User Avatar
Member
24 posts
Joined: 2月 2006
Offline
edward
Does using the Group SOP work (make sure you create a “primitive” group)? In most places where you use face (aka primitive) numbers, you can use this named group instead.

actually I would have to try that

another idea I stumbled upon would be a rivet… this toll already seems to do what I want, the problem is: it operates on the wrong level (same level as geometry-node). I will try some stuff (including your suggestion and read some more docs. perhaps I come up with a solution.

my final goal is a fully procedual house with multiple random props… for assembling of a random procedual “city”.

well… back to the drawing board.
User Avatar
Member
7868 posts
Joined: 7月 2005
Offline
At the geometry level, there's also the Align SOP but I've never learned how that node works.
User Avatar
Member
24 posts
Joined: 2月 2006
Offline
ok, let's just forget my (imagined) problem that face idicies are inherently bad. they seem to work fine

the attached scene implements my basic idea.
now I have the next problem.

I use a single “scatter”-point to attach a point to face X, but it's randomly distributed across the polygon.

is there a node to modify it easily to place the point directly in the face-center or something?

EDIT: the node in question for this would be “singleGridOnPrimitive” in my test scene

Attachments:
copyOntoCubeFaceX.hipnc (52.7 KB)

User Avatar
Member
7868 posts
Joined: 7月 2005
Offline
elderic
is there a node to modify it easily to place the point directly in the face-center or something?

Maybe an Add SOP using the centroid() expression?
User Avatar
Member
24 posts
Joined: 2月 2006
Offline
Alrighty.

Seems to work. Two questions now:

1. How do I localize the position of the node in the prim()-function?

I want to get rid of the absolute path “/obj/box_object1/box1” to something more local like “./box1” (which doesn't work)

2. how do I orient the box to the face normal at that position?

my approach would be to get the normal and extract rotation informations for the box-object. what are the hscript-func's for that?

btw: thankx a lot for your suggestions up to this point

-elderic

Attachments:
addCentroidPoint.hipnc (45.2 KB)

User Avatar
Member
7868 posts
Joined: 7月 2005
Offline
elderic
I want to get rid of the absolute path “/obj/box_object1/box1” to something more local like “./box1” (which doesn't work)

It doesn't work because “.” means the current node. You probably want to go UP a level first like, “../box1” if it's a node at the same level. You might need more “../” in front if it at a different level, etc.
User Avatar
Member
7868 posts
Joined: 7月 2005
Offline
elderic
2. how do I orient the box to the face normal at that position?

The Copy SOP will by default orient according to the point's N and up attributes. Here's an example for creating the N attribute using the prim() expression to transfer the primitive's normal to the point.

Attachments:
addcentroidpoint_159.hipnc (52.5 KB)

User Avatar
Member
24 posts
Joined: 2月 2006
Offline
kk, I think I understood opinputpath and the point-node now.
And I see where my error was with the “./box1” expression.

thankx a thousand
Have a nice week!

-elderic
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
hi guys,

this is an interesting topic!
i tried this whole thing by my self and somehow my copied box is rotated unexpectedly. I don't get it, my expressions are correct, aren't they?
here's the hip file, maybe anyone can figure it out!

greetings,

Manu

Attachments:
align to point.hipnc (54.0 KB)

http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
678 posts
Joined: 7月 2005
Offline
Go to your pointSOP and on particleTAB add Up vector and set it to .
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
ok! thx, it's working!
but can you maybe explain the up vector to me? never heard of this before?!
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
577 posts
Joined: 11月 2005
Offline
hi manuel,

if You use N to orient Your copies, they are only restricted to one axis, but they still have the freedom to rotate 360 degrees around this axis. not defining a upvector is unsafe. by adding a upvector You get them locked to a specific orientation. iksystems also use a upvector, for example

Martin
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
ok! that makes sense.
Although the help in houdini is the best i've ever seen, sometimes it lackes of some detailed explanation! :?

greetings,

Manuel
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
621 posts
Joined: 8月 2008
Offline
i am trying to understand the opinputpath expression that you use,
you put it on the prim () to get the polygon, but
why you use
prim(opinputpath(“.”,0),5,“N”,0)
prim(opinputpath(“.”,0),5,“N”,1)
prim(opinputpath(“.”,0),5,“N”,2)

why you set those numbers in that particular order?
i am assuming the 5 is the # of the polygon. N for the Normal and the 0 1 and 2?

if i want to set a point in the middle of several primitives? (Polygons) i can change the “5” for the name of that group right?


thanks .
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
All the functions are documented in the help and in the textport.

Open a Houdini textport.
Type in the textport:
exhelp opinputpath

then type

exhelp prim

All the arguments to the functions are documented and many have other examples for you to study.
There's at least one school like the old school!
  • Quick Links