Fractal with ICE - WIP

Discussions about SOFTIMAGEs© Interactive Creative Environment©
User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Fractal with ICE - WIP

Post by Daniel Brassard » 15 Oct 2012, 03:22

I have been reading about fractals and Iterated Function Systems lately, specially the Fractal Flame, and was wondering what would it takes to create a pure 2D fractal shape in Softimage using ICE (scripting is tooooo easy).

For those interested, here is the main document I based my experiment on.

http://flam3.com/flame.pdf

Well, after a few frustrating attempts, I got my first fractal shape working - The Sierpinski Triangle (Sierpinski Gasket).

Here is a work in progress, obviously. Looking good at 10000 particles, better at 100000 particles.

On my low spec machine, it takes approximately two minutes to generate the point cloud at 100000 points.

Next, the Sierpinski Carpet (Menger). Eventually I will move to 3D fractals, I think I will like this experiment!

Dan
Attachments
Sierpinski_Triangle.jpg
Sierpinski_Triangle2.jpg
Last edited by Daniel Brassard on 15 Oct 2012, 14:58, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

angelous4x
Posts: 133
Joined: 06 Nov 2011, 05:24
Location: new York
Contact:

Re: Fractal with ICE - WIP

Post by angelous4x » 15 Oct 2012, 06:52

WOW. looks awesome. Looking forward to the progress you make. And thanks for shading the paper.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Fractal with ICE - WIP

Post by Daniel Brassard » 16 Oct 2012, 05:16

To make my life easier, I moved a lot of the formulas to affine transforms. Instead of plotting long x,y formulas, I only have to multiply a vector by a 3x3 matrix, simplier and quicker to experiment with.

More fractal shapes:

Vicsek

The famous "fern" as popularized by Michael Barnsley, a pioneer in the field.
Attachments
Fractal_Vicsek.jpg
Fractal_Fern.jpg
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Kerro Perro
Posts: 306
Joined: 20 Mar 2011, 01:01
Location: Leiden, the Netherlands
Contact:

Re: Fractal with ICE - WIP

Post by Kerro Perro » 16 Oct 2012, 12:29

Oh wow Daniel! Do you think eventually this could produce 3D fractals like with MandelBulb 3D?

That would be sooooo awesome! :ympray:

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Fractal with ICE - WIP

Post by Daniel Brassard » 16 Oct 2012, 15:20

Hi Kerro,

It's probably too early to tell at this point in time in the experimentation. The potential is there to create the Mandelbulb in 3D.

That would indeed be awesome. :D
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: Fractal with ICE - WIP

Post by Tekano » 16 Oct 2012, 15:36

awesome stuff Daniel san, is this the only way to do this in ICE with the repeat node - for every iteration? could be slow later on with more complicated stuff which would make attempting to do some mandelbulb stuff somewhat time consuming? think someone did a mandlebrot compiled node in ICE here already, and I guess this would be the way to go for efficiency. a c++ compiled node of the iteration instead of the repeat node. as an exercise for learning the maths and ideas though, doing it in ICE can't be beat.

Gossip is what no one claims to like, but everybody enjoys.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Fractal with ICE - WIP

Post by Daniel Brassard » 16 Oct 2012, 16:24

Hi Tekano,
as an exercise for learning the maths and ideas though, doing it in ICE can't be beat.
The experiment is exactly about learning the math behind Fractal representation and learning to do new things with ICE using traditional nodes. I am well aware of Julien fractal compound which is nice and quick.

You are right about the slow process, there are two nodes in the ICE tree that are super slow: the repeat with iteration and add point nodes. I don't know yet if I can get around those nodes to get the same results.

I can program these thing via script (javascript or python) or C++, but that would defeat the learning process of ICE, finding its capabilities and limitations. It's only by pushing the envelope that we can find new ways to do things or request new capabilities in ICE that would serve the greater good of the community. After all ICE is relatively young compare to Houdini/Rino Grasshopper. The developers need our input to improve and augment ICE capabilities.

Artistically and technically, i am learning a ton via trial and errors, I developed a rough method of doing pseudorandom values on vectors (Monte Carlo integration style), used matrix instead of formulas to speed up calculation, learned to use matrix to scale, rotate, transform, skew, shear and reflect shapes and, where each element in the matrix can contribute in deforming the shape.

in the end, I am becoming a better ICE Artist and it's a fun journey. *-:)
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Fractal with ICE - WIP

Post by Daniel Brassard » 17 Oct 2012, 04:48

A few more fractals:

Sierpinski Carpet (Menger)
Fractal Tree
Attachments
Sierpinski_Gasket.jpg
Fractal_Tree.jpg
Last edited by Daniel Brassard on 17 Oct 2012, 05:00, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Fractal with ICE - WIP

