center of group bounding box region

   3714   8   1
User Avatar
Member
75 posts
Joined: 2月 2019
Offline
Hey All again

i know i'm annoying with my noobie questions, but i can't figure out how can i set the center of the bounding box of the group bbox region.
i successfully “stoled” the size “automatization” of this bbox, but i can't find any related info about to set the center of that.

please note that i'm not talking about the COG of the actual geometry, but the COG of the bbox of the group bbox region.

questions:
-how can i move the center of the bbox of group bbox region in the center parameter field?

and honestly i don't get these expressions. sometimes i see expression to define the size of an object:
$SIZEX, $SIZEY $SIZEZ
and sometimes (like this case) i see this:
bbox(0,D_XSIZE)

both defines the size (bbox) of the object, but for example i can't use the $SIZEX here.

Thank You for your patient
Edited by ostyascukor - 2019年7月18日 05:39:20

Attachments:
bbox_center.jpg (376.5 KB)

User Avatar
Member
40 posts
Joined: 8月 2018
Offline
don't confuse the global or local variables starting with the $ sign and the variables of the bbox expresssion function.
So…In your case, Center of x, I'd say that you want to use this expression: bbox(0,D_XSIZE)

check my 1example pic, showing this, or even with the centroid expression function for the z axis 5(in my example)

Attachments:
2019-07-18_151201.jpg (177.1 KB)

User Avatar
Member
75 posts
Joined: 2月 2019
Offline
Herve

I already use the bbox(0,D_XSIZE) to define the size (yeah i'm good ), but you centroid expression did the good thing with the pivot!

Honestly i don't know how should i start to understand these expression thingy.
For example what is the difference between the local/global variables and the expression functions?
I mean functions are also variables, right?

Maybe (no, surely!) i'm missing the fundamentals of even understand the difference between those things
I don't know when i can use the global/local variables with the $ sign, and when i can use “expression functions”

If You know any good tutorial to understand this, because i didn't find (or just missed) any good explanation.

Thank You for your useful help !
Edited by ostyascukor - 2019年7月18日 17:41:51
User Avatar
Member
75 posts
Joined: 2月 2019
Offline
It's me again

Now i have a bit more difficult challenge

I want to use the longest side of a bbox of a primitive as a measure reference to a parameter of another node
like i have a box with sides 1,2,1 and i want to use the 2 as reference, but of course the numbers can change so channel reference is not an option (i guess)). i attached a shot.

how can i:
-get the longest side of the bbox (that change later)
-i want to finetune that parameter in vex builder, and want to export (bind export is enough?)
-is there a way to use the bind export parameter as reference in a node that not even connected to the attribvop (vex builder)?

Thank You for your help and support
Edited by ostyascukor - 2019年7月20日 14:06:13

Attachments:
bboxmax_vexbuilderexport.jpg (410.0 KB)

User Avatar
Member
75 posts
Joined: 2月 2019
Offline
ahh nobody?
i know this is not a paid service, but would be crucial to know at least how can i connect my parameter created in vexbuilder with my parameters of my node created outside of vexbuilder (see attached shot above)
like i want to use that box_bbox parameter created in vex builder with Bind Export as relative reference on my translate Y parameter of the transform node…

if i can edit my parameters in vex builder, that would be a big help, because it's really hard to me to type expressions from “thin air”.
i already know what i want to type, but i don't know how to do it

i already got lot of help, but i always stuck with expressions because i used to create nodes, and if there is a way i would keep my expression edition on the level of node creation
User Avatar
Member
8539 posts
Joined: 7月 2007
Offline
just reference that attribute on your parameter with detail(), point(), prim(), vertex() expression depending on the class of the attribute

so let's assume you have attribvop2 in Detail mode and therefore your ‘box_bbox’ exported attribute is a detail attribute
then you can access it in the parameter of the next node with detail(0, ‘box_bbox’, 0) expression,
or in a parameter of a node in different branch detail('../attribvop2', ‘box_bbox’, 0)
or using spare inputs detail(-1, ‘box_bbox’, 0), etc…
Edited by tamte - 2019年7月24日 16:56:19
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
75 posts
Joined: 2月 2019
Offline
“depending on the class of the attribute”
how can i know if my (let's stay at the example) box_bbox parameter is a detail or other attribute?
i mean it's “just” a number (at least i know the type of the number, haha).
or class of attribute means where i want to use that parameter? but that makes no sense

or if You can just drop me a link with an explanatory/tutorial content would be excellent

Thanks for the ultra fast answer
Edited by ostyascukor - 2019年7月24日 17:14:40
User Avatar
Member
75 posts
Joined: 2月 2019
Offline
on the other hand i wrote my first “complex” expression

fit01(rand($PT), (ch(“../box1/sizey”)/ch(“../edgedivide1/numdivs”))-0.1, (ch(“../box1/sizey”)/ch(“../edgedivide1/numdivs”))-0.1)

a few thing i don't understand:

-i'm using this expression on a translate node's translate Y parameter (or should i call that channel instead of parameter?)
so i don't know why i have to add the $PT. because translate Y already defines that i want to work with points and i want to translate. it seems unnecessary to me.

-the 01 means what in the fit? i understand it's the range between 0 and 1. but how “long” is that range before i define my new range values. for me 01 means infinite long range along on the Y axis (where i can move my points in my transform node)

and another tricky questions (shot attached):
i want to repeat some of my “operations” as many times i want (with some cool expression defined number)
but the trick is that i want to change parameter A and B every time i repeat those operations.
like i repeat it 4 times, and i want always a different number on the place A and B

i already got the “sample” operation, and now i want to repeat it over and over with some “magic node”, until the number of the operation reaches the number i predefined in that “magic node”.

Thanks for the support in advance
Edited by ostyascukor - 2019年7月24日 19:43:13

Attachments:
repeat_operation.jpg (475.8 KB)

User Avatar
Member
75 posts
Joined: 2月 2019
Offline
about the attribute references i found this:
https://www.sidefx.com/docs/houdini/model/attributes.html [www.sidefx.com]

it says:
You can create/set attributes using the generic Attribute Create surface node, or the Vertex, Point, Primitive nodes. You can attach attributes to vertices, points, primitives (e.g. polygon faces), or the entire piece of geometry (called the “detail” level).

-what attach means?
-so detail means all the primitives, or points, or vertices, or all of those stuff in a certain geometry?
-what “only once” means at runover detail pulldown menu (it's only at there)?
why there is no only once at the other kind of attributes?

and still can't even theoretically find out how should i make that “repeat operation” with set random on “A” and “B” channels
i mean B channel is already randomized, but i don't know how to “call” that node to work in a “repeat operation”, and i also need to “call” channel A to work in that “repeat operation”.

honestly i watched lot of tutorials and still don't get how things are working
  • Quick Links