Jump to content
Sign in to follow this  
callandekeijzer

Mandelbulb 3D fractal animation

Recommended Posts

https://gist.github.com/callandekeijzer/aa70451acfcf2d97ec0e18155a1d8ed7

Hi this is my very first post.
I'll try to be as clear as possible, but i'm very new to Houdini and programming.
After following a tutorial -->https://www.sidefx.com/tutorials/vex-in-houdini-mandelbrot-and-mandelbulb/ (which is really great btw)

I managed to create the fractal and the next step i want to take is to animate the fractal
The easiest and best way i think is to make the integer value 'I' into a 'channel' like the tutorial does with N.
and then have the value I change every frame using $F.

the main issue is that I can't turn an integer into a float, i believe?
Below is the warning that my volume wrangle node gives me.


Warning 
Errors or warnings encountered during VEX compile:
/obj/mandel/volumewrangle1/volumevop1/snippet1: Implicit cast from float to int. Use explicit cast instead. (17,13). 
Warning 
Errors or warnings encountered during VEX compile:
/obj/mandel/volumewrangle1/volumevop1/snippet1: Implicit cast from float to int. Use explicit cast instead. (17,13). 
Warning 
Vex error: /obj/mandel/volumewrangle1/volumevop1/snippet1: Implicit cast from float to int. Use explicit cast instead. (17,13) 
 

Any help in the right direction would help out, feedback on nodes, programming, post structure is welcome.

Cheers,

Callan

Mandelbulb.hipnc

Share this post


Link to post
Share on other sites

Just wrap your channel fetch with an int() function.

int i = int(ch("i"));

 

Edited by Atom

Share this post


Link to post
Share on other sites
1 hour ago, Atom said:

Just wrap your channel fetch with an int() function.


int i = int(ch("i"));

 

Or you know, use the chi() function instead of the ch() :P

there is a whole category of functions also including:

chf(): if you are really sure its a float
chs(): if you want to read it directly as a string.
chv(): for vectors
chramp(): for ramps.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×