Arthur Spooner Posted February 5, 2016 Author Share Posted February 5, 2016 $YMAX + bbox("../box1/", D_YMAX) This command is 1 + which is ontop of box1, how is that calculated ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 5, 2016 Share Posted February 5, 2016 (edited) $YMAX is topmost Y coordinate of input geometry. Same as bbox(opinputpath(".", 0), D_YMAX) but shorter and cleaner.bbox("../box1/", D_YMAX) is topmost Y of box1 node. The whole thing can be written as: bbox(opinputpath(".", 0), D_YMAX) + bbox("../box1/", D_YMAX) Note that $YMAX will work only on transform node, it's a local variable. Expression function will work anywhere. Also note that $YMAX and D_YMAX are totally different things, first is an actual point Y value, the latter one of aforenamed eight "integers", used to determine result you need to get from a function. Edited February 5, 2016 by f1480187 Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 5, 2016 Author Share Posted February 5, 2016 Also note that $YMAX and D_YMAX are totally different things, first is an actual point Y value, the latter one of aforenamed eight "integers", used to determine result you need to get from a function Sorry I didn't understand the latter of your explanation ? $YMAX takes into consideration the top most of box1 when it's combined with anything ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 5, 2016 Share Posted February 5, 2016 (edited) $YMAX has no idea about box1. The one who consider it is bbox function with a path to that box. Both sides will evaluate to some float values before adding. Edited February 5, 2016 by f1480187 Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 5, 2016 Author Share Posted February 5, 2016 Both sides will evaluate to some float values before adding. I don't understand how do both sides evaluate ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 5, 2016 Share Posted February 5, 2016 (edited) If you have no idea what variables and functions are, try to follow a starter's tutorial (sections 3 to 5) on Python's website. Houdini's Python Shell (Alt+Shift+p) is a typical Python interpreter, no need to install anything. If you talking about exact in-code implementation, probably only devs can answer this. Edited February 5, 2016 by f1480187 Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 5, 2016 Author Share Posted February 5, 2016 (edited) Do you know how to know what floating point values both sides evaluate too, if it's possible ? Edited February 5, 2016 by Arthur Spooner Quote Link to comment Share on other sites More sharing options...
michael Posted February 5, 2016 Share Posted February 5, 2016 a good read through the docs would really help here, and in the textport (Windows > HScript Textport) you can do: / -> exhelp -k bbox will return bbox centroid "help -k somthing" or "exhelp -k something"= when you use the -k flag the command will return all the commands or functions that have the string after the -k in them then you can do / -> exhelp bbox and you'll get float bbox (string surface_node, float type) Returns bounding box information for a surface node. USAGE bbox(<surface_node>, <type>) The <type> can be one of D_XMIN, D_YMIN, D_ZMIN, D_XMAX, D_YMAX, D_ZMAX, D_XSIZE, D_YSIZE, or D_ZSIZE for the corresponding values of the bounding box. RELATED * centroid D_XMIN etc refer to the dimentions of that component for a 1 unit box sitting on the ground D_YMIN = 0 D_YMAX = 1 D_XMIN = -0.5 (if the box is at the origin) D_XMAX = 0.5 etc the local variable $YMAX would in the above case refer to the maximum value in the Y dimension = 1 Houdini used to call a Transform node "xform" now we actually call the node "transform" but they are the same node Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 5, 2016 Author Share Posted February 5, 2016 That was helpful Michael. In other words this $YMAX + bbox("../box1/", D_YMAX); $YMAX + What do you call the path for bbox in Houdini, is it simply "path" ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 6, 2016 Share Posted February 6, 2016 (edited) 1. You can click on the parameter's label to see exact field's values. However, will not work for anything using local vars currently, showing zeros. Ctrl+Shift+LMB on parameter will forcefully evaluate it to the true value. Try this for different parts of expression, e.g. for $YMAX or for bbox("../box1/", D_YMAX) alone, or even for D_YMAX. 2. bbox function returns a float, not a string with path. The path is what you provide with the first argument - a string looking like a path. Two dots means parent network of this node, so, it is a relative path similar to something absolute like /obj/geo1/box1. Then bbox function use that path and return a number to you. There are 8 possible floats can be returned, and second bbox's argument is used to determine it. Edited February 6, 2016 by f1480187 Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 6, 2016 Author Share Posted February 6, 2016 Try this for different parts of expression, e.g. for $YMAX or for bbox("../box1/", D_YMAX) alone, or even for D_YMAX. Sorry, what do I try that is different, I have that expression in place ? What you are saying is; $YMAX is the interger and the path is a float ? How does bbox turn a path a return a float number ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 6, 2016 Share Posted February 6, 2016 Here. evaluate.hipnc Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 6, 2016 Author Share Posted February 6, 2016 transform1 & transform 3 both have the same expression ? transform 2 doesn't do anything different ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 6, 2016 Share Posted February 6, 2016 1. $YMAX and D_YMAX may look similar in some way, but they are not the same things and the values are different (if there is no coincidence). 2. $YMAX and bbox(path_to_input, D_YMAX) may look different. But, actually, they are same resulting values. $YMAX is topmost Y coordinate of input geometry. Same as bbox(opinputpath(".", 0), D_YMAX) See the docs about the function returning path. Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted February 6, 2016 Author Share Posted February 6, 2016 From my understanding in the path ("../box1/") "box1" 1 If you were to add another box or sphere or what have you that would be "box2" 2 Sorta like an array ? 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.