Jump to content

anim

Members
  • Content count

    2,089
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    108

Everything posted by anim

  1. For each POINT in each GROUP

    your groups are not stable, it's difficult to see what you are trying to achieve here is a file which assigns i@grp_id attribute to particles (currently based on i@id) then modified Attract POP will make each particle attracted to the centroid of it's corresponding group, hopefulli it will give you some ideas ap_ParticleGravitationalAttraction_01_mod.hipnc
  2. Mesh Border Mask

    like any other attribute, use Bind VOP, specify name, in this case falloff, and keep type as float, then connect to whatever you want to drive with it
  3. Mesh Border Mask

    you can use group SOP to find the border points then Falloff SOP to get the distance and then remap as you need ts_dist_from_border.hip
  4. Distribute by size

    here is slightly modified code to Konstantin's answer to account for pivots and real bounds in case your packed pieces are already transformed float space = chf('space'); vector offset = 0.0; for(int i = 0; i < npoints(0); i++){ float bounds[] = primintrinsic(0, 'bounds', i); vector pivot = set(bounds[0], 0, 0); setpointattrib(0, 'P', i, offset-pivot, 'add'); float width = bounds[1] - bounds[0]; offset.x += width + space; }
  5. while having enough substeps and constraint iterations is important for cloth to converge, in your case you are forcing your cloth to stretch so it can't converge fully to constraint rest lengths, which may cause artifacts you are seeing as every constraint tries as hard as it can, but unlucky points around collisions will always lose as collisions will move them back you'll need to decrease Stiffness a lot to like 1000 or 10000 to allow the cloth to stretch, then furthermore increase Smoothing steps to get more even stretching also you can increase collision iterations to get better ratio of interleaved constraint/collision iterations
  6. Vellum Visualization

    look inside of Vellum Object DOP/guides node and then all the nodes between CONSTRAINTS node and switch12 node, those are responsible to compute the data on your constraint geometry, so you can get them from there and include in your setup
  7. UV to mesh with matching prim area

    math, since you are dealing with areas, which are quadratic, to compute linear scale you need to do sqrt() float currScale = detail(0, "area", 0); float targetScale = detail(1, "area",0); float scaleFactor = sqrt(targetScale/currScale); @P *= scaleFactor;
  8. Can loops be frame-dependent?

    you can compile the inside of the Solver SOP, and even do subsequent iterations within Solver SOP using internal For Loop to do subframe steps this way if you want to however to carry over the results from of previous frame you'd want to use DOPs, so Solver SOP is the most straightforward way, if you want to get more optimized version use SOP Solver DOP and invoke compiled block directly, which saves you some geometry copying between SOPs and DOPs also if your nodes are openCL you can directly use OpenCL DOP have a look at Vellum Solver DOP and see how various OpenCL and compiled SOP Solver DOPs are used
  9. Can loops be frame-dependent?

    use Solver SOP for such cases otherwise, doing it by animating iteration count, you will be paying the cost of computing all iterations every frame up until the current iteration count (so frame 100 wil compute full 100 iterations from scratch instead of one from 99 to 100 as Solver SOP would)
  10. Velocity Field/Curl Noise Workflow for flip H17

    can't check your file right now but you don't need vel field for FLIP, just v attribute on your points you can use Point Velocity SOP to add one based on various options, including Curl Noise or if you want other types of noise, you can use Attribute Noise SOP, or of course wrangles are always an option but in case you need vel field like for pyro, the intention is to rasterize your point attributes to volumes right before DOPs using Attribute Rasterize
  11. Getting view 2d rect from 3d geometry

    you can maybe generate your square in SOPs using toNDC() then bbox and isolate front face then back to object space fromNDC() then use hou.GeometryViewport.mapToScreen() to get viewport coordinates of any of it's points if you have any object level transform you may need to apply it before using mapToScreen()
  12. doesn't seem to be that much more lots of particles, that live short amount of time, emitted from already very nice footage, advected by generated motion vectors then whether you use plain POP Solver, FLIP or Grains may change the feel a bit, but overall I don't think there is something you are missing
  13. that's how VEX evaluates since it's based on SIMD architecture so each instruction computes in parallel for all elements before it goes to next instruction, hence all the prints before the for loop the single print of last_clean=0 may be due to the fact that it is the same for all the points cause it doesn't contain any varying variables if you don't want to process your points in parallel, you can always loop through them in detail mode sequentially, even though I don't think it's necessary in your case. but really depends on what you are trying to achieve
  14. in your sphere_rest_sim_dopnet you can notice that skin object is erroring out that's because it can't find the specified proxy volume geo, if you put ../../sphere_rest_sim/SKIN_COLLISION_VOLUME in there it should fix it also to speed things up, you may want to use Vellum to simulate the hair
  15. Translate bulge along path

    it's because Bulge shelf tool will extract the metaballs from the metaball object and ignore all the constraint you can instead use Object Merge (with Into This Object mode) to merge your metaball into the tube object and plug into the bulge, that way it will always refer to the path constrained object and update accordingly to control the position along path just dive inside of the constraint network and edit Position parameter on Follow Path CHOP but maybe easier is to just use Carve SOP to extract point from position on the curve and copy your metaball there, see the file bulge_along_curve.hip
  16. restlength is a primitive attribute of the ConstraintGeometry, but by default both SOP Solver and Geometry Wrangle run on Geometry data so change SOP Solver/Data Name or Geometry Wrangle/Bindings/Geometry to Constraint Geometry and run over Primitives because you are setting stopped to 1 on your group1, but you are not setting it to 0 for all other points so when you move your group our of the way, it will simply not set 1 to any points, but there is nothing to set already stopped points to 0 so they stay stopped
  17. H16.5 SourceVolume vs H17 VolumeSource

    H17 has a new DOP node called SOP Merge Field, which can directly get volume from SOPs and merge it into a DOP volume using various modes and options that means that a lot of old workflows by creating temporary fields are not necessary anymore you can still create intermediary fields if you need to yourself, just specify non existing field name in Target field and it will be created (you may want to use Copy mode for that), then use it for whatever you want I find H17 workflow more streamlined, from user perspective as well as underlying design
  18. Manipulating points with noise (vex)

    the reason is that you are not updating the pos for your noise function, you simply generate one vector using noise and use for every iteration in the loop, which will always be linear make sure you sample the noise every iteration using updated pos
  19. something like this maybe? @P.x = min(@P.x, 0.75); this will not allow any of the points to be further in X than 0.75 so as your line is expanding it will not go past 0.75 in X
  20. Understanding rand()

    you have mismatched parentheses, try this: fit01(rand($F), 2.5, 2.9)
  21. Change HDA file version with Python

    just extract the info you need to another list for example defpaths = [d.libraryFilePath() for d in defs] indices will match, so you can use index() method from python list object to get index of a specific path if you want and then use that to get definition from def list or you can build dictionary directly defdict = {d.libraryFilePath(): d for d in defs} and then just get the definition based on the path key and set it to preferred if found you can have namespace versioned assets and still save each of them to different library so you can have 1 library file per type definition if you want and since each type will be versioned, you can just change your node type and it will use it's preferred definition which is the only definition it has, so there will be need to change preferred definition overall just try to get a good understanding of what namespaced type is, how it ties to definition and how definitions tie to libraries, then you can pick the workflow that suits your needs
  22. Change HDA file version with Python

    that all being said, you need to think twice if this is the workflow you want all nodes of the same type are sourced only from your preferred library per hip file so if you change the path to the type definition, it will switch this to all the nodes of that type (as they all share the same definition) this can be dangerous and is not suitable for versioning tools that you want to keep multiple versions of in the same hip file however it can be beneficial for the utility tools that you want to keep up to date all the time and don't really care that they may break backward compatibility (as it will change all existing nodes to preferred definition) on the other hand, versioning by namespacing the type, will allow you to have multiple versions in the same hip file and even if you open the old scene with an older type it will be intact, so it's much safer workflow for that
  23. Change HDA file version with Python

    you can set it using hou.HDADefinition.setIsPreferred() to get the list of all installed definitions for certain type do hou.NodeType.allInstalledDefinitions() so overall you would do something like this: import hou node = hou.node('/obj/path/to/my/node') type = node.type() defs = type.allInstalledDefinitions() # and then set whichever one you want defs[1].setIsPreferred(True) obviously you can use the list of definitions to find desired path in there by library path and if found then set it as preferred, or whatever you plan the logic to be
  24. on your generator CHOPs you can set Channel Range to be Use Current Frame Some CHOPs have also the Time Slice checkbox but it ultimately depends on your CHOP net and what's happening in there, if you are grabbing Geometry, channels, how you are exporting it back to your scene, etc.
×