Logo by lycium - 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: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. April 19, 2024, 05:34:27 PM


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 [2] 3 4   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: Fractal Gun: paintbrush/spraypaint style modification of fractals  (Read 6251 times)
0 Members and 1 Guest are viewing this topic.
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #15 on: December 03, 2015, 08:20:07 PM »

lol... I'm going to do something along those lines while I await 3dickulus's response. 
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #16 on: December 04, 2015, 05:53:50 AM »

 cheesy  might be nice.

  So we will have depth + coord, so we can get the vertex from that.

  I think there should be a function that you can put coord + depth into to extract a vertex, right?  Inverse projection matrix???

in DisplayWidget.cpp perspective matrix is set from current Eye, Target, Up and FOV before drawing splines but after rendering our image-to-texturewith shader code before on-quad with buffershader like...
Code:
    QMatrix4x4 matrix;
    matrix.setToIdentity();
    matrix.perspective(fov, ((float)width()/(float)height()), 0.00001, 1000.0);
    matrix.lookAt(e,t,u);

    glLoadMatrixf(matrix.constData());

matching the shader code...
Code:
		// sets depth for spline path occlusion
// see http://www.fractalforums.com/index.php?topic=16405.0
gl_FragDepth = ((1000.0 / (1000.0 - 0.00001)) +
(1000.0 * 0.00001 / (0.00001 - 1000.0)) /
clamp(Ray.Pos, 0.00001, 1000.0));

as evidenced by visible spline occlusion, the values seem good, I would like to fix a few bugs and clean up a little before starting to code something new, so maybe the larger math brains can look at the numbers while I'm trying to squish a few texture bugs.

you can check the docs for functions built into QMatrix here http://qt.apidoc.info/5.1.1/qtgui/qmatrix4x4-members.html the thing you require may already be there wink

edit:clarification re: the order of rendering texture + rendering with buffershader mentioned above,
just a thought... if the depth buffer is not cleared between shader and buffershader (true) then depth should be readily available in the buffershader frag? (could also be passed as vec4 color.w) if that is the case there is a lot of code space available for tinkering with because buffershader compiles to a little more than 200 lines of assembler, the max for a shader is over 15000, render primary obj in shader, render "spray" in buffershader huh?

edit2: I think you will have to "record" a stroke then render it on MouseButtonUp, this is a very ambitious goal that may require a lot of GPU power to realize at a reasonable rate, but if you write the code and it works, even slowly, I'm sure the hardware will catch up smiley
« Last Edit: December 04, 2015, 07:09:07 AM by 3dickulus, Reason: \"record\" » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #17 on: December 04, 2015, 08:56:38 AM »

lol..   thanks for the update.  I am worried about mouse clicks using up too much in the way of GPU resources...
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #18 on: December 10, 2015, 11:20:12 PM »

  This is still on my mind.  Have another easier thing to implement first.

  Might fix the heightmap/texture thing first too... wink

   ... not like we won't be spraypainting heightmaps onto fractals when we get the chance.  wink
« Last Edit: December 11, 2015, 02:03:09 AM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #19 on: January 05, 2016, 01:15:05 AM »

Fractal spray gun is AWESOME.  Official release will wait for 3dickulus to update.

  It's pretty fun.  3dickulus and I set up some simple code that basically allows you to smoothly "hammer" and mold fractals.  Holding in the mouse and <ctrl> button makes it happen continuously, which acts a bit like a "spray gun".  Wow...

  It is awesome.  Completing code- one or 2 things need to be added for it to be complete, although maybe put it out there for you to test before it is completely done.  


  Probably (definitely  cheesy ) want this in Mandelbulber and M3D.  cheesy
Logged

mclarekin
Fractal Senior
******
Posts: 1739



« Reply #20 on: January 05, 2016, 11:18:56 PM »

Looking forward to trying this out. Hurry hurry hurry smiley
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #21 on: January 06, 2016, 07:06:06 AM »

Fractal spray gun is AWESOME.  Official release will wait for 3dickulus to update.

  It's pretty fun.  3dickulus and I set up some simple code that basically allows you to smoothly "hammer" and mold fractals.  Holding in the mouse and <ctrl> button makes it happen continuously, which acts a bit like a "spray gun".  Wow...

  It is awesome.  Completing code- one or 2 things need to be added for it to be complete, although maybe put it out there for you to test before it is completely done.  


  Probably (definitely  cheesy ) want this in Mandelbulber and M3D.  cheesy
sorry, my english not so good... what you talking about?
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #22 on: January 06, 2016, 08:59:26 AM »

  It's a tool to modify fractals by clicking on them in the fractal window...  in early stages of development.  It can be used in many ways.... like a hammah.  It's not what I originally intended to create (I intended on storing all data in a massive array, and then interacting with the data directly instead of re-rendering every time we add something), but it's good.

  These are all regular z^8 Mandelbulbs that I "pushed" and "pulled" on with the tool, the one I tried making mini-fractals on, but didn't set the frag up correctly to get details (just selected "closest" DE of the minibulb and the main one, instead of figuring out the math...):




  Still needs a bit of work prior to release, but it's getting there. 
