I have partially solved the problem myself.
The aim is an animation/simulation with sticky cobwebs. I will upload a video (hopefully) tomorrow about my results with the Wire Solver and constraint networks. Until then, you are welcome to check out my HDA for the cobweb: vimeo.com/280790033
Greetings,
Gyula
Found 15 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » Wire Solver collision
- kulli
- 15 posts
- Offline
Houdini Indie and Apprentice » Wire Solver collision
- kulli
- 15 posts
- Offline
Hey,
I am trying to do some interesting stuff with the wire solver, but there are some things I can't figure out yet, although I am browsing the Houdini help section and reading through the wire solver page.
My setup is kinda easy, I have a few polylines between two static objects and a third object should cross those lines and bend/break them.
I need to solve the following:
1. I have bend my polylines by adding vertexes to them, so that they have an initial “bended” state. But in case I am using the wire solver, they will be automatically stretched a little more. I am not sure if this is possible, but I want that the wire solver threats those polylines (let's say they are “gum-ropes”) as if they are stretched to their resting position and only stretch or break them if other forces are applied to them. (Although this is really hard because the gravity is continuously applying a force)
Solved this one. I am using now a target geometry with high target stiffness/damping value. I'm not sure if this is the right way, therefore I still need to figure out how to let wires interact with my objects.
2. I still can't figure out which node I need to use for the animated object to interact with my polylines. It should also be possible, that they stick to the object.
I would really appreciate any help! Im sure it's simple if you know how to
Greetings,
Gyula
I am trying to do some interesting stuff with the wire solver, but there are some things I can't figure out yet, although I am browsing the Houdini help section and reading through the wire solver page.
My setup is kinda easy, I have a few polylines between two static objects and a third object should cross those lines and bend/break them.
I need to solve the following:
Solved this one. I am using now a target geometry with high target stiffness/damping value. I'm not sure if this is the right way, therefore I still need to figure out how to let wires interact with my objects.
2. I still can't figure out which node I need to use for the animated object to interact with my polylines. It should also be possible, that they stick to the object.
I would really appreciate any help! Im sure it's simple if you know how to
Greetings,
Gyula
Edited by kulli - 2018年7月13日 04:04:08
Technical Discussion » Error with Voronoi: errors while matching the new node to its definition
- kulli
- 15 posts
- Offline
Technical Discussion » Error with Voronoi: errors while matching the new node to its definition
- kulli
- 15 posts
- Offline
Hi,
I can't use the voronoifracture Node anymore because I get the issue “There were errors while matching the new node to its definition.” on creating the node.
There is a list of warnings and errors:
Warning: Skipping unrecognized parameter “label1”.
Skipping unrecognized parameter “label2”.
Skipping unrecognized parameter “label3”.
Skipping unrecognized parameter “label4”.
Warning: This operation is only valid inside a sub-network.
Error: Bad node type found: vopsop in /obj/box1/voronoifracture3/triangulate_points.
Warning: Ignoring data for locked node: voronoifracture3/triangulate_points/create_piece_seam_group
Ignoring ….
Warning: This operation is only valid inside a sub-network.
Error: Bad node type found: vopsop in /obj/box1/voronoifracture2/calculate_clustering.
Warning: Ignoring data for locked node: voronoifracture2/calculate_clustering/add_voronoi_noise_to_zero_cluster
Error: Bad node type found: vopsop in /obj/box1/voronoifracture2/calculate_clustering.
Warning: Ignoring data for locked node: voronoifracture2/calculate_clustering/calc_random_detachment
Warning: This operation is only valid inside a sub-network.
Error: Bad node type found: subnet in /obj/box1/voronoifracture2/perform_clustering.
.
.
.
There are tons of other different error Nodes, I really don't get it why its not working.
Can someone help me please?
Greetings, Gyula
I can't use the voronoifracture Node anymore because I get the issue “There were errors while matching the new node to its definition.” on creating the node.
There is a list of warnings and errors:
Warning: Skipping unrecognized parameter “label1”.
Skipping unrecognized parameter “label2”.
Skipping unrecognized parameter “label3”.
Skipping unrecognized parameter “label4”.
Warning: This operation is only valid inside a sub-network.
Error: Bad node type found: vopsop in /obj/box1/voronoifracture3/triangulate_points.
Warning: Ignoring data for locked node: voronoifracture3/triangulate_points/create_piece_seam_group
Ignoring ….
Warning: This operation is only valid inside a sub-network.
Error: Bad node type found: vopsop in /obj/box1/voronoifracture2/calculate_clustering.
Warning: Ignoring data for locked node: voronoifracture2/calculate_clustering/add_voronoi_noise_to_zero_cluster
Error: Bad node type found: vopsop in /obj/box1/voronoifracture2/calculate_clustering.
Warning: Ignoring data for locked node: voronoifracture2/calculate_clustering/calc_random_detachment
Warning: This operation is only valid inside a sub-network.
Error: Bad node type found: subnet in /obj/box1/voronoifracture2/perform_clustering.
.
.
.
There are tons of other different error Nodes, I really don't get it why its not working.
Can someone help me please?
Greetings, Gyula
Work in Progress » Solving the Rubik's cube with Houdini and Python
- kulli
- 15 posts
- Offline
Hey all,
I am working on a solution for the Rubik's cube. This is my first project with Python, but it's also a very nice and practical way of learning scripting and VEX.
The project is divided up into different steps:
In this post, I want to give a brief overview how I am going to realize the steps above.
First of all, I needed to describe the cube in a simple way. Unfortunately, there are a lot of different attributes I need to store on points which reflect the cubies (those are the small cubes in the cube). The orientation, the position, the visible sites, the group (edge, mid, corner) etc.
To describe a cube, I am using points to which I am copying a cube at the end. I am only working on the points and mostly on their orientation and position: (This is the middle layer)
{-1,1,0} - {0,1,0} - {1,1,0}
{-1,0,0} - {0,0,0} - {1,0,0}
{-1,-1,0} - {0,-1,0} - {1,-1,0}
This seems obvious, but I needed to learn a lot about rotation and quaternions (also matrixes) to understand why and how I do the rotation for the 12 different turns.
The Turns:
There are 6 turns and 6 “counter-turns” (clockwise and counterclockwise), each of them are stored under a value 1-12. An array on a “helping point” (which doesn't belong to the cube) is storing the array. The solver checks for the current pos in the array, and if it matches the turn, the turn is going to be executed. At the end of the solver the pos is going to be deleted and a next, random number (turn) is replacing it.
This way, the solver can generate a random position for the cube just generating a random array of x numbers. BUT the same solver can also solve the cube with the correct array! Thats where I need Python
Thistlethwaite:
The first step is done, the cube is described matching my needs, and has a random position after running the solver. The next step is to import the current position of each point into Python, and running a script which will solve it
And there it comes, Dr. Thistlethwaite! His description of a solution for the cube is one which can be easily understood and the coding part for python is really not that hard. For more information, please visit this [www.jaapsch.net] site!
Back to Houdini:
After the final moves are found, a new array is going to describe the turns and the solver is going to execute them.
Where I am now?
I have done step 1 to describe the cube and I have understood all the math needed for the cube solver. I have an understanding of Python for being able to code the needed solver. Now, I need to store the point values from Houdini in a Python dictionary and to use it as a starting position for finding the solution. I am preferring a depth first search for the code, but it may vary depending on the results.
I will be back as soon as I have more to present!
Gyula
I am working on a solution for the Rubik's cube. This is my first project with Python, but it's also a very nice and practical way of learning scripting and VEX.
The project is divided up into different steps:
- Create and describe the cube in Houdini.
- Import the cube into Python.
- Solve the cube in Python.
- Visualize the solution in Houdini
In this post, I want to give a brief overview how I am going to realize the steps above.
First of all, I needed to describe the cube in a simple way. Unfortunately, there are a lot of different attributes I need to store on points which reflect the cubies (those are the small cubes in the cube). The orientation, the position, the visible sites, the group (edge, mid, corner) etc.
To describe a cube, I am using points to which I am copying a cube at the end. I am only working on the points and mostly on their orientation and position: (This is the middle layer)
{-1,1,0} - {0,1,0} - {1,1,0}
{-1,0,0} - {0,0,0} - {1,0,0}
{-1,-1,0} - {0,-1,0} - {1,-1,0}
This seems obvious, but I needed to learn a lot about rotation and quaternions (also matrixes) to understand why and how I do the rotation for the 12 different turns.
The Turns:
There are 6 turns and 6 “counter-turns” (clockwise and counterclockwise), each of them are stored under a value 1-12. An array on a “helping point” (which doesn't belong to the cube) is storing the array. The solver checks for the current pos in the array, and if it matches the turn, the turn is going to be executed. At the end of the solver the pos is going to be deleted and a next, random number (turn) is replacing it.
This way, the solver can generate a random position for the cube just generating a random array of x numbers. BUT the same solver can also solve the cube with the correct array! Thats where I need Python
Thistlethwaite:
The first step is done, the cube is described matching my needs, and has a random position after running the solver. The next step is to import the current position of each point into Python, and running a script which will solve it
And there it comes, Dr. Thistlethwaite! His description of a solution for the cube is one which can be easily understood and the coding part for python is really not that hard. For more information, please visit this [www.jaapsch.net] site!
Back to Houdini:
After the final moves are found, a new array is going to describe the turns and the solver is going to execute them.
Where I am now?
I have done step 1 to describe the cube and I have understood all the math needed for the cube solver. I have an understanding of Python for being able to code the needed solver. Now, I need to store the point values from Houdini in a Python dictionary and to use it as a starting position for finding the solution. I am preferring a depth first search for the code, but it may vary depending on the results.
I will be back as soon as I have more to present!
Gyula
Work in Progress » Laplace growth & Dielectric Breakdown Model with a fast simulation algorithm (Lightning creation)
- kulli
- 15 posts
- Offline
Hey,
this is my (hopefully) last post regarding to this Project. I have successfully finished, as mentioned before, the Solver, and was also able to create a digital asset with different options:
1) Create a Grid (2D or 3D) which will work as the point cloud for the pattern to grow. The user also can plug in a given point cloud (Created on a geo surface e.g.), but those points shouldn't be placed randomly all over and should at least have an even distance to each other for being physically accurate (although I find results with at least a little randomness visually more powerful!)
2) Create Obstacles like boxes or spheres or other geometry. (The user simply needs to plug them in). Different values can be set for the rejection effect. This allows the user to optimize the simulation
3) Create a point as “aiming location”. This way, the user can add a point and set different values for the amount of attraction. Being able to do so will lead a lightning or other sim in the given direction.
This is it! A video about the creation can be found here [vimeo.com]. Another one showing a lightning bolt [vimeo.com].
There are a ton of other possibilities for the pattern. I am experimenting in a 3D growth behavior and a RBD object breaking apart according to the growth pattern (This is gonna be a nice one!).
Greetings,
Gyula
this is my (hopefully) last post regarding to this Project. I have successfully finished, as mentioned before, the Solver, and was also able to create a digital asset with different options:
1) Create a Grid (2D or 3D) which will work as the point cloud for the pattern to grow. The user also can plug in a given point cloud (Created on a geo surface e.g.), but those points shouldn't be placed randomly all over and should at least have an even distance to each other for being physically accurate (although I find results with at least a little randomness visually more powerful!)
2) Create Obstacles like boxes or spheres or other geometry. (The user simply needs to plug them in). Different values can be set for the rejection effect. This allows the user to optimize the simulation
3) Create a point as “aiming location”. This way, the user can add a point and set different values for the amount of attraction. Being able to do so will lead a lightning or other sim in the given direction.
This is it! A video about the creation can be found here [vimeo.com]. Another one showing a lightning bolt [vimeo.com].
There are a ton of other possibilities for the pattern. I am experimenting in a 3D growth behavior and a RBD object breaking apart according to the growth pattern (This is gonna be a nice one!).
Greetings,
Gyula
Technical Discussion » Mantra takes very long to start between frames
- kulli
- 15 posts
- Offline
jsmack
Starts instantly for me.
What kind of licensing are you running? I am starting to believe, this has to do with the licensing type of my apprentice version, maybe also something to do with DNS, but I am going to do research about the problem now. I hope I can get it to run soon..
Technical Discussion » Mantra takes very long to start between frames
- kulli
- 15 posts
- Offline
Hey everybody,
I wanted to ask a simple question about mantra PBR. I have a very simple .hip with a grid+box for testing, and although I was very happy with Mantra until now, I am having serious issues to render out a series of images.
The problem is, that mantra takes ~2min to start rendering, and will do the render job in 5-6sec. And again 2min to start rendering, and again 5-6sec for the render. So, for 10 images it takes nearly 20min to render out.
This is kinda annoying, as I want to render a sequence of ~300 images, each of them with a low render time, but huge downtimes between each frames.
It doesn't matter if I cache the geo, nor any other actions to speed up my computer. I have also tried to search for this problem, and it seems to be a known issue, but I haven't found a solution yet.
I am using a MacBook Pro with high Sierra and Houdini 16.5 apprentice version.
I am very thankful for any help, I really don't want to cloud render this simple task.
Greetings, Gyula
I wanted to ask a simple question about mantra PBR. I have a very simple .hip with a grid+box for testing, and although I was very happy with Mantra until now, I am having serious issues to render out a series of images.
The problem is, that mantra takes ~2min to start rendering, and will do the render job in 5-6sec. And again 2min to start rendering, and again 5-6sec for the render. So, for 10 images it takes nearly 20min to render out.
This is kinda annoying, as I want to render a sequence of ~300 images, each of them with a low render time, but huge downtimes between each frames.
It doesn't matter if I cache the geo, nor any other actions to speed up my computer. I have also tried to search for this problem, and it seems to be a known issue, but I haven't found a solution yet.
I am using a MacBook Pro with high Sierra and Houdini 16.5 apprentice version.
I am very thankful for any help, I really don't want to cloud render this simple task.
Greetings, Gyula
Work in Progress » Laplace growth & Dielectric Breakdown Model with a fast simulation algorithm (Lightning creation)
- kulli
- 15 posts
- Offline
goldleaf
Having your results and write-ups is excellent. Thanks for sharing them!
Thank you for your nice comment, you are welcome!
It's been a few days since I updated this project, but I had to do some other stuff and needed another research about the physical part of the algorithm. Finally, I am sure, that everything is fine with my algorithm and the tweaking has ended. I managed to run the simulations 4-5 times faster than before and I got really nice results.
It's really interesting how the they change in depending on the chance calculated in step 4), which can be regulated with N. I have attached a new image showing my results.
I am going to render all three simulations to showcase the difference and I will do another, more artistically one. Like ice crystals on the window or on the ice cube, something in this direction
Beside of that, there are still few steps to do for my original lightning goal. I have noticed (after a looooong time) that the algorithm works as it is, but I really can't regulate where to grow or not to grow, or which direction to choose. The short way: My lightning won't hit the tower without further tweaking.
This will be the next step, and at the end, I will have a nice project file with a lot of regulators to fast simulate any kind of laplacian growth
Greetings, Gyula!
Work in Progress » Laplace growth & Dielectric Breakdown Model with a fast simulation algorithm (Lightning creation)
- kulli
- 15 posts
- Offline
Two days gone,
I have finally overcame the biggest issue, the weighted randomness. I have created my own method for picking a random point based on its chance. E.g.: Point A got a 20% chance, Point B got 30% and Point C got 50%. Its obvious, that point C would be chosen as many times as Point A + Point B. And Point A would be chosen only twice if I roll the dice 10 times.
Thats easy and nothing new, but imagine I want to calculate the chance based on the distance to {0,0,0}? Sure, I get distance, and can save it for every point, but now those points further should be selected more often than points near to {0,0,0}. And in case, one of my points got selected, the whole bunch of chances need to be recalculated. (In case I have my first 10k selection, the chance for selecting points near to {0,0,0} will increase.
So, after figuring it out, I have implemented it into the algorithm and finally, I got those results I wanted to see.
Here it is, a small image of Laplacian Growth! I want to point out, that this is a 2D model with a Grid running only 40k points. I will need to optimize the memory usage again to save sim time, but again, as I mentioned before, this is a physically correct model of Laplacian Growth and the Dielectric Breakdown Model!
Next step is to bring it into a form of worth presenting and to start working on my 3D lightning model.
Greetings,
Gyula
I have finally overcame the biggest issue, the weighted randomness. I have created my own method for picking a random point based on its chance. E.g.: Point A got a 20% chance, Point B got 30% and Point C got 50%. Its obvious, that point C would be chosen as many times as Point A + Point B. And Point A would be chosen only twice if I roll the dice 10 times.
Thats easy and nothing new, but imagine I want to calculate the chance based on the distance to {0,0,0}? Sure, I get distance, and can save it for every point, but now those points further should be selected more often than points near to {0,0,0}. And in case, one of my points got selected, the whole bunch of chances need to be recalculated. (In case I have my first 10k selection, the chance for selecting points near to {0,0,0} will increase.
So, after figuring it out, I have implemented it into the algorithm and finally, I got those results I wanted to see.
Here it is, a small image of Laplacian Growth! I want to point out, that this is a 2D model with a Grid running only 40k points. I will need to optimize the memory usage again to save sim time, but again, as I mentioned before, this is a physically correct model of Laplacian Growth and the Dielectric Breakdown Model!
Next step is to bring it into a form of worth presenting and to start working on my 3D lightning model.
Greetings,
Gyula
Technical Discussion » min/max value in a group & weighted randomness
- kulli
- 15 posts
- Offline
Hi there,
for my current project, I need to do two important things. I need to get the lowest/highest value of an attribute in a group, and I need to select a random point in a group with a weighted chance.
For the first one, I wanted to use the max/min function, but obviously it doesn't work on groups. Therefore I am using a workaround. example:
This is the only way I found, but not the best one. Is there another, more elegant and memory saving method?
The other problem is that I need to get a weighted chance to work and to select a random point within Group A. But some points should be chosen more often than other, based on the weighted-chance. I am currently working on a method to get it work on 1-10k points, but will need a little bit of advise or help
If you have any advices or solutions, don't be shy, just reply
for my current project, I need to do two important things. I need to get the lowest/highest value of an attribute in a group, and I need to select a random point in a group with a weighted chance.
For the first one, I wanted to use the max/min function, but obviously it doesn't work on groups. Therefore I am using a workaround. example:
- Generate Group A, each point with a random number.
- Append the random attribute to an array running on my “array point” (well, it's a group with one point)
- Use the min/max function to get the lowest/highest value within the array and save it on the point (two extra attributes needed)
- Next wrangle running on Group A, get the max/min value with the point function and work with it
This is the only way I found, but not the best one. Is there another, more elegant and memory saving method?
The other problem is that I need to get a weighted chance to work and to select a random point within Group A. But some points should be chosen more often than other, based on the weighted-chance. I am currently working on a method to get it work on 1-10k points, but will need a little bit of advise or help
If you have any advices or solutions, don't be shy, just reply
Work in Progress » Laplace growth & Dielectric Breakdown Model with a fast simulation algorithm (Lightning creation)
- kulli
- 15 posts
- Offline
Well, a short update on my project.
I have started a few times from zero because of circumstances of ineffective solvers. Its really hard to work on points, and I need to wisely manage groups, arrays and my attributes.
Easy example: In case I want to get the highest/smallest potential of my candidates group, I need to save those potential on a point called “array point” and to run a max/min function on the array in an extra point wrangle. Save the values on the same point, get another wrangle for my candidates and get those values returned with the point function.
I would like to do this in only one wrangle without an extra array, but didn't found a solution until now. I will check for one later, I really want to get my algorithm to work before optimizing.
The next great step was implementing the correct equation for calculating the chance and the potential on each candidate. Therefore, I needed a few days and additional books like “Fractal dimension of dielectric breakdown,” Physical Review Letters, vol. 52, pp. 1033–1036, 1984. but it helped and am getting better results.
My next step is to solve the problem of weighted randomness and implementing it in Houdini. This took me already some hours of research and I watched some (great) videos about probability and how to calculate them, but I still need a little more to fix the problem. In case I find a solution, I will be able to put a fast end on this project and to work with the algorithm for several Laplace growth effects.
Last but not least, a new image showing my last result running the solver. I have changed my setup and I am now working on a grid with the first point charge in the middle of my circle. End the end, it should look like on of these [csdl-images.computer.org] images. To be exact, the middle one b) is using the same algorithm..
Greetings, Gyula
ps.: I can't get rid of the feeling, this would be way easier to implement in python. I really need to start working with it in Houdini!
I have started a few times from zero because of circumstances of ineffective solvers. Its really hard to work on points, and I need to wisely manage groups, arrays and my attributes.
Easy example: In case I want to get the highest/smallest potential of my candidates group, I need to save those potential on a point called “array point” and to run a max/min function on the array in an extra point wrangle. Save the values on the same point, get another wrangle for my candidates and get those values returned with the point function.
I would like to do this in only one wrangle without an extra array, but didn't found a solution until now. I will check for one later, I really want to get my algorithm to work before optimizing.
The next great step was implementing the correct equation for calculating the chance and the potential on each candidate. Therefore, I needed a few days and additional books like “Fractal dimension of dielectric breakdown,” Physical Review Letters, vol. 52, pp. 1033–1036, 1984. but it helped and am getting better results.
My next step is to solve the problem of weighted randomness and implementing it in Houdini. This took me already some hours of research and I watched some (great) videos about probability and how to calculate them, but I still need a little more to fix the problem. In case I find a solution, I will be able to put a fast end on this project and to work with the algorithm for several Laplace growth effects.
Last but not least, a new image showing my last result running the solver. I have changed my setup and I am now working on a grid with the first point charge in the middle of my circle. End the end, it should look like on of these [csdl-images.computer.org] images. To be exact, the middle one b) is using the same algorithm..
Greetings, Gyula
ps.: I can't get rid of the feeling, this would be way easier to implement in python. I really need to start working with it in Houdini!
Work in Progress » Laplace growth & Dielectric Breakdown Model with a fast simulation algorithm (Lightning creation)
- kulli
- 15 posts
- Offline
Greetings!
I have been working a lot in the previous month on my VEX skills and learned a lot about programming in general. On my path to become a VEXpert (haha..), I wanted to create a sim, based on an algorithm. The idea came after watching Entagmas video about space colonization.
So I have decided to make a dream become real and check for algorithms on lightning creation. I have found some “easy” methods, but at the end, there were those two things called "Laplace growth“ and ”DBM = Dielectric breakdown model“. As a former physics student, I wanted to make it real and implement the effect into Houdini.
On my research, I have found a ”fast and easy" algorithm for the DBM on this page: http://gamma.cs.unc.edu/FRAC/laplacian_large.pdf [gamma.cs.unc.edu]
Implementing the algorithm will take a while, because of the special thematic it describes (how does a lightning evolve, and what exactly is the DBM?), but I have first results and added the “core” to Houdini as a solver.
The general DBM algorithm is working as followed:
1) Calculate the electric potential φ on a regular grid according to some boundary condition.
2) Select a grid cell as a ‘growth site’ according to φ.
3) Add the growth site to the boundary condition.
especially:
1) Insert a point charge at the origin,
2) Locate the candidate sites around the charge. On a
square 2D (3D) grid, these would be the eight (twenty-
six) neighbors,
3) Calculate the potential at each candidate site according
to Eqn. 10.
4) Randomly select a growth site according to Eqn. 12.
5) Add a new point charge at the growth site.
6) Update the potential at all the candidate sites according
to Eqn. 11.
7) Add the new candidate sites surrounding the growth site.
8) Calculate the potential at new candidate sites using Eqn.
10.
In my Solver, I have created the boundary conditions for each of the given steps. I have some groups, some attributes, some arrays, calculations and so on.
My lightning follows a path randomly chosen based on the distance to my endpoint, and thats why it, in its current state, doesn't fork. The probability calculation, well both equation 10) and 12) are not yet implemented. I did not fully understand both equations, but after searching for help by my friends, I am able to calculate the potential of each candidate site correctly now, and to calculate the probability “weight”.
After implementing both equations, I will need to overcome one of my biggest problems. I need to work out a method, which allows me to randomly choose a point based on its “weight” of becoming a growing site. This is something I'm currently working out and searching for on the internet. I had a simple idea, which would work with 10-20 points, but won't with 1,5m or more..
In case, there are some math brains outside there, or in case someone knows a site or an expression in VEX which can help, let me know please
Beside of that, I will also need to figure out a good way to render out my lighting, and to not work on a huge grid of 256^3 (~16,8m points), but to only add points to my scene if they are treated as a potential growth candidate.
I will update this post as soon as I am getting forward with the equation. Until now, I have spent nearly 3-4 days on reading about Laplace and DBM, also understanding the faster algorithm, and ~1 day to create my current Houdini scene.
Greetings,
Gyula
ps.: Image shows the current “lightning” on a 2D grid.
I have been working a lot in the previous month on my VEX skills and learned a lot about programming in general. On my path to become a VEXpert (haha..), I wanted to create a sim, based on an algorithm. The idea came after watching Entagmas video about space colonization.
So I have decided to make a dream become real and check for algorithms on lightning creation. I have found some “easy” methods, but at the end, there were those two things called "Laplace growth“ and ”DBM = Dielectric breakdown model“. As a former physics student, I wanted to make it real and implement the effect into Houdini.
On my research, I have found a ”fast and easy" algorithm for the DBM on this page: http://gamma.cs.unc.edu/FRAC/laplacian_large.pdf [gamma.cs.unc.edu]
Implementing the algorithm will take a while, because of the special thematic it describes (how does a lightning evolve, and what exactly is the DBM?), but I have first results and added the “core” to Houdini as a solver.
The general DBM algorithm is working as followed:
1) Calculate the electric potential φ on a regular grid according to some boundary condition.
2) Select a grid cell as a ‘growth site’ according to φ.
3) Add the growth site to the boundary condition.
especially:
1) Insert a point charge at the origin,
2) Locate the candidate sites around the charge. On a
square 2D (3D) grid, these would be the eight (twenty-
six) neighbors,
3) Calculate the potential at each candidate site according
to Eqn. 10.
4) Randomly select a growth site according to Eqn. 12.
5) Add a new point charge at the growth site.
6) Update the potential at all the candidate sites according
to Eqn. 11.
7) Add the new candidate sites surrounding the growth site.
8) Calculate the potential at new candidate sites using Eqn.
10.
In my Solver, I have created the boundary conditions for each of the given steps. I have some groups, some attributes, some arrays, calculations and so on.
My lightning follows a path randomly chosen based on the distance to my endpoint, and thats why it, in its current state, doesn't fork. The probability calculation, well both equation 10) and 12) are not yet implemented. I did not fully understand both equations, but after searching for help by my friends, I am able to calculate the potential of each candidate site correctly now, and to calculate the probability “weight”.
After implementing both equations, I will need to overcome one of my biggest problems. I need to work out a method, which allows me to randomly choose a point based on its “weight” of becoming a growing site. This is something I'm currently working out and searching for on the internet. I had a simple idea, which would work with 10-20 points, but won't with 1,5m or more..
In case, there are some math brains outside there, or in case someone knows a site or an expression in VEX which can help, let me know please
Beside of that, I will also need to figure out a good way to render out my lighting, and to not work on a huge grid of 256^3 (~16,8m points), but to only add points to my scene if they are treated as a potential growth candidate.
I will update this post as soon as I am getting forward with the equation. Until now, I have spent nearly 3-4 days on reading about Laplace and DBM, also understanding the faster algorithm, and ~1 day to create my current Houdini scene.
Greetings,
Gyula
ps.: Image shows the current “lightning” on a 2D grid.
Edited by kulli - 2017年11月25日 15:28:48
Houdini Indie and Apprentice » VOP randomize based on point number
- kulli
- 15 posts
- Offline
@Eric, thank you very much. Indeed, your way works, but I still don't know why Looking at the help, it says for add attribute: The value of the attribute will be set to the value passed in. This should be a random value for each point.. Anyway, it doesn't matter. The solution is using the bind export as you mentioned.
I will check the help page more often in the future, there is indeed a hint to the bind export node. The only problem is, that I still don't get why it doesn't work..
Well, thanks, and in case no one else want to offer me an explanation, we can consider the problem as solved.
Greetings, Gyula
I will check the help page more often in the future, there is indeed a hint to the bind export node. The only problem is, that I still don't get why it doesn't work..
Well, thanks, and in case no one else want to offer me an explanation, we can consider the problem as solved.
Greetings, Gyula
Houdini Indie and Apprentice » VOP randomize based on point number
- kulli
- 15 posts
- Offline
Hey all,
I am facing a tiny problem, which drives me crazy. I know I have to oversee something and it is really annoying me. Basically, I am using a Grid connected to a Point VOP. Within the VOP, I simply want to add a new attribute “test” which has random values based on the Point Number for every point.
Sounds simple, and it should be. Dropping a “random” within the VOP, use “ptnum” as input, and “add attribute” to create my attribute. But every time I am trying, I will get the same random number for every point, and not different ones. This is really annoying, as I am sure it should work, but it doesn't.
I can use the “point wrangle” node to create the same result, but I want to dive deeper into VOPs and learn them. It's a quiet bad start not being able to do that simple of stuff, therefore I would really appreciate your help.
I have attached my test file.
Greetings, Gyula
I am facing a tiny problem, which drives me crazy. I know I have to oversee something and it is really annoying me. Basically, I am using a Grid connected to a Point VOP. Within the VOP, I simply want to add a new attribute “test” which has random values based on the Point Number for every point.
Sounds simple, and it should be. Dropping a “random” within the VOP, use “ptnum” as input, and “add attribute” to create my attribute. But every time I am trying, I will get the same random number for every point, and not different ones. This is really annoying, as I am sure it should work, but it doesn't.
I can use the “point wrangle” node to create the same result, but I want to dive deeper into VOPs and learn them. It's a quiet bad start not being able to do that simple of stuff, therefore I would really appreciate your help.
I have attached my test file.
Greetings, Gyula
-
- Quick Links