Fractal with ICE - WIP
Re: Fractal with ICE - WIP
Veeery intersting indeed Daniel! Good job!
Looking forward to see what else you can come up with
Looking forward to see what else you can come up with
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/
Blog: http://www.gustavoeb.com.br/
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Fractal with ICE - WIP
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:
Dan
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.)
Dan
Last edited by Daniel Brassard on 22 Oct 2012, 20:22, edited 2 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Fractal with ICE - WIP
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.
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Fractal with ICE - WIP
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!
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
set "Softimage" "true"
$endif
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Fractal with ICE - WIP
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.
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!
Re: Fractal with ICE - WIP
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.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:
That would be sweet!
- 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.)
Dan
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Fractal with ICE - WIP
Thanks for the hint Graham. I'll investigate this as well.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.
Dan
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Fractal with ICE - WIP
A little experiment in fractal visualization using 4 reflective mirror balls arranged in tetrahedral configuration.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Fractal with ICE - WIP
Well, I hit a snag with the Mandelbrot Set. I can generate up to 19 iterations, but at 20 iterations i get this message:
Cannot allocate xxxxxxx bytes of continuous memory. XSI may become unstable from now on.
Then XSI just crash.
I tried many things to optimize the ICETree but I can't find a way to get around that message. Well maybe someone can help. I attached the scene file if somebody care to test.
Some helpful tips is greatly appreciated. I am using Softimage 2013.
Dan
Cannot allocate xxxxxxx bytes of continuous memory. XSI may become unstable from now on.
Then XSI just crash.
I tried many things to optimize the ICETree but I can't find a way to get around that message. Well maybe someone can help. I attached the scene file if somebody care to test.
Some helpful tips is greatly appreciated. I am using Softimage 2013.
Dan
- Attachments
-
- Fractal_Mandelbrot5.zip
- (129 KiB) Downloaded 124 times
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Fractal with ICE - WIP
With your default settings, 20 iterations worked, as did 30 (RAM consumption only about 500 MB). But at 30 iterations I then doubled the X subdivisions to 8, and that made the scene crash after a while.
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Fractal with ICE - WIP
Thanks Chris_TC for the test.
With my old machine, I can't pass 500MB so crash more often than you. Even when I change the setting from 19 iteration to 10 iterations, you would think it's less work, the machine would not crash, but it does!
My new machine in the other hand will be a beast (Asus P9X79 / 32 MB Ram / I7 Quad Core 3820). Just have to choose the right Graphic card for the job.
Well, back to the drawing board, may have to code that one. I wonder if I could do the Mandelbrot via script and feed the PointCloud with the color attribute .....
With my old machine, I can't pass 500MB so crash more often than you. Even when I change the setting from 19 iteration to 10 iterations, you would think it's less work, the machine would not crash, but it does!
My new machine in the other hand will be a beast (Asus P9X79 / 32 MB Ram / I7 Quad Core 3820). Just have to choose the right Graphic card for the job.
Well, back to the drawing board, may have to code that one. I wonder if I could do the Mandelbrot via script and feed the PointCloud with the color attribute .....
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Fractal with ICE - WIP
I think the problem is that you are using a While loop inside a Repeat loop. In fact the outer loop looks fishy to me -- why do you need to loop by the size of the ParticlePosition array?
I'm attaching a simplified example. Not sure how high you can go before it breaks.
EDIT: So far I've done a 1000x1000 grid with 5000 iterations with a bunch of other apps open. It gets slow but doesn't seem to require more memory with increased iterations.
I'm attaching a simplified example. Not sure how high you can go before it breaks.
EDIT: So far I've done a 1000x1000 grid with 5000 iterations with a bunch of other apps open. It gets slow but doesn't seem to require more memory with increased iterations.
- Attachments
-
- Mandelbrot_gf.zip
- (111.16 KiB) Downloaded 100 times
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Fractal with ICE - WIP
Hi Grahamef,
Thank you for taking the time to look at my ICETree.
Each particle position give me the x and y position that I need to feed the mandelbrot algorithm with.
I use the ParticlePosition to cycle each particle for the while loop. Maybe I don't need to do that.
I will look at your solution obviously as it does not crash like mine. Always learning some tricks with ICE.
Thank you for taking the time to look at my ICETree.
The size of the ParticlePosition array is used to determine how many particle position I have.In fact the outer loop looks fishy to me -- why do you need to loop by the size of the ParticlePosition array?
Each particle position give me the x and y position that I need to feed the mandelbrot algorithm with.
I use the ParticlePosition to cycle each particle for the while loop. Maybe I don't need to do that.
I will look at your solution obviously as it does not crash like mine. Always learning some tricks with ICE.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Fractal with ICE - WIP
I let it run overnight with 100000 iterations. Starting to see some nice fractal effects at the edges, but losing the gradient -- I might try running the value through a power function before look-up.
Re: Fractal with ICE - WIP
Doing it one particle at a time is the problem. Do them all at once (which you can't do with an object array, you need a per-component set of values) and let ICE chop them up into buckets for multi-threading.Daniel Brassard wrote:
Each particle position give me the x and y position that I need to feed the mandelbrot algorithm with.
I use the ParticlePosition to cycle each particle for the while loop. Maybe I don't need to do that.
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Fractal with ICE - WIP
Interesting, almost a new thread that need to be opened to show that trick in action.Do them all at once (which you can't do with an object array, you need a per-component set of values) and let ICE chop them up into buckets for multi-threading.
Maybe you can provide a simple example of this (this part of the ICE workflow is still a bit hard for me to grasp)
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Who is online
Users browsing this forum: No registered users and 34 guests