Logo by bib - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. April 20, 2024, 09:59:49 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Using data from the previous frame in the next frame.  (Read 1995 times)
0 Members and 1 Guest are viewing this topic.
JosLeys
Strange Attractor
***
Posts: 258


WWW
« on: October 07, 2015, 05:32:07 PM »

I have been looking for examples in Fragmentarium that do this, but have not found any. fiery
Here is what I want to do. (it's an animation)

I start with a collection of 3D points in a certain configuration.
I then apply a certain procedure that moves all these points. (the displacement is different for all the points as it depends on the point's location)
I end up with all the points in new positions.

I would like these positions to be the start position in the next frame, so that I have to apply the displacement procedure only once.
(as opposed to having to do n displacements in the n-th frame!)

I suppose I have to write the positions of the points in an array, but have not figured out how to do this so that the array I have at the end of the 1st frame becomes the starting position for the second frame, etc...

Can anybody help?

Jos

Logged
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #1 on: October 07, 2015, 07:36:40 PM »

You could handle that via QScript if it operates on uniforms.
Other than that the variables can't be shared between frames (as far as I know).
There are examples for writing data to frame buffer and reading from a frame buffer (the life game), but it works on a 2D image.
You could work around that buffering additional dimension as 2D tiles in one image. THis could work for even very high images using hires render feature, QScript and sampling a previously rendered bitmap, but I am not sure what is the max resolution you could handle.

As far as I understand you're probably trying to do something like a particle system. Probably an overkill for both Fragmentarium and GLSL.
If you're looking for a good particle environment, I'd recommend on a combination of 3Ds MAX, Krakatoa Renderer and writing custom DLLs for particles creation and manipulation.
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #2 on: October 07, 2015, 08:01:19 PM »

Yes you could call what I have in mind a particle system.
I have just been tinkering with Fragmentarium/GLSL, and am no specialist by far.
I did look at the 'game of life' frag as it does just that, but as you say, it buffers something in 2D.

I can do what I want to do, to a certain extent, in Povray, by saving my point collection to a file between frames, but was hoping that I could get away with a lot more particles in Fragmentarium.
I do not have 3Ds MAX...
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #3 on: October 07, 2015, 08:54:58 PM »

Please take a close look at synthclipse, it can do all kinds of shaders, and has a full javascripting engine out of the box
Logged

---

divide and conquer - iterate and rule - chaos is No random!
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #4 on: October 08, 2015, 05:25:15 AM »

How many points ? Lin or Win ?
I have reworked the texture code a bit so that...
Code:
/// in a frag this should create a mipmapped texture
uniform sampler2D myTexture; file[mytexture.png]
#TexParameter myTexture GL_TEXTURE_MAX_LEVEL 1000
#TexParameter myTexture GL_TEXTURE_WRAP_S GL_REPEAT
#TexParameter myTexture GL_TEXTURE_WRAP_T GL_REPEAT
#TexParameter myTexture GL_TEXTURE_MAG_FILTER GL_LINEAR
#TexParameter myTexture GL_TEXTURE_MIN_FILTER GL_LINEAR_MIPMAP_LINEAR
...and am thinking about adding access to more GL texture parameters and options, maybe real GL_TEXTURE_3D volume?

edit: would exr file with depth (RGBZ) be helpful?
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #5 on: October 08, 2015, 09:35:57 AM »

#3dickulus
I'm in Windows.
I'm thinking a million points or so...
As I said, I'm an amateur in Fragmentarium. No idea how to work with these textures and exr files.
Logged
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #6 on: October 08, 2015, 03:49:02 PM »

Dick, if there's any chance to have a 3D texture in the future, that'd be awesome.
I already see a full 3D fractal to pointcloud renderer challenge smiley
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #7 on: October 08, 2015, 06:38:56 PM »

One thing I don't understand: the sort of thing I want to do appears to be perfectly possible in WebGL.
See : https://www.ibiblio.org/e-notes/webgl/gpu/chaos/lorenz_gpu.html


...but not in Fragmentarium?
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #8 on: October 09, 2015, 04:29:53 AM »

@JosLeys the fragment code from that page looks very simple but the rest of it, webgl, is doing a lot of setup and management specifically for that fragment.
Fragmentarium does not do any geometry stuff like instancing or 3D GL points, just DE for pixel colors on a gl surface.
the only thing I can think of would be to have a "persistent" array of points that are initialized at fragment load and altered as your fragment executes, RGBFloat texture can store xyz coords but I think it would require some specialized coding on the C++ side to manage/load/save.

The GL code in this proggie, http://www.digilanti.org/universe/ , would probably be of interest as it does basically what you want but in C++, it's a bit old but worked extremely well, it creates "clouds" of points, assigns a speed, direction and texture to each point then applies gravity formula to alter the positions.

The current state of EXR in Fragmentarium is that the output files contain RGBAF16 or RGBZF16, these files can be loaded and used as textures, but, I have to admit that I haven't had time to test extensively, only to the degree that it seems to be working. I don't think you want to load and save the point cloud between shader/frame passes, and iirc Fragmentarium doesn't (currently) do anything with the alpha channel as it's used internally for hit/color accumulation.

@PK if I add the complete list of options for GL textures to the parser someone is sure to find a use for them wink
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #9 on: October 09, 2015, 09:37:24 AM »

@3dickulus: thanks for the explanation!
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Frame Fractal Fun Graph 0 1241 Last post April 21, 2010, 04:50:21 PM
by Graph
Delirium on a frame 2d Art DarkBeam 0 1160 Last post April 10, 2011, 04:44:56 PM
by DarkBeam
multi-frame animation render settings vs. single frame Fragmentarium gardyll 1 3358 Last post June 29, 2012, 03:59:02 PM
by Syntopia
Frame of Reference I Fractal Science Kit Gallery Ross Hilbert 0 1445 Last post July 23, 2012, 05:14:28 PM
by Ross Hilbert
MB3D_0406b3 frame 326 Mandelbulb3D Gallery 0Encrypted0 0 740 Last post December 23, 2012, 06:33:49 AM
by 0Encrypted0

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.192 seconds with 25 queries. (Pretty URLs adds 0.009s, 2q)