Adam Ferestad

Adam Ferestad

About Me

Technical Director


United States

Houdini Skills


Not Specified

Recent Forum Posts

how to calculate a diffusion from/over a point cloud? 2016年3月31日19:10

I have been looking on some math forums and posting for a couple of days and it occurred to me that the Houdini forums should have some people who know about this stuff too. I am currently working on my MA project at SCAD and I have elected to create a tool that will allow an artist to make a history dependent distribution of an attribute over a mesh. The process I have in mind for the tool working will go like this:
  • 1.Artist gives the mesh with an initial state of attributes on it, be it from prim/point attributes of from a map they have painted.
    2.I make sure all of the normals are calculated.
    3.Scatter points densely on the mesh and transfer normals and the attribute we are diffusing.
    4.Iterate over the points and measure a small neighborhood around each point to capture the point numbers for calculating over.
    5.Perform a quadratic approximation of the attribute over the neighborhood <—- This is where I am right now
    6.Calculate permeability attributes (not wanting to give away too much on this just yet)
    7.Loop: 1. Gather permeability data, 2. Calculate the permeability of each point based on float ramps which represent timelines, 3. Advect attribute
    8.Save the data to a map, which can then be used by the artist to control downstream aspects of the scene.
    I am currently having some trouble with the basic diffusion step. I am trying to get a system working which will be able to advect the attribute over the point cloud before I worry about the permeability stuff. I have a good idea what I am going to do for all of that, but this part is throwing me for a loop. I am working with this general equation:

    Considering that the little o should be virtually 0, at this point I am considering it negligable, ΔS will be the search radius for the neighborhood generation, Δt will be 1 for all intents at this point, since it is basically just an arbitrary step in the loop. Inside the inner product, v is defined in the documentation as a normal, so I am pretty sure that should be the surface normal, which I will capture from the original geometry. The other term in the inner product is the “Flux Vector” which is what I am currently trying to figure out how to calculate. The current formula I have is:

    Utilizing the first equation, D should be a diffusion constant which controls the speed of diffusion (as I understand it), though someone on a math forum mentioned that it could be a tensor matrix, something to look into later when I get the basic working. The real issue for me is coming from the grad(n). Since I am looking at a point cloud, which is essentially 4 dimensional at the minimum, meaning A = n(x,y,z), I am trying to figure out how to manage the partial differential calculations around the point. That is where the concept of using the neighborhood to find a quadratic approximation came from. I know that one could easily calculate the partial differentials of the approximation, but getting that approximation is proving… interesting. I am relatively sure that the advection step should be fairly straight forward as A_(t+1) = A_t + ΔN*P(x,y,z).

    I am not sure if I should be working in 4 dimensions, of if I should be transforming the neighborhood to the origin and projecting the points into a plane, then using the attribute as the output for a 2d mapping. Or is there an easier way to look at/solve the whole problem? I am not sure if this it the right forum to be asking this in either, but I figured that scripting was going to have the most people who might be familiar with the more theoretical aspects of how these things are produced. I am including the file I have been working in, so you can see the direction that I have been taking as well as what I have been attempting.

Generate map from point cloud? 2016年3月28日9:45

What I am trying to figure out is if it is possible to scatter points on a mesh, then use them to calculate attributes (we will say Cd just for ease) then save it out as a map on disk using the UV coordinates on the original mesh. I know that I can unwrap the original mesh and get a UV mapping for them, then transfer those to the points when I scatter them, but I am not sure how to save the map from there. I haven't done a whole lot with SHOP context yet, and I am trying to make it a big part of this quarter at SCAD for myself, but this is a pressing question that I am curious how to do. I figured out how to go the other direction last quarter, which will be very useful for my current project, but I need both directions now.

Notepad++ Language Definitions? 2016年3月23日17:56

I much prefer Notepad++ as my general coding IDE and I have figured out how to get it to work as my external editor for Houdini, but I would love for it to actually have highlighting for the various languages. Especially VEX Snippets, which I am doing most of my work in recently. I suppose I could try to write my own, but I am sure someone else would be much better at it as I have not written my own language definitions for N++ yet. If someone has one, would you be willing to post it?