« Last Edit: January 06, 2016, 09:20:26 AM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #23 on: January 07, 2016, 07:13:46 AM »

not stretched.. stretched.  Why?  Needed to stretch a Menger.

  Probably should write miniMengering code, ehh?  



  I'm thinking directional stretching, only applied to one axis would be sort of cool.  Wait.  Maybe real cool.  Imagine opening a drawer on a Menger.  Is it possible?  Can it be done? 

  I better put on some tunes before I code any more.


 
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #24 on: January 07, 2016, 08:47:06 AM »

  here's a quick vid 3.5 Mb

edit: see next post
« Last Edit: January 08, 2016, 02:56:55 AM by 3dickulus, Reason: see next post » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #25 on: January 07, 2016, 09:18:24 AM »

 Here... put it on youtube:

  Ok.. re-clicked "publish".  Apparently leaving a youtube webpage after clicking publish actually makes it so the video doesn't publish, even when you click "publish" (it warned me to wait until it was done...  I assume it's for people who decide not to publish something at the last second and try to close a tab to keep it from going live).

<a href="https://www.youtube.com/v/mQzi0LuG3yo&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/mQzi0LuG3yo&rel=1&fs=1&hd=1</a>
« Last Edit: January 07, 2016, 06:06:41 PM by M Benesi » Logged

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



kizny
WWW
« Reply #26 on: January 07, 2016, 07:44:50 PM »

This looks sick! How far will we be able to interact with the fractal?
Would the brush data be accessible as a 3D vector field or a texture? So that I can access it from the code and implement different formulas to manipulate the fractal?

Is this available as a source code or there are already any builds?
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #27 on: January 07, 2016, 09:05:28 PM »

  How far do you want to interact with a fractal?  

 For now, we're storing information in uniform arrays that are accessible from frags.

  A more complete implementation with quantized space (for various reasons, eliminate loops, etc.) might be in the works, but it will still use this code so that we can undo and redo the last changes made to the fractal.

  For now.. you have to use loops in frags to apply changes to the fractal and recalculate entirely, instead of applying changes to locations in quantized space without recalculating the whole thing.

 
Code:
quantized space.... eventually:
resolution3d= step size between points in quantized space;

 if resolution3d= .05;  then  (.13, .06, -.04) =  (.15, .05, -.05)

vec4 pointData <x> [y][z][iteration] =  vec3 orbitTrapData [iteration], distance estimation[iteration];

  Actually will probably bind the point data to textures for storage between redraws, as non-uniforms are lost on redraw.  

  Otherwise, a line of code has to be changed.  Building and testing now.   haha.. fixed it.  What a pain.  A whole morning of work to get a couple of lines of code to work!@$!@$  that's life, ehh?

  I'm putting together a couple of frags to demo the functionality, and the corrected source code (maybe some binaries) should be up tonight.


  Code exists, waiting for 3dickulus to look it over.  whistle whistle...
 
« Last Edit: January 09, 2016, 08:40:28 AM by M Benesi » Logged

LMarkoya
Strange Attractor
***
Posts: 282



« Reply #28 on: January 09, 2016, 02:25:03 AM »

Looks like a great start, looking forward to playing with this one Repeating Zooming Self-Silimilar Thumb Up, by Craig
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #29 on: January 10, 2016, 12:53:25 AM »

should have put this one up earlier, need to refine it to the simplest form so that it's a bit more generic and applicable to fractal objects without rewriting all of the frags in the Examples folder.

<a href="https://www.youtube.com/v/nZNG68ePF2s&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/nZNG68ePF2s&rel=1&fs=1&hd=1</a>

source code is available but by no means finalized

hot-keys work like this...

CTRL+LMB = adding/pushing
CTRL+ALT+LMB = flip sign to negative, subtracting/pulling
CTRL+SHIFT+LMB = delete the last one, decrement index to array of recorded mouse clicks
CTRL+ALT+SHIFT+LMB = reset, delete all and start again

Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: 1 [2] 3 4   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
A fairly classic-style fractal Images Showcase (Rate My Fractal) David Makin 5 2612 Last post December 09, 2006, 02:30:37 AM
by Unhooked
Weird mandelbrot modification. Meet & Greet init 1 1191 Last post September 11, 2011, 11:48:16 PM
by lycium
Cheater's Brot... and spokes modification Theory M Benesi 0 2234 Last post February 29, 2012, 05:35:30 AM
by M Benesi
Do fractal-artists actually know which modification effects what in MB3D ?How..? Help & Support psYnfinite 1 545 Last post June 03, 2013, 07:27:46 PM
by vinz
Circle and Line, fractal style Images Showcase (Rate My Fractal) Eric B 1 2058 Last post January 07, 2014, 09:27:26 PM
by youhn

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.166 seconds with 25 queries. (Pretty URLs adds 0.014s, 2q)