Arthur Spooner Posted January 29, 2016 Share Posted January 29, 2016 Hi, I'm searching for when you can for example in a Ty do the following or similar command bbox("") in the documentation, what is this called ? Quote Link to comment Share on other sites More sharing options...
DanBode Posted January 30, 2016 Share Posted January 30, 2016 are you looking for the "exhelp" Hscript command? Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted January 30, 2016 Author Share Posted January 30, 2016 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 Quote Link to comment Share on other sites More sharing options...
f1480187 Posted January 31, 2016 Share Posted January 31, 2016 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. on_top.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted January 31, 2016 Author Share Posted January 31, 2016 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 ? 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 ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted January 31, 2016 Share Posted January 31, 2016 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: 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 Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted January 31, 2016 Author Share Posted January 31, 2016 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 ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted January 31, 2016 Share Posted January 31, 2016 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. Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted January 31, 2016 Author Share Posted January 31, 2016 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 ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted January 31, 2016 Share Posted January 31, 2016 Here the bounds. There may be many issues, mostly about wrong choice of value you need. Just upload your scene. Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted January 31, 2016 Author Share Posted January 31, 2016 (edited) 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 January 31, 2016 by Arthur Spooner Quote Link to comment Share on other sites More sharing options...
f1480187 Posted January 31, 2016 Share Posted January 31, 2016 Here. Take a look. Basic_Procedural_Scene_fix.hipnc Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted January 31, 2016 Author Share Posted January 31, 2016 That is a cleaner method then what was presented in the tutorial Box2 doesn't sit on the grid; I tried changing the expression in the transform2 node ? Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted January 31, 2016 Author Share Posted January 31, 2016 When I insert a transform node for box1 with the expression $YMAX it rests on the grid, then I have z-fighting or overlapping, whatever you want to call it as box1 & box2 overlap or z-fight Quote Link to comment Share on other sites More sharing options...
f1480187 Posted January 31, 2016 Share Posted January 31, 2016 (edited) 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 January 31, 2016 by f1480187 Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted January 31, 2016 Author Share Posted January 31, 2016 Box1 is still not sitting on the grid, even after reverting the construction plane to default ? Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 1, 2016 Author Share Posted February 1, 2016 I'd still like to know what D_ stands for D_YMAX/YMIN etc ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 5, 2016 Share Posted February 5, 2016 A naming convention. Stands for word "dimension", i guess. In $HFS\houdini\vex\include\math.h you will see some constants definitions. They all use prefix M_* for "math". It is a VEX language, however, not HScript Expressions, but the idea is the same. Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 5, 2016 Author Share Posted February 5, 2016 I was informed that D_ stands for define ! HScript expressions don't use the prefix M_, D_ etc only VEX ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 5, 2016 Share Posted February 5, 2016 D_ stands for define ! Pretty common, actually. And no, there is no restrictions on such names for most of the languages. It is a mere naming convention. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.