Found 860 posts.
Search results Show results as topic list.
Technical Discussion » Point cloud: Where does this web-like pattern come from?
- Soothsayer
- 861 posts
- Offline
It's a Moiree effect. I dipped my toe into a rabbit whole and it seems material scientists can exploit these patterns to detect faults in materials when under stress. Lot's of maths involved. Traditionally of course it's been a way to make colors with offset printing. Look up lattice moiree effects.
Technical Discussion » How to - ONNX Inference on volumes ?
- Soothsayer
- 861 posts
- Offline
Does anybody know of an example of the onnx inference SOP on volumes?
I can get it to work on points but if I try volumes on the same model it always errors with
Error No volumes match.
Error occurred extracting input 1.
The data is structured the same way and volumes are the same size and resolution, and position (if that matters). I tried vdb vs volumes. They are named correctly and have sensible values as far as I can tell. Tensors are the right shape.
I have attached a test file.
I can get it to work on points but if I try volumes on the same model it always errors with
Error No volumes match.
Error occurred extracting input 1.
The data is structured the same way and volumes are the same size and resolution, and position (if that matters). I tried vdb vs volumes. They are named correctly and have sensible values as far as I can tell. Tensors are the right shape.
I have attached a test file.
Edited by Soothsayer - April 29, 2024 02:57:21
PDG/TOPs » How to access current cook value of an attribute in Python?
- Soothsayer
- 861 posts
- Offline
There's got to be an easier way but you can always make a parm and read it from there.
Technical Discussion » COP: how to convert images to frequency domain?
- Soothsayer
- 861 posts
- Offline
You can make a Python COP asset and then get fft via numpy. I tried it myself but ran into a problem with getting the right resolution (it seems to default to 128 for some reason). Anyway, here's the buggy code and maybe it gets you started.
import array import inlinecpp import numpy as np def output_planes_to_cook(cop_node): # This sample only modifies the color plane. return ("C",) def required_input_planes(cop_node, output_plane): # This sample requires the color and alpha planes from the first input. if output_plane == "C": return ("0", "C", "0", "A") return () def cook(cop_node, plane, resolution): assert(plane == "C") input = cop_node.inputs()[0] print(input.type()) xres = input.xRes() yres = input.yRes() print(xres,yres) # Get the color plane as an array. color = array.array("f", input.allPixelsAsString("C")) # Convert the color array into a NumPy array and reshape it into an image. np_color = np.array(color).reshape((xres, yres, 3)) # Separate the R, G, and B channels. r_channel = np_color[:, :, 0] g_channel = np_color[:, :, 1] b_channel = np_color[:, :, 2] # Perform an FFT on each channel. r_fft = np.fft.fft2(r_channel) g_fft = np.fft.fft2(g_channel) b_fft = np.fft.fft2(b_channel) # Combine the channels back into one array. fft_color = np.stack((r_fft, g_fft, b_fft), axis=-1) # Flatten the array and convert it back to a Python array. fft_color_flat = fft_color.flatten() color = array.array("f", fft_color_flat.real) # Use .real to get the real part of the complex numbers. # Set the pixels of the cooking plane with the FFT data. cop_node.setPixelsOfCookingPlaneFromString(color.tostring())
PDG/TOPs » Optimizing Python Script Execution in Houdini TOPs for Large Ranges
- Soothsayer
- 861 posts
- Offline
I'm working with a very large range of frames (tens of thousands), where a simple Python script processes each frame. I've noticed that running the script for each frame individually is much faster than processing multiple frames in parallel. This seems to be due to the overhead of loading Python libraries for each work item, which significantly adds up over time.
I'd like to optimize the workflow by running a chunk of work items sequentially within a single work item so that Python modules load only once, and then the script processes several frames before loading the modules again. However, I'm having trouble setting this up.
I would like to group, say, 10 work items together and run them sequentially as if they were one. So far, attempts at partitioning work items either end up processing chunks in sequence (with the loading overhead for each) or treating each work item separately, which brings me back to the original performance issue.
How do I approach this?
I'd like to optimize the workflow by running a chunk of work items sequentially within a single work item so that Python modules load only once, and then the script processes several frames before loading the modules again. However, I'm having trouble setting this up.
I would like to group, say, 10 work items together and run them sequentially as if they were one. So far, attempts at partitioning work items either end up processing chunks in sequence (with the loading overhead for each) or treating each work item separately, which brings me back to the original performance issue.
How do I approach this?
Edited by Soothsayer - April 21, 2024 04:30:29
Technical Discussion » Fit field-of-view to a BoundingBox
- Soothsayer
- 861 posts
- Offline
If you're interested, I had a similar problem and this solved it for me:
vector campos = chv('campos'); vector objectpos = chv('objectpos'); // Initial horizontal aperture float H_initial = 20.955; // Object size (A) and distance (R) from the camera float A = chf("object_size"); // Example channel referencing object size float R = distance(campos, objectpos); // Field of View (FOV) needed to fit the object at distance R float FOV_needed = 2 * atan(A / (2 * R)); // focal length to achieve the required FOV with the initial horizontal aperture @focal_length = H_initial / (2 * tan(FOV_needed / 2));
PDG/TOPs » Normalized wedge attribute
- Soothsayer
- 861 posts
- Offline
Technical Discussion » What's the reason for OpenCL Neighbor Search failing?
- Soothsayer
- 861 posts
- Offline
I have a grain sim where all grains completely vanish after a certain amount of frames. According to the docs disabling OpenCl Neighbor Search fixes that. It does but what's the reason for the failure in the first place? Memory doesn't seem to be the culprit. Can I keep the OpenCL goodness while avoiding the unpredictable vanishing problems?
Edited by Soothsayer - March 8, 2024 04:53:36
Solaris and Karma » "Render All Frames with a Single Process"
- Soothsayer
- 861 posts
- Offline
I think it avoids doing pre-render stuff for each frame again and again, regardless of whether they are animated or not, so that by switching it on it goes 'aha, all this stuff stays the same, cool cool'. It's like a postman who would stop at every house, switch off engine, lock doors, deliver, unlock doors, get in, wipe off some dirt, start the engine again, etc, vs getting out once and doing the round on foot for a while. As for downsides, I'm not sure but perhaps it avoids building up caches, general stability, and doing the whole sequence processing on every machine (if on farm).
Technical Discussion » Struggling with remapping attribs with large ranges?
- Soothsayer
- 861 posts
- Offline
In those cases I like to remap like so:
with f being a log parm and the scaling constant being for convenience.
@att = exp(-@att*a_scaling_constant*ch('f'));
with f being a log parm and the scaling constant being for convenience.
Edited by Soothsayer - Feb. 29, 2024 01:56:44
Houdini Lounge » Turn Edges into Curve
- Soothsayer
- 861 posts
- Offline
Konstantin MagnusNathan Apffel
Its hard to believe that these are the best solutions in Houdini for extracting a curve from an edge.
Houdini is a toolbox, not a toy.
That's why I like the pluralize function.
Technical Discussion » Create new flipbook without overwriting another?
- Soothsayer
- 861 posts
- Offline
Try the disconnect button on the top right. It looks like (*). There's apparently a shortcut too, Alt+Shift+I, but it doesn't work for me.
Solaris and Karma » Karma - Texture Baking
- Soothsayer
- 861 posts
- Offline
jsmackpablo_lukaszewicz
Sorry for a noob question but what is this Object ID thingy.
If instead of one pig head as in the example I would have two usd primitives pigHP and pigLP how do I tell which one is wich to the render rop? I need to mark them with some attribute with some fancy name?
Yes, the render geometry settings has Low, Cage, and High obj ID settings for correlating the primitives that are baked.
What are these ID settings? An integer, a string? Are they applied automatically and how do I find them? For example, if I have a cube and a sphere and I want a baked texture of only the sphere (but with the shadow cast from the cube, etc). Is it possible to set those ids?
Edited by Soothsayer - Feb. 22, 2024 11:02:46
Solaris and Karma » Refreshing .rat textures, how?
- Soothsayer
- 861 posts
- Offline
Solaris and Karma » Retrieving Pixel Data Pre-Save in USD Render ROP Husk Script
- Soothsayer
- 861 posts
- Offline
Using the USD Render ROP and its Husk Post Frame script, is it possible to access pixel data from the frame buffer before it gets saved to a file? I'd like to write some info about it into the exr metadata.
Edited by Soothsayer - Feb. 20, 2024 05:18:13
Technical Discussion » Clear ALL Houdini Cache?
- Soothsayer
- 861 posts
- Offline
Whenever this comes up in studios IT chuckles and says that Linux automatically releases memory and we're all mistaken, etc. Reading around tech forums and I get the same impression but anybody that has worked a decent amount in Houdini knows that in practice it really isn't the case and that caches do get 'filled up'. I'm curious to what's really going on!
Technical Discussion » solaris light linker seems a bit glitchy
- Soothsayer
- 861 posts
- Offline
I experience the same thing. I find the light linker not very usable. What other methods do people use?
Technical Discussion » [SOP] Best practice to fill in hole from alembic
- Soothsayer
- 861 posts
- Offline
Why does polyfill fail? This looks like it should work very well for this. I the geo weird in some way?
Edited by Soothsayer - Sept. 21, 2023 12:19:08
Houdini Lounge » Houdini and AI - what do we think?
- Soothsayer
- 861 posts
- Offline
Technical Discussion » Geometry Basics
- Soothsayer
- 861 posts
- Offline
I'd also say that you should be careful to see @ptnum as an index for points. @ptnum can change from frame to frame, or the ordering can sometimes change.
-
- Quick Links