Jump to content

Leaderboard


Popular Content

Showing most liked content on 10/27/2021 in all areas

  1. 2 points
    Hi, setdetailattrib will resolve the final result after the node finishes executing. If you want to get the min and max values inside the same wrangle node, you would have to loop over the values yourself, which would obviously be extremely inefficient performance wise. I would recommend doing it in another wrangle. This used to be the fastest method but the latest performance improvements SESI did to Attribute Promote SOP should now be the fastest of all.
  2. 1 point
    A simple setup for streaking paint on a texture: paint_streaks.hiplc
  3. 1 point
    A texture generator for image based direct lighting. This example is just using a tonemapped JPG. Though by appending ToneMap Ql the same procedure works with HDRIs, too. // INPUT vector pos_tex = set(X, Y, 0.0); vector pos_mesh = uvsample(geo_mesh, 'P', 'uv', pos_tex); vector nml_mesh = uvsample(geo_mesh, 'N', 'uv', pos_tex); float a = radians(angle); // IMAGE BASED DIRECT LIGHTING vector clr_sum = 0.0; for(int i = 0; i < samples; i++){ vector2 u = rand(pos_tex * i); vector dir = sample_direction_cone(nml_mesh, a, u); vector pos_ray = pos_mesh + nml_mesh * 1e-3; vector dir_ray = dir * range; vector pos_hit; vector uvw_hit; int prim_hit = intersect(geo_sky, pos_ray, dir_ray, pos_hit, uvw_hit); vector clr_hit = primuv(geo_sky, 'Cd', prim_hit, uvw_hit); clr_sum += clr_hit; } vector clr = clr_sum / float(samples); // OUTPUT vector color = vector(clr); assign(R, G, B, color); texture_hdri.hipnc
  4. 1 point
    depending on your mesh and accuracy there exist numerous different algorithms to compute discrete curvature, all with their pros and cons. i don't think there's a single one which works flawlessly in all situations and for all meshes. anyways, here's a file i've posted a while ago on discord with different implementations. it might be a bit confusing without the conversation we had in the chat but you can just try which algorithm works best for you. (from left to right: classical taubin tensor using integral formula, tensor using euler formula, approximated shape operator, proper shape operator in surface space, polynomial fitting) hth. petz curvature.hipnc
  5. 1 point
    On the particle surface node change the Convert To Surface Polygons. Redshift can not render a polygon soup. Go up one level and turn off Volume Rendering, the fluid is now polygons so you don't need that.
  6. 1 point
    Here is a particle setup for helicopter dust, maybe you can modify it to produce a field? For FLIP you may want to take a look at a GasVOP for modifying the field prior to being processed by the FLIPSolver. It looks basically like an expanding circle/ring with noise.
×