SideFX: Houdini Indie and Apprenticehttps://www.sidefx.com/forum/26/2024-03-28T14:02:56+00:00Finding the source code or how the minpos function works
2024-03-28T14:02:56+00:00animatrix_418183<blockquote><em>Alt_stage</em><br><blockquote><em>animatrix_</em><br>I asked SESI many times to add this functionality, and they said they didn't have any plans to do so.</blockquote><br>Thanks for your reply!<br>Over the past few days, I managed to reproduce the minpos functionality on VEX working for polygonal meshes (the task turned out to be quite extensive since edges with points also need to be taken into account). My code at least gives the same result, but it takes much longer than regular minpos with a large number of polygons (I would estimate the complexity as H*J Where H is the number of cells to move, and J is the number of polygons in the target geo). I tried not to use high-level functions and only used cross, dot, normolize, so that the code could be transferred to OpenCl with minimal changes. It's already obvious to me a few places where I can optimize this code in VEX, but I'm not sure how these optimizations will behave in OpenCl. Alas, I don’t know where to find execution time ratings for operations/functions for VEX and OpenCl (You can, of course, create your own rating using the performance tab, but it seems like that’s too much). I also wanted to have some kind of understandable guideline (something like SOLID), so that I could understand what exactly should not be done so as not to critically lose productivity specifically in VEX and OpenCl. If you can suggest something useful, I would be grateful!</blockquote><br>I imagine SESI is using acceleration structures like Kd-tree to speed up the queries, otherwise the performance would tank while doing multiple queries or using a high res geometry.<br><br>Porting these to OpenCL you would have to use the appropriate data structures like hash grids.<br><br>If you can limit the types of geometry, you could reduce the amount of code you have to write. Otherwise xyzdist supports all kinds of geometry like NURBS albeit orders of magnitude slower than polygonal meshes (bug pending).<br><br>In any case closest point look ups, point cloud look ups, ray triangle intersections on arbitrary geometry are sorely missing in OpenCL.<br><br>As always SESI knows best.
Finding the source code or how the minpos function works
2024-03-28T11:27:05+00:00Alt_stage418163<blockquote><em>animatrix_</em><br>I asked SESI many times to add this functionality, and they said they didn't have any plans to do so.</blockquote><br>Thanks for your reply!<br>Over the past few days, I managed to reproduce the minpos functionality on VEX working for polygonal meshes (the task turned out to be quite extensive since edges with points also need to be taken into account). My code at least gives the same result, but it takes much longer than regular minpos with a large number of polygons (I would estimate the complexity as H*J Where H is the number of cells to move, and J is the number of polygons in the target geo). I tried not to use high-level functions and only used cross, dot, normolize, so that the code could be transferred to OpenCl with minimal changes. It's already obvious to me a few places where I can optimize this code in VEX, but I'm not sure how these optimizations will behave in OpenCl. Alas, I don’t know where to find execution time ratings for operations/functions for VEX and OpenCl (You can, of course, create your own rating using the performance tab, but it seems like that’s too much). I also wanted to have some kind of understandable guideline (something like SOLID), so that I could understand what exactly should not be done so as not to critically lose productivity specifically in VEX and OpenCl. If you can suggest something useful, I would be grateful!
usdmaterialpath within SOP Modify
2024-03-28T04:21:14+00:00wayward418135Here's the simple/basic code to get the usd path. This is in a Python SOP inside a SOP Modify node. This is after a Material Library and Assign Material.<br><br>node = hou.pwd()<br>geo = node.geometry()<br><br>prims = geo.prims()<br>for primN in prims:<br> val = primN.attribValue('usdmaterialpath')<br> print( 'val', val )
Grow apples on changing topology (growing) tree?
2024-03-27T21:58:41+00:00sanostol418078is the growing done with a consistent geometry, I mean, do all branches exist at the beginning, keep their vertex order and topology the same and growing just by transforming points?
Grow apples on changing topology (growing) tree?
2024-03-27T15:15:08+00:00chrisHud418025Cool that's another good idea! <br><br>The approach that I think works the best for now is to scatter them in the UV texture space that comes with the speed tree. The uv's come out animated and stuck to the geo grow animation. I should have thought of that before lol. It looks like it can be done in the scatter node in the generate option.<br><br>Thanks again!<br>Chris
Karma Fog Box LOP turns everything blue when selected
2024-03-27T13:58:04+00:00hediedscreaming418018OK, poking around some, I found "Reset Viewport" under the "Labs" dropdown menu. That seems to put it back to default state and I can work again.<br><br>However, it would be nice to know why this happened?
Karma Fog Box LOP turns everything blue when selected
2024-03-27T13:31:04+00:00hediedscreaming418015Hi! Apparently I've gotten Houdini XPU preview into a weird mode so that whenever I /select/ the Karma Fog Box on the Stage, the fog turns bright blue and I can't see to adjust it (as shown in the Mardini day 8 demo video, say).<br><br>Can't immediately find any setting that I might have changed (went through the display options and sidebar controls). It's persistent -- new sessions do it now too.<br><br>Does anyone know what's going on? Thanks in advance!
Finding the source code or how the minpos function works
2024-03-27T05:43:58+00:00animatrix_417975You have to find the source code for xyzdist as minpos is just an alias for xyzdist. But even if you find the source code, it would be extremely hard to implement it using OpenCL in a manner that's optimized for GPU. Performing closest point calculations on arbitrary geometry in OpenCL is not a trivial task.<br><br>I asked SESI many times to add this functionality, and they said they didn't have any plans to do so.
SOP-based crowd sim terrain
2024-03-27T02:42:00+00:00rcoleman45417953Hi, I'm new to Houdini, and I'm having a go at creating a crowd sim. I was following along with this workflow. Do you know if there is any way to get the crowd to follow a terrain using this SOP-based crowd sim workflow? Sorry if my question doesn't make any sense. <br> <br><div class="video-container"><iframe width="800" height="450" src="https://www.youtube.com/embed/z8Z5PsnWFto?wmode=opaque" loading="lazy" frameborder="0" allowfullscreen=""></iframe></div> <br><br>Thanks <img src="/static/djangobb_forum/img/smilies/smile.png" />
Multiple UVlayouts into a UDIM layout
2024-03-27T00:15:06+00:00joshjosh417940Is it possible to take multiple UVLayouts (for geometry with baked textures), and arrange them in a UDIM tile layout? I'm hoping to take this to Substance Painter for painting over.
Finding the source code or how the minpos function works
2024-03-26T21:21:42+00:00Alt_stage417921I wrote a small algorithm in OpenCl and it works really fast. However, part of the entire asset is also VEX code and it runs many times longer than OpenCl. I have determined that the longest running VEX function is "minpos" and I would like to rewrite it in OpenCL as well, however I am not sure how to write it in the most optimal way. Please tell me, can I find the source code for "minpos" in VEX or C++ somewhere, so that I can understand how it works?
usdmaterialpath within SOP Modify
2024-03-26T18:18:40+00:00wayward417898Within a SOP_Modify I'm using a python node to access the usdmaterialpath attribute of imported geo. This gives me the material path as a lop/usd path (/materials/materialName).<br><br>I would like to access that material (within this SOP_Modify) to query a few parameters of that material.<br><br>How do I resolve that path to that node within a SOP_Modify? How do I access that LOP material node's attributes via python within a SOP_Modify?<br><br>Thanks for any help.
Switching display flag between two COP nodes
2024-03-26T16:15:49+00:00jsmack417886<blockquote><em>raincole</em><br>Thank you very much. It works in H20 for me too, but a little awkwardly: the display flag somehow moves along with the template flag (???)</blockquote><br>Yeah, that's why it's broken. It's not supposed to. It takes a bunch of clicking around to get the diff to show since the wrong flag moves.
Grow apples on changing topology (growing) tree?
2024-03-26T15:44:30+00:00Tanto417883I believe it is possible to export from Speedtree with a velocity attribute? Assuming growth is taken into account, you could transfer the velocity to your scattered points, then with a solver move them and possibly reproject them on the closest surface of your tree.
Grow apples on changing topology (growing) tree?
2024-03-26T15:27:14+00:00chrisHud417881Thanks Tanto! That's a great idea and I'll experiment with going that route.<br><br>Still, I wonder if there's some solution to sticking points to growing and deforming topology as it appears?