Post by Daniel Brassard » 17 Oct 2012, 04:51

The Fractal Coral
The Fractal Binary
Attachments
Fractal_Coral.jpg
Fractal_Binary.jpg
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Mr.Core
Posts: 148
Joined: 10 Aug 2011, 12:35
Skype: giga-core
Location: Kharkov, Ukraine

Re: Fractal with ICE - WIP

Post by Mr.Core » 17 Oct 2012, 14:51

The coral is amazing! Can it be used for terrain generating for example ? The pattern is very similar to mountain ridge, I guess just needs some halftones to achieve smooth falloff on displacement

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Fractal with ICE - WIP

Post by gustavoeb » 17 Oct 2012, 14:58

Veeery intersting indeed Daniel! Good job!
Looking forward to see what else you can come up with
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Fractal with ICE - WIP

Post by Daniel Brassard » 22 Oct 2012, 19:13

OK, here is my first request to AD Dev:

Can you build some factory ICE nodes that would give access to the C++ standard library of complex numbers such as:
  • ICE node complex number real x + imaginary y as input, complex number x + yi as output
    ICE node complex constant real a + imaginary b, scalar input, a + bi as output
    ICE node complex that give you access to the real and imaginary part of the complex number as output
    ICE node abs that return the absolute value of complex (like vector length)
    ICE node arg that return the phase angle of complex (like vector angle/direction)
    ICE node norm that return the squared magnitude, defined as the addition of the square of both the real part and the imaginary part (without the imaginary unit).
    ICE node conj that return the complex conjugate i.e x - yi
    ICE node polar that return complex from polar components
    ICE node functions: cos, cosh, sin, sinh, tan, tanh, exp, log, log10, pow, sqrt all working on the complex number (or modify the existing one to work with complex number)
    ICE node operators for complex numbers (add, subtract, multiply, divide, etc.)
That would be sweet!

Dan
Last edited by Daniel Brassard on 22 Oct 2012, 20:22, edited 2 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Fractal with ICE - WIP

Post by Bullit » 22 Oct 2012, 19:27

What about we make here a thread like Chris Chia bug/improvement thread in xsibase - don't remember the title of it - putting requests like this all over place no one caches it.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Fractal with ICE - WIP

Post by Daniel Brassard » 22 Oct 2012, 20:20

That would be a good idea Bullit, so that we have a proper thread to track these enhancement requests. I don't know if Chris Chia is a member of this forum but I am willing to contribute. I will also go on subscription and sent the above request directly!

P.S. I have sent an enhancement request to AD. The priority may be very low, but I made the effort.

Cheers!
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: Fractal with ICE - WIP

Post by Hirazi Blue » 22 Oct 2012, 20:44

In theory a bug thread is a good idea. I would however advise against one single thread in favor of a couple of threads, each for the relevant subforum (Modeling, Animation... etc.). Making them all "stickies" (which I'd be willing to do) should help with their general accessibility, while separating them per topic should make them more understandable, clear and manageable by all.

As to the membership status of mr. Chris Chia: he isn't a member yet. But if you feel you need a bug thread, I wouldn't wait for his membership... I have personally invited him to join here twice. He hasn't.
Stay safe, sane & healthy!

grahamef
Posts: 281
Joined: 23 Jun 2009, 21:01

Re: Fractal with ICE - WIP

Post by grahamef » 22 Oct 2012, 22:32

Daniel Brassard wrote:OK, here is my first request to AD Dev:

Can you build some factory ICE nodes that would give access to the C++ standard library of complex numbers such as:
  • ICE node complex number real x + imaginary y as input, complex number x + yi as output
    ICE node complex constant real a + imaginary b, scalar input, a + bi as output
    ICE node complex that give you access to the real and imaginary part of the complex number as output
    ICE node abs that return the absolute value of complex (like vector length)
    ICE node arg that return the phase angle of complex (like vector angle/direction)
    ICE node norm that return the squared magnitude, defined as the addition of the square of both the real part and the imaginary part (without the imaginary unit).
    ICE node conj that return the complex conjugate i.e x - yi
    ICE node polar that return complex from polar components
    ICE node functions: cos, cosh, sin, sinh, tan, tanh, exp, log, log10, pow, sqrt all working on the complex number (or modify the existing one to work with complex number)
    ICE node operators for complex numbers (add, subtract, multiply, divide, etc.)
That would be sweet!

Dan
You could use quaternions (well, except for cos, cosh, etc.), which are essentially an extension of complex numbers and just leave j and k at 0. I believe that ICE uses W for the real part and X for i, but it doesn't really matter as long as two of the XYZ values are 0. Things like the conjugate would be fairly simple compounds.

Post Reply

Who is online

Users browsing this forum: No registered users and 61 guests