Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


iamyog last won the day on November 10 2015

iamyog had the most liked content!

Community Reputation

59 Excellent

About iamyog

  • Rank

Contact Methods

  • Website URL

Personal Information

  • Name
    Anthony Arnoux
  • Location

Recent Profile Visitors

4,417 profile views
  1. Flatten VDB sdf from multiple VDBs?

    a VDB combine with "Flatten all A" in the collation drop down menu and "Minimum" in the operation should do.
  2. Edit SOP (spherify)?

    Not fixing the overlapping edges of course, but a revised version of the code could be vector _min, _max; getbbox(0, _min, _max); vector _ctre = _max - ((_max - _min) * 0.5); // compute centroid vector _size = _max - _ctre; // find longest distance to centroid float _radius = length(_size); @P -= _ctre; // realign to centre of the world @P = lerp(@P, normalize(@P) * _radius, ch("bias")); // spherify @P += _ctre; // reposition in world It will spherify any object wherever it is in the world while maintaining a sense of scale.
  3. scale source by velocity

    float _speed = length(@vel); _speed = fit(_speed, 0, ch("max_vel"), 0, 1); _speed = chramp("remap_speed", _speed); @density *= _speed; in a volume wrangle
  4. disregard notes given in dailies ?
  5. Control Animation of Individual Pieces

    not to whine but there's an answer without copy stamp in your other topic:
  6. Control Animation of Individual Pieces

    assuming you have pieces neatly separated, kind of what a voronoi fracture would output you, you can just pack via an assembleSOP (check "create Name attribute" and "create packed geometry"). This will give you one packed primitive per piece and thus one point. You can manipulate them as you need via the intrisic attribute "transform" A point wrangler running this code should get you on the tracks. float _seedpiece = rand(@ptnum); // multiplier per piece float _seed = fit01(_seedpiece, 0.5, 1); // unique rotation speed multiplier float _startframe = ch("startframe"); float _fadeout = ch("fade_out") * _seedpiece; matrix3 _m = ident(); // initial transformation matrix float _angle = (clamp((@Frame - _startframe), 0, 1000) * _seed) * ch("speed"); vector _axis = set(rand(@ptnum + 1), rand(@ptnum + 5), rand(@ptnum + 9)); // random rotation acix _fadeout = 1 - fit(clamp(@Frame - _startframe, 0, _fadeout), 0, _fadeout, 0, 1); vector _scl = set(_fadeout); rotate(_m, _angle, _axis); scale(_m, _scl); setprimintrinsic(0, "transform", @ptnum, _m);
  7. a VEX solution int ls [] = array(); if (inpointgroup(0, "in", @ptnum)) { ls = neighbours(0, @ptnum); for (int i=0; i<len(ls); i++) { setpointgroup(0, "neighbours", ls[i], 1); setpointattrib(0, "Cd", ls[i], {1,0,0}); } }
  8. Detect Edges of n sided holes

    I cannot download your file (.rar) but you can try using a divideSOP with Remove Shared Edges activated, then delete any primitive that has an area above a certain threshold: in a primitive wrangle: float measured_area = primintrinsic(0, "measuredarea", @primnum); if (measured_area > ch("th")) removeprim(geoself(), @primnum, 1);
  9. Open thought after wandering a bit on the Discord channel: A search function is said to be coming on Discord but I cannot see how it can compete with a good old search that returns a full-of-info post from years ago on a forum. Discord brings more chats on the moment, with solutions for the person asking, not lasting more than a few lines and lost forever. And yes I know about pinned post. Many "easy" questions would find an answer with a simple search on odforce/sidefx but users are more likely to simply ask. Forums tend to create rather richer discussions, showing different approachs, hip files, fancy gifs and the occasional [insert_houdini_guru_name_here] genius idea. Some topics are even brought from the dead months/years later and completed with up to date informations. I can hardly see Discord having a similar depth of knowledge after a few years. Also, I'd happily refresh odforce during a work day, waiting for a cache. Topics are organised and you can easily read what you are interested into. Discord is harder to catch up as it can go into many cross discussions within the same channel (#hou-effects can encompass a lot of things) and I'm less willing to spend my work day reading a chat. Muting #lounge is not enough. I've got nothing against a Discord channel, it does not serve the same purpose, but I hope it will not drag quality content out of the forums. Closing thought: seems like I'm gently knocking to the old geezers' door
  10. primuv() should do: http://www.sidefx.com/docs/houdini/vex/functions/primuv
  11. export velocity into vdb from pyro sim

    You can have velocity where you have no density. DOP networks are using Houdini volumes so all fields should have the same dimensions and "weight", I mean, filesize. Since you convert to VDB you are scrapping out useless voxels. If you have the situation described above, each VDB cached field would have a different filesize, well, at least for density and vel. vel.x, vel.y and vel.z should be have the same file size since they are all part of the same original field. To import a field from a DOP network, use DOPImportField rather than a DOPImport. if you want to double check which voxels will be stored: after your VDB conversion, add a blastSOP and keep only one of your field then lay down a VDB Visualize Tree where you change the Active Voxels dropdown to Points. Depending on which field you keep in your blast SOP you might see more or less points. More points = more voxels = more Mb to store.
  12. Connectivity and Foreach problem

    I'm not sure about what you are trying to do ? the foreach is behaving as expected, you've got access to each set of connected primitives at a time. If you want to work on the whole "asset" (just confirming we are talking about 'torus + boxes' or 'boxes + spheres', anything coming out of the ASSET_MDL) you have to define your class attribute per asset, not per set of connected primitives. Add an attribwrangler set on primitive mode before each one of your black nulls and define a class attribute manually per asset: @class = 0; // or @class = 1; etc, But in that case I don't understand why you want to go through a foreach approach and not do your operations before the merge.
  13. I do not actually have an answer but just wanted to share a thing: I'm not sure the lost of precision is coming from the conversion from string. if you run @base = 123456789; @div = pow(10, 9); @RESULT = @base / @div; RESULT will return 0.1234567 instead of 0.123456789 not sure where to go from there though.
  14. in an attribWrangle: vector _ndc = toNDC("/obj/cam1", @P); float _errorx = ch("errorx"); float _errory = ch("errory"); float _errorz = ch("errorz"); if ((_ndc[0] < 0 - _errorx) || (_ndc[0] > 1 + _errorx)) removepoint(geoself(), @ptnum); if ((_ndc[1] < 0 - _errory) || (_ndc[1] > 1 + _errory)) removepoint(geoself(), @ptnum); if ((_ndc[2] > 0 + _errorz)) removepoint(geoself(), @ptnum); update the path to your camera, then set your error margins accordingly
  15. Attribute VOP neighbour node

    Since you plugged ptnum into the length of "for_begin1", I believe you are misunderstanding how the for loop works in an AttribVOP. An attribVOP, or a attribwrangle set on anything else than detail mode, will process all of your points at the same time through all the cores available on your CPU. It is NOT a linear iteration through all points. When you plug ptnum into the length input of a for loop, you are actually telling the attribVOP to loop for ptnum'th times. The way you connected your nodes means: - For point 0, please loop 0 time. - For Point 1, please loop 1 time and import the Pstate attribute where ptnum == length (import Pstate from point 1) - For Point 899, please loop 899 times and import the Pstate attribute where ptnum == length (import Pstate from point 899, but do it 899 times...) Regarding the snippet2, the constant is just a blank attribute created outside the snippet that I then fill with the correct point number value. When you plug a constant in a snippet, it generates the corresponding output for you (try it by yourself). I'm using this output for the rest of the loop. If I did not plugged the constant pt_to_process in, I would have had to use either the row_point array or the iteration attribute blue arrows ouputs to carry on my loop. Since I want to keep them clean for their own purpose, I created the constant and used it to ouput the data I needed. pt_to_process does not fetch anything, it is just a placeholder created before where I store the correct data I've found.