Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by sweetdude09

  1. Howdy my dudes, I've been taking at a stab at building out a "portal" type shader for a few days now, and I'm pretty stuck. To elaborate, the goal is to basically to render from a second camera onto a texture (or render buffer), and then project it onto a piece of geometry to be rendered like any other object. Thus creating the illusion of looking into one portal, and out of a second portal (just like the game Portal). I've already solved rendering from the perspective of the other camera (I think.... I basically rebuilt fromNDC() in /mat/), however I'm currently stuck on how to project it properly back onto the geometry. Let's define the current render camera as "CameraA" and the second, portal camera as "CameraB" for ease of explanation. The issue that I'm running into is that the method I'm using requires me to sample the rendered scene from CameraB, as a texture. The reasoning being, that we need to clip the texture to make sure we're not looking at a squashed scene, but rather a scene that's clipped by the bounds of the portal geometry. However as far as I'm aware, there's nothing like Unity's render targets in Houdini. You could argue that, that's the purpose of the Render COP, however it's far slower than just shooting more rays into the scene from CameraB. Mestela sent me this lovely video by Roman Saldygashev in which he achieved the effect in mantra, so i know it's possible. For even more context, I've been following along with this post by Tom Hulton and his implementation in Unity, http://tomhulton.blogspot.com/2015/08/portal-rendering-with-offscreen-render.html Though in the attached file, I don't include the camera matching transformations he describes, let's just focus on the portal rendering.... I'm going to attach my test file to this post so all the smart people here can rip it to shreds. Please let me know if you think I'm totally approaching this problem incorrectly as well, as shader math is certainly not my strongest skill... If anyone has a link to the "Stupid RenderMan Tricks" pdf that inspired both Roman's effect and Tom's effect, that'd be incredible, because all searches on my end have turned up empty, so i'm kinda just winging it right now. JR_PORTALS_v004.hipnc
  2. Jake's HIPs Don't Lie

    Howdy partners, So one of the g00ns (Flight404) in our lil chat group had a question on dynamically cutting a triangle by its edge duals (basically create a triangle with the midpoints of each edge, and then 3 other new triangles that each connect back to one of the input triangles points) which i thought was a fun problem. Luckily i have tons of experience in this area as I've been dealing with similar problems for that KD-Tree teaser thing I mentioned briefly at the end of my last post (go watch it). Unfortunately i can't think of a parallel method for solving the problem that doesn't create overlapping points on edges (since 2 prims can contain the same edge, solving on prims will double up points on shared edges), but I did get it running pretty fast. It's a QT 3.14 effect, and I've done my best to comment the code. It's all relatively simple, so hopefully you learn some stuff clicking through it! Gosh I really need to update my website with this stuff... JR_TriDiv.hip
  3. Jake's HIPs Don't Lie

    HI FRIENDS! So over the past year I've been doing far too much Houdini in my free time, and I noticed that all of the people I look up to in the community have their own cute ODForce threads. So with the release of my latest blog post on Voronoi Diagrams and Remeshing, I thought it best to make one of those threads, to avoid flooding the Education section with tons of new posts... Anyways here's a link to my new blog post: https://medium.com/@jakerice_7202/voronoi-for-the-people-60c0f11b0767 And if the link itself isn't enough, here are a couple of GIFs from the blog post, including one that didn't make the cut. All credit for the post title goes to @mestela <3 Big thanks to @toadstorm for editing my grammar as well, and the whole ThinkProcedural discord for putting up with my insanity
  4. The Protal Effect/Offscreen Rendering

    Follow-Up: So I've been spinning my wheels on this for another week and really don't have a ton to show for it. I'm attaching the latest pass, I believe I've gotten the camera transforms all worked out, but i still really don't understand the clip-space portion of the problem. My current method is to use camera projected UV's as a way to define the clip space, and it seems pretty close. But it's definitely incorrect. I'm currently building it purely in SOPs as it's way to hard to debug rotations in /mat/, so hopefully this'll be easier to read/help with. JR_PORTALS_v007_ODFORCE.hipnc
  5. Jake's HIPs Don't Lie

    WeEEeeEee it's been a minute since I've posted anything in here!!!! I'm sure at this point principal component analysis (PCA), and covariance matrixes are old news to pretty much everyone, but with the release of H16.5 i thought it'd be fun to build a little a file that shows off how you can use smooth distance (defined by the edge transport node), to fuel a discrete curvature algorithm! Wow! I've commented the covariance code, so hopefully it makes some kind of sense. I actually should just make a little blog post about PCA but until then, this'll have to do! You're probably confused as to why this requires the edge transport node, and the reasoning is that without it (say you just do a pc-lookup to define the area we test the curvature against) you don't get an accurate curvature due to both errors in the mesh quality, and the fact that you're not doing a connectivity based curvature calculation in that case. However, those would easily outperform this method speed wise. Other methods, like those described in this Houdini Gubbins blog post are going to be faster as well (and maybe more accurate), however those come with issues of their own, like requiring the input mesh to be triangulated, among others. Total side thing, but I've been working on some dynamic mesh slicing algorithms, and have been making a little short to show that off. Here's a sneak preview :) EDIT: Read petz's breakdown below for far more accurate info on curvature values, mine is a total approximation (it's still a fun toy to play with), but his description is way more accurate in explaining the nuances of this stuff!!! JR_Curvature_EdgeTransport.hipnc
  6. Spiral Unrolling / Rolling Animation

    Here's my attempt! Plus bonus Gif!!! Also check my education thread for a curve roller! JR_AngleMinimizer.hip
  7. Jake's HIPs Don't Lie

    Uh oh, I'm back. While putzing around, trying to come up with good ideas for my next blog post (covering discrete operators seems a bit too mathy, so I'm open to suggestions. Maybe building a cloth solver in VEX?), I spent some time revisiting an old idea I've been attempting to solve for the better part of a year, rolling up a curve. That's probably not the best way to describe the effect, so I'll let my below GIF do the talking. This solution wouldn't have been anywhere close to possible without Stephen Bester (https://vimeo.com/user13305957) for a solid vex foundation of chained rotations, or Julian Johnson's transport frame file (http://julianjohnsonsblog.blogspot.com/2017/). Above you'll see final effect in action. Still not sure how to describe it other than rolling up a curve... I've attached the final OTL to this post along with the above example HIP! It works over multiple curves as well, so dont be afraid to try crazy stuff with it, it's pretty gosh darn fun! If you try it on a vertical line, you might need to change the up direction, or turn off "set up direction." Maybe it's time to make a Github too... <3 <3 <3 JR_CurveRoll.zip
  8. Jake's HIPs Don't Lie

    Sorry for making this thread and then going silent for a while, a lot has happened over the past few months, including me moving to LA on a whim... But I'm back!!!! I have tons of new files to share, which I'll push out in the coming weeks. Today I had a couple of hours to play with Houdini before going to an Escape Room (wish me luck), and I had been discussing the Laplace-Beltrami operator with a couple of buddies on discord for a long time, so i thought, why not implement one myself! After having thought about it for so long it actually didn't involve anything I hadn't already done, or covered in my blogs for that matter (go read them!!!!). The implementation is based off this paper: http://www.cs.princeton.edu/courses/archive/fall10/cos526/papers/sorkine05.pdf I did comment the wrangle so hopefully it makes sense. One caveat, is that this version does not include border weighting, so watch out for crazy minimization. For production, just use the attribute blur sop, this is more just me exploring weird math stuff that makes me question my art school degree... <3 <3 <3 P.S. there's a little ray tracing demo in there as well, since my roommate wanted to understand normals, and I went a bit too far off the deep end in explaining it to him.... EDIT: Petz has brought up a few issues with this, I will make a revision soon JR_Laplacian_v001.hip
  9. What is the best way for ferrobrain effect?

    You could also try something like Jeff Jones's Physarum Form Finding algorithm! It's actually pretty simple to implement in Houdini, assuming you have the patience to read the paper! http://eprints.uwe.ac.uk/15260/1/artl.2010.16.2.pdf
  10. Computing the Dual With VEX

    Hi friends! I just released an article on Medium walking through how I built a "Compute Dual" wrangle in VEX. As a quick summary, I basically wanted to know how the "Compute Dual" feature of the divide sop worked, so i slapped together a neat lil wrangle, to do just that! CLICK ME TO GO TO THE ARTICLE!!!!!!!! Here's a cute little gif showing off the construction of a dual graph. If you like it, please check out the article, it's free and it'd mean the whole world to me! =) Love you fools, Jake http://jakericedesigns.com/
  11. Computing the Dual With VEX

    I'm not sure if replying to myself is bad form, but here's a gif of the voronoi version. Big thanks to petz for sending me down the right path on this one =) JR_VORONOI_WRANGLE.hip
  12. Computing the Dual With VEX

    Ah that's a very interesting distinction. After doing a bit more research it appears i need to compute the dual using the circumcenters of a deluanay triangulation in order to compute the dual. Radical, i might take a crack at that today since I have a bit of free time, will post result in a bit =)
  13. Computing the Dual With VEX

    Damn three of my favorite tech wizards all commenting on muh post! Thanks for the kind words!!! Another thing I neglected to mention in the post is that the dual of delaunay triangle graph is a voronoi diagram, so really this can also be used as a vex method of generating voronoi diagrams. What that means for us is, assuming you run it on a mesh generated from "Triangulate 2D," you should get a voronoi diagram of the input points! Neat!
  14. Computing the Dual With VEX

    Aw shucks! You guys are too kind
  15. Creating Speed Ramp effects

    Yo, not sure if you already found a solution but here's a quick set up that i made for a project a while back. It also allows you to offset the start frame of the sim too! Maybe someone smarter can clean up my expression. Right now it's using frames to ramp (since i was using baked sims), but you could easily adjust the expression for time as well. ODFORCE_TimeShifter.hiplc
  16. Physarum

    Physarum, an experimental animation designed to show off a slime mold simulation, based on a research paper by Jeff Jones. What started as a redshift renderer test, quickly evolved into something much larger. Soon after implementing the paper in Houdini, I realized the simulation could be used to generate some pretty incredible designs. In this case the simulation is attempting find the most optimal paths through a given volume, creating tube like structures that are constantly evolving. I can attach the project file if there's any interest! If you are interested in reading the original paper, here’s a link to that: eprints.uwe.ac.uk/15260/1/artl.2010.16.2.pdf Bonus wireframe simulation showing my first 3D implementation of the algorithm: vimeo.com/182029750/74f8965df6 Bonus steiner tree example: vimeo.com/181717693/fe912eb22b
  17. sin expression with gap ?

    Here's how i would do it. From there it should be pretty simple to round the peaks and or animate it anyway you so choose. I got lazy though. ODFORCE_SinModuloExample.hipnc
  18. The title of this post, is a terrible amalgamation of words, so i apologize. The question i'm trying to tackle is, to take particles that are being advected by a volume in pops, and remap the animation so the particles only travel in a grid like manner. I'm aware of a few techniques that can accomplish this, but none of them work if the particles are being advected. I really don't even know where to start on this, my first thought is filter the velocity volume that's advecting the particles into basically voxels where each voxel can only have a velocity in one of six directions, based on the average velocity of that given voxel.. Writing that out, sounds kind of silly... But it makes the most sense currently to my brain, as opposed to some crazy pop vops magic. If anyone knows of any reference that could help me get to a solution that'd be greatly appreciated. I've been scratching my brain over this for a fairly large chunk of time, but can never seem to make any actual progress. Maybe i can use some chops post advection to do it... I'll keep playing with it in the mean time. Anyways thanks for reading this terribly written post, and i look forward to any and all input! This forum is legit incredible, so honestly thanks in advance if you post at all. It means the world to me -Jake
  19. Particle Velocity Grid Advection

    Wow Nick, this is a much, much smarter implementation than the bung i came up with. So much cleaner. If you don't mind me asking, what other situations benefit from switching out of cartesian and into polar? I'm definitely a novice at coding, especially when dealing with vector math, so i'm super interested in learning possible applications of this.
  20. Particle Velocity Grid Advection

    Not sure if this is proper protocol, but i wanted to report back with results! I initially set this whole thing up in VOPs over the weekend. However the set up with 6 switch comparisons, and loads of if statements became super messy, and my VOP flow just wasn't easy for me to tweak, let alone share with ya'll. However yesterday i had a bit of a lull at work, so i wrote the set up in VEX which ended up being so much easier. It's really my first time writing VEX, coming from python for C4D, but coding is pretty universal so it wasn't hard to get the syntax down, especially for such a simple set up! There's tons more i want to add to it, especially randomizing the angular velocity a bit so that the particles all kind of take there own path. I set this project file up with a simple velocity field to advect the points. But really this should work with any type of advection or particle motion.... Maybe... No promises. I tried to comment the code, so it could be useful to someone potentially? Anyways, thanks again Kleer for the help!!!!!!! Much appreciated. HOUDINI_GridAdvection_v003_ODFORCE.hipnc
  21. Particle Velocity Grid Advection

    OH that makes so much sense. Sweet, so it is easier than i was realistically making it out to be! I tend to over think problems.... Anyways, I will try this out for a bit, and then try it some more in the morning when i have a lot more time, and i will report back with my results!!! You're the best. -Jake
  22. Scatter Points Interpolation

    Hey guys, Huge ask here, and I'm probably going to go into far too much detail with this description, so bear with me. TL;DR: Trying to interpolate the points in a scatter sop, that are animated by a texture. Now let's get into it, and to be honest, as a complete noob at this, it might not even be possible or there might be infinitely smarter ways of doing this, so i could just be spinning my gears for no reason. Basically, what I've been trying to do over the past month (okay a lot longer, but i'm super stubborn and didn't want to ask for help) is to try and have a scatter sop, driven by an image texture, not be so god damn poppy. And while sure the relax iterations are great, they really don't actually help me, because rather than particles be generated every frame, i would prefer a field of particles to be generated once, and then have their positions moved. And this could be super simple, if it weren't for the fact that point ID's don't really help here, due to how the scatter sop generates them. So rather than just being able to straight interpolate every N frames, based on point ID, i can't unless i want the points to totally ignore the image texture. So I've tried tons of different methods, and i'm extremely close (i think) but instead of doing what i intended, i basically created a diffusion system instead... So basically my goal right now is to come up with a way to give each particle it's own unique particle pair, based on distance, that corresponds to the same sim, N frames ahead. I've been diving into a ton of the Point Cloud documentation, to see if it can be of any use, and it really has worked great. The issue is, I have no idea how to get each particle to have it's own unique pair. I can totally get pairs with pcfilter based on position, but that gives me a ton of non unique pairs (basically, point A goes to point B, but point C also goes to point B, instead of point D, and so on). I will attach a project file, so if this doesn't make sense, then please refer to that. I don't really expect a simple solution, and i'm really open to any suggestions at this point. I haven't been able to focus on anything else because i'm so invested in this god forsaken project. It might turn out to be something like i need to create a loop that checks for duplicates, but I can't seem to figure out the best way to go about doing that without having it fall apart on me... Anyways, I hope some of what i said makes sense, and I apologize for this massive wall of text. Also, my project file probably makes no sense, and I'll happily explain any and all parts of my thought process behind each piece. This is also the latest iteration of this project, as i have tried like 500 different solutions. Thanks in advance for any and all help... -Jake P.S. Totally open to the idea of using VEX for this as well, coding isn't alien to me by any means, so if it would be faster to execute this using VEX, then I'm all for it. PointInterpolation_ODFORCE_Package.zip
  23. Scatter Points Interpolation

    Holy shit. Dude i like honestly have no words. This file is exactly the kind of base i was looking for. Thank you so much, and thank you Miles as well. Next time in the LA area (that's a very large area) i'm 100% buying you a beer. I'm going to try and set it up in Dops either tonight or tomorrow morning so that i get a feel for that too. I actually just dove into Dops for the first time a few nights ago so it'll be interesting to try and apply it to this problem. The gradient difference is a super smart solution, it feels like a couple of things i've done when comping during post. I'm honestly so floored man, i literally never would have thought that you could use volumes like this. Anyways, enough rambling. Going to dive into this project and see what kind of crazy shit Dops has in store for me -Jake
  24. Scatter Points Interpolation

    First i want to start by saying, both of you are huge helps, especially in terms of thinking this whole thing through. Alright, so my reasoning is this (and please by all means, call me retarded if like it's outrageous or just a piss poor way of executing this idea): The reason i don't want particles to be deleted, is because i would love to use either a triangulate 2d or use the points as the template for a voronoi fracture on the base grid, so that i can rebuild the original grid, with polygons that flow according to the image texture that is being used to generate the points. So basically when the area is less dense, the polygons grow to fill that area out, and as the points shift towards an area of luminance the polygons get denser in that area, minus the terrible popping induced by using the scatter to achieve this. However, when points get culled, the "remeshing process" for lack of proper articulation skills, get's pretty ugly, just with popping and with other artifacts. So instead of the polygons expanding and shrinking, they just pop from one area to another. Again, I might be spinning my gears for no real reason here. In hindsight the whole to "avoid flicker" phrasing was just silly on my part, apologies on that note. I just checked out the file you posted Jesse, and it seems to be a lot closer to what I was thinking, and the set up is super interesting. Sorting by luminance seems pretty damn useful.
  25. Scatter Points Interpolation

    Not exactly, while that scene is very useful (I've only briefly looked into the Attribute Interpolate SOP, so thank you for showing me a scene with it) this is actually the inverse of the effect I'm looking for. Basically, i want a static grid with particles on it, and then what I've been attempting to do is have the particles "advect" by an animated texture on the grid. Maybe there's a way to do it using the Attribute Interpolate SOP, but so far I haven't been able to make that work. I tried something very similar to this! Though way you're describing is far simpler than what i did... I used a For Each to subdivide a mesh based on the luminance of an image texture, and then created points at the center of each primitive, which totally works. However, i realized that for the problem i was trying to solve, i wanted to try and keep the point number the same throughout the process, so i came to the conclusion that rather than culling i wanted just position change. Hence this mind numbing problem... Maybe there's a way to combine the two thought processes and create a system kind of like Conway's "Game of Life"? With that being said, I'm going to try it using the delta images like Fathom recommended (because it should keep the point number the same, so maybe it will work?), and see where that path takes me. My other thought now is to try the new grains system. Sort of like this video: Anyways, thank you both for your comments (I usually don't post on forums, it always feels selfish to me!)