buddhi1980 / mandelbulber2

Official repository for Mandelbulber v2
GNU General Public License v3.0
894 stars 116 forks source link

heightmap use in formulas #907

Open mclarekin opened 2 years ago

mclarekin commented 2 years ago

look at implementing heightmap difs

buddhi1980 commented 2 years ago

We don't need this because we have Displacement maps and Fractalize texture. It is more general, because we can apply heightmaps to any fractal or primitive. Implemeting of heightmaps info fractal formula will not fit to actual program structure.

mclarekin commented 2 years ago

Formula: ABoxMapSFold

Description:

A modified "Amazing Box" by an idea of Aexion, the radius for the sphere folding is modified by a 2d pixelmap, creating surface pattern on spherefold areas:

x = abs(x+Fold) - abs(x-Fold) - x y = abs(y+Fold) - abs(y-Fold) - y z = abs(z+Fold) - abs(z-Fold) - z Mvec = (GetRGBfromSphereMap(@x, Map_nr) + Map_offset) Map_scale rr = Sqr(x + Mvec[0]) + Sqr(y + Mvec[1]) + Sqr(z + Mvec[2]) if rr < sqr(Min_R) then m = Scale/sqr(Min_R) else if rr < 1 then m = Scale/rr else m = Scale x = x m + Cx y = y m + Cy z = z m + Cz

buddhi1980 commented 2 years ago

@mclarekin the idea of using heightmap inside iteration loop is very interesting. Do you have any example images showing the results?

buddhi1980 commented 2 years ago

@mclarekin the idea of using heightmap inside iteration loop is very interesting. Do you have any example images showing the results?

mclarekin commented 2 years ago

no examples, but i can visualize how it should work to experiment we just need some height map data accessible in a formula code and probably test it first in an asurf.

buddhi1980 commented 2 years ago

I'm asking for examples to see if it is really worth to implement. It would require a lot of changes in the code.

mclarekin commented 2 years ago

i will look at making some examples. But that is a few months away as I have a lot of other things i want to finish first.