Jump to content


Popular Content

Showing most liked content on 07/12/2016 in all areas

  1. 4 points
    Have started to dabble in VEX now, thought i would try my hand at one of the easier ones to get my feet wet not 100% like his (my speed is and amount of offset I think is off) but was a good introduction! https://beesandbombs.tumblr.com/post/145701615464/noise-floor-hd-remake-of-this-older-one mountain_gif.hipnc
  2. 1 point
    You did everything right, except misunderstanding about array and vector types. Cd is a float type with size of 3, not float array. Float array types are arrays of single floats as well as arrays of vectors or matrices. attribute_copy.hipnc Here I'm trying to be robust. With a bit more complex macro, it can be expanded to all types of geometry. You will see the current VEX limitations right in the code. I also simplified the code, so, you will need to wrap it in function and foreach loop again. // Point wrangle. // Testing variable set. string name = "attrib"; int dst = geoself(); int dst_pt = @ptnum; int src = 1; int src_pt = dst_pt; // Function body. int type = pointattribtype(src, name); int size = pointattribsize(src, name); string info = pointattribtypeinfo(src, name); #define ADDSETATTRIB(declaration) \ { \ declaration = point(src, name, -1); \ addpointattrib(dst, name, defvalue, info); \ defvalue = point(src, name, src_pt); \ setpointattrib(dst, name, dst_pt, defvalue); \ } // Any of it indicates attribute not exist on source. if (type == -1 || size == 0 || info == "") error("Attribute not found"); // Integer. else if (type == 0 && size == 1) ADDSETATTRIB(int defvalue) // Float. else if (type == 1 && size == 1) ADDSETATTRIB(float defvalue) // 2-float vector. else if (type == 1 && size == 2) ADDSETATTRIB(vector2 defvalue) // 3-float vector. else if (type == 1 && size == 3) ADDSETATTRIB(vector defvalue) // 4-float vector or 2x2 matrix. Both are [4f] by default. else if (type == 1 && size == 4) ADDSETATTRIB(vector4 defvalue) // 3x3 matrix. else if (type == 1 && size == 9) ADDSETATTRIB(matrix3 defvalue) // 4x4 matrix. else if (type == 1 && size == 16) ADDSETATTRIB(matrix defvalue) // String. else if (type == 2 && size == 1) ADDSETATTRIB(string defvalue) // Integer array. else if (type == 3 && size == 1) ADDSETATTRIB(int defvalue[]) // Float array. else if (type == 4 && size == 1) ADDSETATTRIB(float defvalue[]) // String array. else if (type == 5 && size == 1) ADDSETATTRIB(string defvalue[]) // Integer vectors. else if (type == 0 && size > 1) error("Can't add %d-integer vector (Houdini 15.5)", size); // Float vectors with arbitrary size. else if (type == 1 && size != 2 && size != 3 && size != 4 && size != 9 && size != 16) error("Can't add %d-float vector (Houdini 15.5)", size); // String vectors. Can be created by promoting varmap only. else if (type == 2 && size > 1) error("Can't add %d-string vector (Houdini 15.5)", size); // Integer vector arrays. else if (type == 3 && size > 1) error("Can't add %d-integer vector array (Houdini 15.5)", size); // Vector and matrix arrays. else if (type == 4 && size > 1) error("Can't add %d-float vector array (Houdini 15.5)", size); // We forgot something. else error("Non-implemented for this kind of attributes"); // Impossible to get default attribute values in VEX in Houdini 15.5. // We will stick to what point(input, attribute_name, -1) returns. // And maybe in future it will return proper defaults, instead of zeros. warning("Default values cannot be copied, if any. (Houdini 15.5)");
  3. 1 point
    // Point wrangle. vector edge_dirs[]; foreach (int nb; neighbours(0, @ptnum)) { vector pos = point(0, "P", nb); vector edge_dir = normalize(@P - pos); append(edge_dirs, edge_dir); } vector edge_normal = normalize(avg(edge_dirs)); @N = edge_normal; Here the sample code for edge normal vector. After foreach you have an array of normalized deltas between point and it's neighbours. If you need true length vectors as an array attribute, you may simplify the code to something like this: // Point wrangle. foreach (int nb; neighbours(0, @ptnum)) { vector pos = point(0, "P", nb); append(v[]@edge_vectors, @P - pos); }
  4. 1 point
    Hey , i suggest you use particles for it , or animated geometry or a combination . You can use temperature diffusion to transfer temperature and ignite fire in a sequence . I quickly tried a couple things to get a similar motion . I didn't have time to refine it much. I'm still learning myself . Check out the attached files . Hope you find some ideas from it . Let me know if you don't get any questions ! test_07.hipnc test_08.hipnc test_09.hipnc
  5. 1 point
    Man it looks like you really love spreadsheets Let me try a little explanation on spreadsheets in Houdini if you don't mind. You are obviously going through the similar difficulties as I did when I stared learning Houdini. In general, spreadsheets are not a tool for selecting a geometry or manipulating attributes. Selecting geo with wrangle as you did is totally legit. Geometry spreadsheet allows you to see, filter and sort the attribute values on the geometry. it is giving you an overview. nothing else. no selections, no changing of values. just a list, but the essential one. Parameter spreadsheet allows you to manipulate node's parameters. It shows exactly the same thing as Parameters tab. Only it is arranged as a spreadsheet and allows you to quickly filter the objects and display desired parameters without diving into networks. Handy but other than that it doesn't have any extra functionality. Either of the spreadsheets doesn't allow you to manipulate the attributes directly. Don't confuse attributes and parameters - parameter is a part of the user interface and you can use it to drive the attribute(s) that it's connected to (i think it is safe to say it this way ). The reason for this limitation is that geometry manipulation happens with the help of nodes where these manipulations are stored. So if you do a change to the point position in the spreadsheet or in the viewport, the program has to create a node for you to do that manipulation. That happens in any modeling package automatically with the exception of Houdini where you have to create and wire the nodes yourself and that is why spreadsheet actions are kind of limited. Obviously, both approaches have its pros and cons. In non-Houdini packages you have to use sort of extensions in the form of spreadsheets and dense interfaces to access predetermined pieces of data that are otherwise hidden (cool for some tasks as it is much simpler). In Houdini, all data is exposed, many tools are disassembled and lots of user actions are therefore moved to a lower level (to the nodes) with all its advantages and difficulties. Spreadsheets are still here but they serve a slightly different purpose as you don't need them for accessing the data any more. Sorry for possibly pointing out some obvious things to you, but I find this important to understand. For me personally, this difference in how user can manipulate data and how to use it to his advantage was the toughest thing to overcome at the beginning. Hope that helps. cheers, D.
  6. 1 point
    hey shawn, is your file set to 240 fps on purpose? are you trying to make a slo-mo? about the last geo node in your autoDOP, I don't think it's the best way. might be better to simulate with a light version of the bowl, then dopimport it to the real bowl geo and use the dop transforms only.
  7. 1 point
    Been experimenting with this tonight, might give you some ideas. Did some tests a while ago with pops, replicate, interact, which works, but limits you to spheres. Was curious if you could replicate more interesting geometry. Tried with packed rbd, wires, then the grain solver, which shows the most promise. I've been doing lines (the image in my head is longish bacteria cells), but could probably be modified to support other shapes. Its not perfect, grains/pdb inherently gives you a harsh jerk when it detects collisions and does an instantaneous position change to correct it, but its very fast, and quite stable. The nice thing about this method is it uses a sop solver next to the pop/grain solver, so you can do sop tricks to do your cell division effect. It looks more naturalistic with some wind noise and drag, but I've left them bypassed so you can see just the grain solver and sop replicate do their thing. Playing with the grain properties gets all sorts of interesting effects (this is the tamest one, others do pleasingly wriggly worms or intersecting pile ups), fun stuff, albeit not exactly controllable. bacteria_v04_grain.hipnc
  8. 1 point
    i think found solution, just point vop as age > fit > density before connect to volume rasterize point, im testing now, also will play with LIFE , hope i can get it correct
  9. 1 point
    divergence.hip finite difference divergence, the difference of neighboring voxels, summed over all axes, regularized over the step size of the grid, from a cfd standpoint atleast. good fluids cheat sheet http://http.developer.nvidia.com/GPUGems/gpugems_ch38.html