One way to make a transparent hole in a plane with graded transparency is to uv-map a solid, monochrome image with graded alpha (I assume).
But can I do this with nodes? I've used the Error Function to do this.
Basically transparency is 0.5 * (1 - erf((r-r0)/fuzzy))
where r
is the distance from the center of the plane, r0
is the radius of 50% transparency, and fuzzy is about 0.25 * r0
. It would be nice if everything would scale, so if I scaled the plane the hole would naturally scale with it.
note: if erf(x) is not available, it can be replaced with x.clip(-1, 1) like this:
I'm not sure how to begin to explain to nodes how to get the plane coordinates, and the erf() function.
Can this be done easily with nodes?
The image below is fake - I did it with matplotlib as an example of a plane with a fuzzy transparency as described above.
This is all I have so far, not sure how to even start to obtain u
and v
of the plane separately so I can even star to calculate r = sqrt(u**2 + v**2)
. Using Separate XYZ
or Separate RGB
seems to give absolute X, Y, Z coordinates, and I just want coordinates within the plane itself.