I am trying to rearrange points according to a black and white image. I would like to move more points to the lighter areas of the image and less to the darker areas.
There is something simular to what i want to do:
but here they cull out points in the lighter areas of the image. and i need all points to stay and just move/rearrange.
Here would be an image of what i would like to do:
→ albert einstein
Thanks in advance
Does it need to be ‘movement towards’? It may be easier to generate lots of points, then remove the ones that are over lighter areas, probably with a noisy bias so you don’t get too much posterisation artefacts.
I am trying to calculate light rays beeing refracted by a surface
meaning each point representing one light ray.
the left part of the image would be the light rays hitting the refracting surface and the right image are the refracted light rays hitting the target surface
meaning: i can’t remove/cull any of the points
Ok, in that case you may end up with an iterative algorithm which moves points N steps towards darker areas. You may not get the results you’re after if you take a single big step.
I haven’t tried this, but I’d start by creating a height-map of your brightness. That means starting with a dense, rectangular nurbs surface or mesh the size of your image in world space, and moving the control-points up based on the brightness sampled from your image. This way you end up with a shape which is high where the image is bright and low where the image is dark. You can then start moving your points up- or downhill.
This moving part may be possible in Kangaroo (I’m pretty sure it is, but I don’t know how), or you can use Surface CP to get the (u,v) coordinate on the heightmap closest to each point, evaluate the normal at that location and use that information to find the most up or downhill direction. Move point small distance in that direction. Rinse and repeat.
This sounds really promising!!!
I will give it a try and let you know how it works out
Thanks sooo much!
I think there was a paper in SIGGRAPH a few years ago that did this exact problem and framed it as a (difficult) optimal transport problem - the issue you might run into with the iterative Kangaroo method is getting criss-crossing paths which would turn out badly for the actual fabrication of the lenses. Using optimal transport algorithms guarantees that sort of thing won’t happen.
( But hey, give it a try anyway - would be interesting to see if it works )
Edit: found the paper and accompanying video -
Looks like that was the source for your example image
this is the source of my image
i find this very intresting and wanted to give it a try
One other idea I had was using quelea with repulsion and attraction to move points according to data from an image.
do you think this would work better?
I don’t know how robust this process is. It’s incredibly cool but it seems that for any detailed image like the Einstein, the acrylic milling must be amazingly precise.
i am not worried about this yet. but you are right the milling must be super persice.
but there is not only the option of refractive caustics but reflective caustics. meaning i could 3d print the geometry and polish it and give it a mirror finish
this would be a other posssibility ^^
but ATM i am still facing the problems of even getting to the geometry
Well, I guess once you actually have a good master, you could probably produce as many copies as you like by molding and casting.
basically there are two ways of getting the caustics (at least the way i can think of right now) ^^
my initial question was reguarding the first part.
and i dont know which one would be easier to achive. i think they are pretty much the same. and as sone as i got one i can do the other
so i tried making a surface with hight according to an image:
but i see an issue. if the neighboring area significantly lighter or darker but for example the beard is a big black spot with little definition. so there would not be so much movement. at least not enought to make almost of of the light rays from this area to go to a lighter area. or do i see this wrong?
i finished the thought. but it doesnt work
Have you gotten any further with this? I’m really curious