Found 1562 posts.
Search results Show results as topic list.
Houdini Learning Materials » Pragmatic VEX: Volume 1 [4K] [H20]
- animatrix_
- 4531 posts
- Offline
Pragmatic VEX: Volume 1 aligns with the evolution of Houdini 20. We've integrated the new applicable features and VEX functions into our course, ensuring you learn the most efficient VEX production techniques, so you can stay ahead in the rapidly advancing field of visual effects.
Technical Discussion » Manipulating VDBs in OpenCL SOP Node?
- animatrix_
- 4531 posts
- Offline
In Houdini 20, OpenCL SOP and Gas OpenCL DOP can write to VDBs;
https://www.sidefx.com/docs/houdini/news/20/vex.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/news/20/vex.html [www.sidefx.com]
Technical Discussion » iterating over / writing back to vdb's with the openCl sop
- animatrix_
- 4531 posts
- Offline
In Houdini 20, OpenCL SOP and Gas OpenCL DOP can write to VDBs;
https://www.sidefx.com/docs/houdini/news/20/vex.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/news/20/vex.html [www.sidefx.com]
Houdini Lounge » H20 - hidden gems - post them here
- animatrix_
- 4531 posts
- Offline
eikonoklastes
As a Dvorak layout user, the new keymapping script ability is massive for me. It took me about a minute to define my Dvorak layout in the text file, and Houdini now just works natively with that layout, without me having to even open the Hotkey Manager.
Beautiful stuff.
I sent an RFE for the core issue years ago, so glad to see it implemented in H20. It's quite massive for the people who are aware of this issue
Houdini Learning Materials » Houdini Shorts
- animatrix_
- 4531 posts
- Offline
3rd Party » Supercharged H20 extension (TouchDesigner Style)
- animatrix_
- 4531 posts
- Offline
Supercharged extension is updated to be fully compatible with Houdini 20. It also implements the latest changes to be more in line with the latest API, such as the new hotkey standard to use unmodified keys:
https://www.sidefx.com/docs/houdini/news/20/hotkeys.html [www.sidefx.com]
The new version is freely available to existing users. Enjoy
https://www.sidefx.com/docs/houdini/news/20/hotkeys.html [www.sidefx.com]
The new version is freely available to existing users. Enjoy
3rd Party » Supercharged H20 extension (TouchDesigner Style)
- animatrix_
- 4531 posts
- Offline
raumafu
I have found this function inside utility.ui and i'd like to use this function with a hotkey inside a wrangle but when i assign a hotkey to this function inside a hotkey editor, it just doesn't work. How can i use this? My workaround is that i click an empty space in the parameter window, press the hotkey then ctrl + v paste the number inside a wrangle. Is this the correct behavior?def pasteRandomNumber(digits=4, decimals=4): rnd = np.random.uniform(0, pow(10, digits), 1)[0].round(decimals=decimals) hou.ui.copyTextToClipboard(str(rnd)) key = QtGui.QKeyEvent(QtGui.QKeyEvent.KeyPress, QtGui.Qt.Key_V, QtGui.Qt.ControlModifier, "V") QtWidgets.QApplication.sendEvent(QtWidgets.QApplication.focusWidget(), key)
Normally it should just work that. Basically the code generates a random number, copies it into the clipboard and then invokes Ctrl+V. So it should paste this number wherever the caret is currently.
Houdini Indie and Apprentice » Open CL Snippets (search for examples)
- animatrix_
- 4531 posts
- Offline
Alt_stage
What do you think about the built-in macros in the OpenCl SOP node that can be activated by clicking the "Enable @-Binding" checkbox? Does it make sense to understand how to use them or is it better to immediately learn pure OpenCl? What do you think about the performance when using these macros?
They are great. SESI did a great job in making the OpenCL syntax higher level so people can write the same code faster and the same equivalent code without the new changes would be a lot more verbose.
The vast majority of the code examples in Houdini is using the old syntax so you are better off learning that first and understanding OpenCL before you can jump to the new syntax. Gradually you can try to introduce the new syntax to your code so you can memorize it.
As for performance these are using the macro pre-processing which occurs before the actual compilation phase in programming, so they are unlikely to impact runtime performance.
Houdini Indie and Apprentice » Open CL Snippets (search for examples)
- animatrix_
- 4531 posts
- Offline
Andr
As far as I understand (correct me if I'm wrong) the issue with this OpenCL Sop is that it's missing all the super useful vex functions and you have to implement the logic from scratch, which might be daunting.
Yes that's one of the major challenges when using OpenCL over VEX. You are out of luck if you want to perform arbitrary ray intersections against a polygonal geometry like you do using intersect VEX function. AFAIK SideFX doesn't have any plans to implement this in OpenCL.
Houdini Indie and Apprentice » Open CL Snippets (search for examples)
- animatrix_
- 4531 posts
- Offline
Alt_stageanimatrix_Could you please advise what I can read to better understand how to use OpenCl in HOUDINI, as well as the syntax for the OpenCl SOP node itself? (except for the links that I already provided in the first post). Perhaps you know where I can find examples of use?
OpenCL is more suited when you have complex calculations per point or per voxel especially with high number of iterations.
The best resource is from SideFX. You can search the Houdini install directory for *.cl files. That should already be thousands of lines of code. Sometimes SESI uses OpenCL code snippets for example in nodes like Attribute Blur SOP, and sometimes it's mixed for example in Shallow Water solver SOP.
After that you can look into more GPU based resources like GPU Gems:
https://developer.nvidia.com/gpugems/gpugems/contributors [developer.nvidia.com]
You can try to adapt these examples to OpenCL and whatever else you want to solve.
I might also release an advanced OpenCL course called Pragmatic OpenCL for Houdini in the future, possible after Pragmatic VEX: Volume 2 or 3
Houdini Indie and Apprentice » Open CL Snippets (search for examples)
- animatrix_
- 4531 posts
- Offline
OpenCL is more suited when you have complex calculations per point or per voxel especially with high number of iterations.
Things like volume convolution, volume blur, volume sharpen, any COP-like filters, mesh smoothing, etc.
For example if you implement the same paper for the Smooth SOP using OpenCL, it will most likely dominate the C++ version in performance but it would require a linear solve, etc. Implementing this in OpenCL without using external libraries would be quite challenging so you could try using the new Linear Solver SOP:
https://www.sidefx.com/docs/houdini/nodes/sop/linearsolver.html [www.sidefx.com]
But then you will lose out some of the GPU gains.
Things like volume convolution, volume blur, volume sharpen, any COP-like filters, mesh smoothing, etc.
For example if you implement the same paper for the Smooth SOP using OpenCL, it will most likely dominate the C++ version in performance but it would require a linear solve, etc. Implementing this in OpenCL without using external libraries would be quite challenging so you could try using the new Linear Solver SOP:
https://www.sidefx.com/docs/houdini/nodes/sop/linearsolver.html [www.sidefx.com]
But then you will lose out some of the GPU gains.
Technical Discussion » Vector Rotation around a Line between two vectors
- animatrix_
- 4531 posts
- Offline
In Houdini 20, you can do the exact same thing using the new slerpv VEX function:
https://www.sidefx.com/docs/houdini/vex/functions/slerpv.html [www.sidefx.com]
Thanks to SESI for adding this function to built-in VEX functions based on my RFE on the H20 beta.
https://www.sidefx.com/docs/houdini/vex/functions/slerpv.html [www.sidefx.com]
float s = float ( @ptnum ) / ( @numpt - 1 ); vector v0 = { 1, 0, 0 }; vector v1 = { -1, 0, 0.01 }; @N = slerpv ( v0, v1, s );
Thanks to SESI for adding this function to built-in VEX functions based on my RFE on the H20 beta.
Technical Discussion » Calculating eigen vectors for a given matrix with VEX
- animatrix_
- 4531 posts
- Offline
N-Ganimatrix_N-G
Thanks a lot, man!
I'm just curious to know why SideFX doesn't add the eigenvector function to VEX!
VEX have svddecomp (singular value decomposition). I posted an example of it here:
https://www.sidefx.com/forum/topic/84345/#post-364636 [www.sidefx.com]
This is one of the topics I plan to cover in Pragmatic VEX: Volume 2.
Thanks a lot, dear @animatrix.
I am in doubt if SVD decomposition can yield eigenvectors of a matrix, instead, it gives eigenvectors for matrix times transpose of the matrix!
Sorry I didn't see your reply but for the record:
If your matrix is symmetric, you can use diagonalizesymmetric which computes the eigenvalue decomposition of a symmetric matrix: which is guaranteed to have a real spectrum. VEX doesn't have eigenvalue decompositions for general matrices since they would require complex numbers.
There is also eigenvalues VEX function that predates diagonalizesymmetric:
https://www.sidefx.com/docs/houdini/vex/functions/eigenvalues.html [www.sidefx.com]
There is an RFE to support non-symmetric matrices for eigenvalue decomposition: #132742. So feel free to bump that up if you want to see it in a future version of Houdini.
Houdini Learning Materials » Houdini Shorts
- animatrix_
- 4531 posts
- Offline
Andranimatrix_
New short just dropped today
video]https://www.youtube.com/shorts/d79jCZ8aN0Y [www.youtube.com]
this one is precious
Thanks a lot mate! More to come 😎
Houdini Indie and Apprentice » how to get partical bounds info of a heightfield?
- animatrix_
- 4531 posts
- Offline
Hi,
Here is one way using VEX (Detail Wrangle):
Here is one way using VEX (Detail Wrangle):
int size = chi("size"); int index = chi("index"); string volumename = chs("volume_name"); float r = 0.5 * volumevoxeldiameter ( 1, volumename ) / sqrt ( 3 ); vector res = volumeres ( 1, volumename ); int nsections = int ( res.x / size ); int x = ( index % nsections ) * size; int y = ( index / nsections ) * size; int xend = x + size - 1; int yend = y + size - 1; float minheight = 1e16; float maxheight = -1e16; for ( int ix = x; ix <= xend; ++ix ) { for ( int iy = y; iy <= yend; ++iy ) { vector p = set ( ix, iy, 0 ); vector pnew = volumeindextopos ( 1, volumename, p ); float height = volumesample ( 1, volumename, pnew ); minheight = min ( height, minheight ); maxheight = max ( height, maxheight ); } } vector p0 = set ( x, y, 0 ); vector p1 = set ( xend, y, 0 ); vector p2 = set ( x, yend, 0 ); vector p3 = set ( xend, yend, 0 ); vector pnew0 = volumeindextopos ( 1, volumename, p0 ); vector pnew1 = volumeindextopos ( 1, volumename, p1 ); vector pnew2 = volumeindextopos ( 1, volumename, p2 ); vector pnew3 = volumeindextopos ( 1, volumename, p3 ); pnew0.x -= r; pnew0.z -= r; pnew1.x -= r; pnew1.z += r; pnew2.x += r; pnew2.z -= r; pnew3.x += r; pnew3.z += r; pnew0.y = minheight; pnew3.y = maxheight; addpoint ( 0, pnew0 ); addpoint ( 0, pnew1 ); addpoint ( 0, pnew2 ); addpoint ( 0, pnew3 );
Houdini Indie and Apprentice » How to "combine" prim polylines segments?
- animatrix_
- 4531 posts
- Offline
Technical Discussion » Map by difference in hue/rgb
- animatrix_
- 4531 posts
- Offline
Hi,
Here is one way:
Store hue for each point first (Point Wrangle):
Here is one way:
Store hue for each point first (Point Wrangle):
vector hsv = rgbtohsv ( @Cd ); @hue = hsv.x;
float threshold = ch("threshold"); int pts [ ] = pcfind ( 0, "P", @P, ch("radius"), chi("maxpts") ); removevalue ( pts, @ptnum ); foreach ( int pt; pts ) { float hue = point ( 0, "hue", pt ); if ( abs ( hue - @hue ) < threshold && @ptnum > pt ) { removepoint ( 0, @ptnum ); break; } }
Technical Discussion » Grouping of interconnected points on a Geo
- animatrix_
- 4531 posts
- Offline
Hi,
Here is one way using pcfind:
Here is one way using pcfind:
int maxpts = chi("maxpts"); int pts [ ] = pcfind ( 0, "P", @P, ch("radius"), maxpts ); if ( len ( pts ) == maxpts ) i@group_pts = 1;
Technical Discussion » Best way to kill lone particles in FLIP sim?
- animatrix_
- 4531 posts
- Offline
Hi,
You can use VEX to do this iteratively inside a for loop network like this:
You can alter the radius and max point number progressively for finer tuning of deletion.
You can use VEX to do this iteratively inside a for loop network like this:
int input = chi("ninput"); float radius = detail ( 0, "pcl_radius" ); int maxpts = detail ( 0, "pcl_maxpts" ); int @nearpt = -1; float @neardist = -1; if ( input == 0 ) ++maxpts; int pts [ ] = pcfind_radius ( input, "P", chs("radius"), ch("rscale"), @P, radius, maxpts ); int count = len ( pts ); if ( ( count < maxpts ) == !chi("invert") && @ptnum != min ( pts ) ) removepoint ( 0, @ptnum );
You can alter the radius and max point number progressively for finer tuning of deletion.
Technical Discussion » How to Optimize Graphs evaluation?
- animatrix_
- 4531 posts
- Offline
Hi,
Optimization is a very vast area to cover generically and there is no one size fits all approach. It's on a case by case basis.
I cover such workflows and thought processes in my VEX course and while some of the techniques are generic, most of them are only applicable to the problem at hand.
Over time you will build up a mental library you can draw from but it takes time.
Optimization is a very vast area to cover generically and there is no one size fits all approach. It's on a case by case basis.
I cover such workflows and thought processes in my VEX course and while some of the techniques are generic, most of them are only applicable to the problem at hand.
Over time you will build up a mental library you can draw from but it takes time.
-
- Quick Links