im Wondering if its possible to animate vectron script values by adding a key framable slider or altering its script to say that in x number of frames the number should be x ?
Trying to think a way to animate following numbers on menger sponge boolen.
Mainly the 2.1 and 3.2
vector a = mod( p*s, 2.1 )-1.0;
s *= 3.0;
vector r = abs(1.0 - 3.2*abs(a));
Does anyone know if this is possible?
Is it possible to animate vectron values in its script?
Forum rules
Please do not post any material that is copyrighted or restricted from public use in any way. OTOY NZ LTD and it's forum members are not liable for any copyright infringements on material in this forum. Please contact us if this is the case and we will remove the material in question.
Please do not post any material that is copyrighted or restricted from public use in any way. OTOY NZ LTD and it's forum members are not liable for any copyright infringements on material in this forum. Please contact us if this is the case and we will remove the material in question.
Hi,
you can use the time parameter, please have a look at this example:
ciao Beppe
you can use the time parameter, please have a look at this example:
Code: Select all
#include "octane-oslintrin.h"
shader OslGeometry(
int Iterations = 10,
float Power = 2.0,
float Bailout = 20,
output _sdf c = _SDFDEF)
{
vector pos = P;
float power = Power;
float w = fmod(_wipes(), 300.0) / 300.0;
w += time / 300.0;
power = w * 5 + 5.0;
vector z = P;
float dr = 1.0;
float r = 0.0;
for (int i = 0; i < Iterations ; i++) {
r = length(z);
if (r>Bailout) break;
// convert to polar coordinates
float theta = acos(z[2]/r);
float phi = atan2(z[1],z[0]);
dr = pow( r, power-1.0)*power*dr + 1.0;
// scale and rotate 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(phi)*sin(theta), cos(theta));
z+=pos;
}
c.dist = 0.5*log(r)*r/dr;
}
- AtomicNixon
- Posts: 7
- Joined: Fri Jul 26, 2019 9:08 am
Could you tell me the purpose of this line, and what the function _wipes() does, is for? Having real trouble getting this to work properly. More info on how the time variable works is very much needed. Also, any other undocumented variables we should know about?float w = fmod(_wipes(), 300.0) / 300.0;