Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by anim

  1. Vellum's 'cloth target strength' equivalent ?

    can you post the scene?
  2. Vellum's 'cloth target strength' equivalent ?

    it's for blending rest attributes of the constraint geometry using the geometry of the third input (or provided SOP if using DOP version) literally serves the same purpose as FEM's or Wire's Rest Geometry so to morph pighead to squab it would require both to have the same topology and you 'd need to have some constraints (like cloth) on the pighead already, then plug first 2 outputs of the vellum constraint to vellum rest blend and squab to the third, then you can tweak how much the constraint rest attributes will try to match the squab shape (again, has to have the same topology) to blend over time you may want to use DOP version sorry, cant post file, don't have access to H17 at the moment
  3. Vellum's 'cloth target strength' equivalent ?

    if you set Pin to Target constraint to Soft, then you can control the strength by Stretch Stiffness (for soft position type) and Bend Stiffness (for soft orientation type) it's also present within cloth/hair constraints where it's called Pin To Animation if you however want just shape changes and not necessarily constraint your geo to a specific locations you should use Vellum Rest Blend SOP or DOP which allows you to update rest state of the constraints and therefore force your vellum object to try to assume that shape
  4. fit UV into 0-1

    you can also just use UV Transform SOP: Transform Order: Trans Scale Rot Translate X: 0.5-$CEX Translate Y: 0.5-$CEY Scale X: 1/$SIZEX Scale Y: 1/$SIZEY Pivot XY: 0.5
  5. you can use preprocessor macros for that https://www.sidefx.com/docs/houdini/vex/vcc.html#pre-processor for an example you can look at houdini/vex/include/subdcurve.h file
  6. Current Position to Shader Position ?

    from what I see you are adding 2 after you multiply with the color and 2 is way over one and since one is white x + 2 is most likely white if x was somewhere around -1..1 so I wouldn't be surprised if you are seeing white also rest can have any values so it's also possible to have way negative values, that after multiplying with positive color is still negative and +2 can still be <0 and you may be seeing black so there is no telling from the screenshot if the values are expected or not, just fit to the whole range in MPlay or RenderView to see if you are getting any values or not, and it's better to preview just output of certain nodes to directly inspect their values
  7. Plus button for dynamically adding parameters

    you can do it comfortably in vex since you can get parameter values using ch*("path/to/parm") however COP VEX context is older and I don't see a way to define Evaluation node path like in Attrib VOP so you'll probably have to use absolute paths and for that you can use opfullpath('.') the code will look something like this (careful, I added print just to test, don't use print on large images): string op = opfullpath("."); int lights = chi(op + "/lights"); for(int i=0; i<lights; i++){ string si = itoa(i); vector spot_pos = chv(op + "/spot_pos" + si); float spot_size = chf(op + "/spot_size" + si); float spot_int = chf(op + "/spot_int" + si); vector spot_color = chv(op + "/spot_color" + si); printf("\nLight%d: pos: %g | size: %f | int: %f | color: %g ", i, spot_pos, spot_size, spot_int, spot_color); } ts_multiparm_cop_vex.hip
  8. Current Position to Shader Position ?

    which patterns are you trying to create? rest or P or uv can act as coordinate input for the pattern, whether you take the coordinate value as it is or transform to different space depends on what you need rest is usually static position value in local object space, it will prevent swimming as long as the values don't change during the animation, transforming it to different space however may itself introduce swimming if that space is changing in relation to space you are transforming from, so I wouldn't recommend combining rest with transform, just use rest, or for already static geo just transform P to object space to actually get your pattern to show plug your coordinate (P, rest, uv) to some pattern generator like noise or other and then multiply with color and connect to diffuse
  9. Volume trails in VEX

    - rather than doing it in detail wrangle use point wrangle as you want trail per point - also you can create prims directly in wrangle too so no need for id - addpoint() can take reference ptnum which it will clone with all the attribs so no need to import the attribs manually - and to your question, no, it's not possible to access attributes from new points as the creation will happen at the end as a separate single threaded process, all you are doing with geometry creation functions addpoint() setpointattrib(), ... is queuing those for later here is a simple pointwrangle volume trail code: float step = chf("step"); int niter = chi("niter"); if (niter <= 0) return; int prim = addprim(0, "polyline"); vector P = @P; vector v = 0; for (int i=0; i<=niter; i++){ int pt = i == 0 ? @ptnum : addpoint(0, @ptnum); addvertex(0, prim, pt); P += normalize(v)*step; v = volumesamplev(1, "vel", P); setpointattrib(0, "P", pt, P); setpointattrib(0, "v", pt, v); } volume_trails_VEX_fix.hip
  10. - if you can make HDA from your whole setup, with control parameters promoted, you can create multiple instances with different animation easily - or if you don't want to create HDA then just create multiple copies of your control node and use CHOPs to fetch all parms from each control node, switch among them and export to main control node. Number of parameters doesn't matter as Fetch CHOP allow you to fetch them using patterns
  11. pop netork inside solver

    - use sop solver inside of popnet instead - or alternatively use VDB Advect Points inside of your sop solver to do the advection instead of popnet
  12. DOP in for-each loop

    You can't use dops inside of the for loops For what you are doing you may want to use wedging
  13. Grouping points from array

    be careful when looping over all intersected points per primitive especially with idtoprim() type of functions which have to iterate internally a bit too, it will get painfully slow with higher res geo and more intersections just look up existing ids within hits instead, example raycollisionTest_ts.hip
  14. to add new or copy existing heightfield volume (layer) you can use HeightField Copy Layer SOP and then if you need to modify it further in a way you described you can use Heightfield Wrangle or Volume Wrangle
  15. Custom struct as attribute

    it is not possible to create an attribute of a custom type defined by struct
  16. just store 'uv' attribute from your geo on wires instead of color (you can rename it if you want to have another attrib called 'uv') then you can bind this attrib directly in the shader and sample any texture to get your colors without resimming anything or any additional sop setups
  17. you can also do it directly by creating Data or Geometry Data parameter on your asset and then store or read hou.Geometry() instance by parm.set() or parm.eval() Stash SOP is just an example of such asset
  18. Current Position to Shader Position ?

    I don't think it's very important, but it's definitely not UV tangent space, seems like it's a traditional coordinate system defined by the shader, I don't think Mantra has that, but you can use any object as such coordinate system if you need to share it among all objects using that shader, or if it works for you use 'object' or 'world' or define 'rest' attrib and use that directly as Pshad what's important though is to connect your VOPs correctly, Pshad is not a parameter, it's simply the output value of add1, the input to transform1 is supposed to be P from Global Variables, and you have to multiply with baseColorFreq not baseColor as you are computing Pshad, which is a coordinate that you will use later to sample some 3d procedural pattern which you will multiply with actual baseColor if you want. In other words baseColorFreq is the float multiplier or scale of your space and can be thought as a frequency of the pattern, baseColor is actual color
  19. Current Position to Shader Position ?

    What do you call shader space? UV tangent space?
  20. Current Position to Shader Position ?

    default space in surface shader context like is camera space so space:current means camera space also all Global Variables are in camera space, so P is already in camera space if you want your P in world space, just connect it to Transform VOP and set From Space to space:current and To Space to space:world, etc.
  21. Liquid Titanium

    it looks like FLIP with varying viscosity, some initial velocity, SDF based force (towards the surface) and some directional force
  22. this may give you some insight on how to properly layer materials https://vimeo.com/212603065
  23. everyone who had to create complex constraint network relationships in the past remembers how painful and slow it was to use Apply Relationship method, while powerful at the time it was surpassed by Constraint Network which took the ideas behind common Apply Relationship constraint setups (that usually involved lines with attribs representing constraints in SOPs) and generalized it into fast, powerful and easy to use workflow so nowadays don't think twice and use Constraint Network for any complex constraint relationships of course you can still use Apply Relationship to create any other relationships if needed, however I haven't had a need for that in a very long time
  24. Simply Extract a given Subnet content

    if s is your subnet instance, then just call s.extractAndDelete() https://www.sidefx.com/docs/houdini/hom/hou/Node.html
  25. Double Lines / Edges

    is it about curves? if so appending PolyPath SOP after Fuse can help for completely overlapping primitives both PolyDoctor and Clean SOP (since it uses PolyDoctor inside) after Fuse should work to fix overlaps for more complex geo or in general rather clean up your profile geo before sweep to avoid double sweeps