Jump to content

Command Name ?


Arthur Spooner

Recommended Posts

I want to link a Ty to another bbox, when typing bbox("../) I'll get a list of properties.  I want to know what is bbox as well other values and what d_min, d_max values are ? I've attached a scene file to which I'm having problems, I want, when translating the lower box for the upper box to move as well, hopefully the scene file will make things clearer. :)

 

 

Basic_Procedural_Scene.hipnc

Link to comment
Share on other sites

D_*s are enumeration available inside expressions, probably to ease use of expression functions like bbox(). You can use it in any numeric field to see that they are simple nine numbers from 0 to 8: D_XMIN = 0, D_YMIN = 1, ... You can use bbox("path", 4) instead of bbox("path", D_YMAX) for example. Maybe there is a list of such "globals" somewhere exists, not in help, according to file contents search. Maybe there is no other such "convenience variables" in Expressions.

 

sqBTWeu.gif

on_top.hipnc

  • Like 1
Link to comment
Share on other sites

D_*s are enumeration available inside expressions, probably to ease use of expression functions like bbox(). You can use it in any numeric field to see that they are simple nine numbers from 0 to 8: D_XMIN = 0, D_YMIN = 1, ... You can use bbox("path", 4) instead of bbox("path", D_YMAX) for example. Maybe there is a list of such "globals" somewhere exists, not in help, according to file contents search. Maybe there is no other such "convenience variables" in Expressions.

 

 

I watched a tutorial where the author literally types D_YMAX; and it worked although Houdini changed the Xform node to transform node while in the tutorial the author uses a xForm node, if that means anything ? 

 

What do those nine numbers (0-8) represent, do they have any meaning as to if I use "2" instead of "7" or "4" instead of "7" etc and if they are in the documentation; what do I search for in the documentation ?

 

For the second transform node, I entered the following and all worked; as you suggested although ...

bbox("../transform1/",4)

when I change the size (Y) of bbox1, both bbox2 & bbox1 have geometry overlap; my guess there is as problem with the MIN / MAX values ?

 

post-15586-0-50153900-1454260693_thumb.p

 

Why must I use two transform nodes, one for MIN/MAX the other for the expression, couldn't they be combined into one transform node ?

 

 

 

Link to comment
Share on other sites

1. I don't really know about old nodes, since I'm relatively new user too. Or maybe they just type something like $YMAX? Which is local variable defined on transform node, and similar to bbox(opinputpath(".", 0), D_YMAX). It is a lowest value of the bounding box. You can MMB on geometry node to see bounding box information, which is what you will get when use locals ($ZMAX, $CEX, $SIZEX, etc.) or bbox function:
post-13104-0-95789100-1454264752.png
 
2. docs:expressions/bbox. I'm not seeing any more info in docs.

D_XMIN   0
D_YMIN   1
D_ZMIN   2
D_XMAX   3
D_YMAX   4
D_ZMAX   5
D_XSIZE  6
D_YSIZE  7
D_ZSIZE  8

 
3. First transform transforms input, you can play with parameters. There is no need for it. Second is your on-top-placer. Third is just another example, with multi-line expression where we create a new variable in same style. Again, no need. You can delete first and third, then correct expression on second, referring to deleted node, by pointing it to a first box.
 
Actually, there is a case when two transforms are working well. Because of locals being evaluated before, there will be overlapping if your resulting scaling or rotating expands outside bbox of the input geometry. See a new example. Use switch to view difference.

overlap.hipnc

Link to comment
Share on other sites

1. I don't really know about old nodes, since I'm relatively new user too. Or maybe they just type something like $YMAX? Which is local variable defined on transform node, and similar tobbox(opinputpath(".", 0), D_YMAX). It is a lowest value of the bounding box. You can MMB on geometry node to see bounding box information, which is what you will get when use locals ($ZMAX, $CEX, $SIZEX, etc.) or bbox function:

 

 

If the bounds are 0.5, 1.2, 0.5 does that mean D_YMIN (1) ?

 

3. First transform transforms input, you can play with parameters. There is no need for it. Second is your on-top-placer. Third is just another example, with multi-line expression where we create a new variable in same style. Again, no need. You can delete first and third, then correct expression on second, referring to deleted node, by pointing it to a first box.

 

 

Sorry I didn't understand ? :)

Link to comment
Share on other sites

1. Bounds are two points of min and max - corners of the cube. Other corners, center and any box data can be easily computed from them. You can see on the picture above there are two rows with six values (the latter row have no word before it). They are X, Y and Z coordinates for min and max points. bbox() will return them, depending on arguments you pass to this function. D_YMIN is always 1. Actually, developers may rewrite bbox function to get strings, not numbers, and make those constants to be string values instead. Your scenes won't broke, like if you just passed numbers. It also easier to remember. That a common use case of constants. AFAIK there is no meaningfull use for it outside bbox function and you generally just shouldn't concern a lot about D_YMIN.

 

2. No, you don't have to use multiple transform nodes. For case where multiple is useful, see an attached scene.

Link to comment
Share on other sites

The bound for box1 would be -0.5, 0.5, (x,y,z) correct ?

 

What do you mean the latter row have no word before it ?

 

How can you know what bbox expression to apply based on the min and max bound values for x,y,z ? I want to know why my geometry is overlapping and my theory is, it has to do with the bbox expression ?

Link to comment
Share on other sites

Wait, I think I figured something out; bbox is x,y,z so if I want a box (bbox) to be on the maximum Y, I use Y_MAX expression ? :)

 

bbox1 - $YMAX (translate Y node)

bbox 2 - $YMAX (translate Y node)

bbox2 - bbox("../transform1/",1) (translate Y node)

 

box2 when changing the size on Y should move box1 as well, not the case :(

 

I upload the scene; I'll update this post.

Basic_Procedural_Scene.hipnc

Edited by Arthur Spooner
Link to comment
Share on other sites

1. No, the actual grid shifted. A small bug occur for me sometimes. Use viewport's corner menu: [persp1] > Set Construction Plane > Reset to Defaults.

 

2. Always use reference to latest node you want to account for. You still reference box1 in transform, change it to new node.

Edited by f1480187
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...