Yes, ChatGPT is not perfect. I chat back and forth with it sometimes for a while to get the code right. It just gave me this code. Use this as a starting point and let ChatGPT this is the only code you got functional up until this point and to give variations to this. It can take some conversation to work through. #include shader Vectron( int Iterations = 12, float Bailout = 2.0, float Power = 16.0, vector translate = 0, output _sdf out = _SDFDEF) { vector pos = P - translate; vector z = pos; float dr = 1.0; float r = 0.0;
for (int i = 0; i < Iterations; i++) { r = length(z); if (r > Bailout) break;
Super cool, I've never used Vectron
You should! There are some pretty awesome things you can create with Fractals.
Did you have to buy 2 subs to Octane to run in C4d and Blender?
Octane is free for Blender users
@@Brilly_Yo It is? I have a sub - and got the plug from Otoy. How do you get it if you don't have a sub?
Wow🎉🎉🎉🎉🎉🎉🎉🎉
Thanks!
I dont understand my problem, Chat gpt gave me this code
#include
shader Vectron(
float scale = 1.0 [[float min = 0, float max = 10, float slidermax = 100]],
int iterations = 10 [[int min = 1, int max = 100]],
float bailout = 10.0 [[float min = 0.1, float max = 100]],
float radius = 1.0 [[float min = 0, float slidermax = 1e4, float sliderexponent = 4]],
vector translate = {0, 0, 0},
output _sdf out = _SDFDEF)
{
// Start with initial distance
float distanceToOrigin = distance(P, translate) - radius;
// Initialize the final distance
float finalDistance = distanceToOrigin;
// Iterate to create fractal structure
for (int i = 0; i < iterations; ++i) {
// Applying scaling to the position
P *= scale;
// Update distance with Vectron formula
float distToTranslation = distance(P, translate) - radius;
// Combine distances to create fractal geometry
finalDistance = max(finalDistance, abs(distToTranslation));
}
// Assign final distance to output
out.dist = finalDistance - bailout;
}
Yes, ChatGPT is not perfect. I chat back and forth with it sometimes for a while to get the code right. It just gave me this code. Use this as a starting point and let ChatGPT this is the only code you got functional up until this point and to give variations to this. It can take some conversation to work through.
#include
shader Vectron(
int Iterations = 12,
float Bailout = 2.0,
float Power = 16.0,
vector translate = 0,
output _sdf out = _SDFDEF)
{
vector pos = P - translate;
vector z = pos;
float dr = 1.0;
float r = 0.0;
for (int i = 0; i < Iterations; i++) {
r = length(z);
if (r > Bailout) break;
// Convert to spherical coordinates
float theta = acos(z[2] / r);
float phi = atan2(z[1], z[0]);
// Power and scale the point
float zr = pow(r, Power);
theta = theta * Power;
phi = phi * Power;
// Convert back to Cartesian coordinates
z = zr * vector(sin(theta) * cos(phi), sin(theta) * sin(phi), cos(theta));
z += pos;
dr = Power * pow(r, Power - 1.0) * dr + 1.0;
}
out.dist = 0.5 * log(r) * r / dr;
}