Logo by miles - 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. May 06, 2024, 11:04:26 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 ... 6 7 [8]   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: Help?  (Read 2795 times)
0 Members and 1 Guest are viewing this topic.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #105 on: December 10, 2015, 04:36:52 AM »

Knighty's DE  wink
Logged

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



WWW
« Reply #106 on: December 10, 2015, 04:47:00 AM »

 afro
Logged

Resistance is fertile...
You will be illuminated!

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



WWW
« Reply #107 on: December 10, 2015, 05:34:46 AM »

  lol.. I'm going to have to try this out on a modern GPU!! 
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #108 on: December 10, 2015, 09:23:21 AM »

  When loading textures, you need to load both the coloring texture AND the heightmap texture at the same time, or it doesn't work (so before you build, make sure to reselect both textures, or it will either not use the coloring texture, or it will not use the heightmap texture).  

 HeightIter:  when to apply it;  set higher, and set speed to quick, strength to low... to make the fractal a bit burnished..
  
  HeightStrength: strength of heightmap.  // going to add a second one for the second iteration, so strengths are independent...   
  hTextureOffset:  Starting offset in texture to map from...
  hTextSpeedMult and hTextureSpeed: assign the speed of texture rotation.
  hscale:  how much of r,g,b components of texture do you want?  first 3 are r,g, and b, last variable is combined.  So if you have textures that use specific heights for red, green, and blue components, you can determine how much you use.

  MapType 0:  assign speed of texture rotation with texture speed and texture multiplier.  Move it around with texture offset variables.  

  MapType 1:  Assign speed using tsides and tsides2 (*based off of a polyhedral formula), texture speed, and texture multiplier.  Use offset variables and HeightStrength too.  

  MapType 2: use current z orbit values to assign location in texture for height map pick.  horbitTexX contributes to the x coordinate in the texture, horbitTexY contributes to the y coordinate in the texture.  
  MapType 3: uses orbitTrap values to assign location to use in texture.  

....

  

* MengerWorkOnHeightmap.frag (25.64 KB - downloaded 24 times.)
Logged

Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #109 on: December 10, 2015, 09:42:33 AM »

  lol.. I'm going to have to try this out on a modern GPU!! 
i overclocked my gtx660 in bios  grin
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #110 on: December 10, 2015, 08:42:38 PM »

Hi! I have a little question for you.
Can you set distortion completely repeated picture of texture? I mean the full march of relief and coloring.
Thank you!

  The patterns don't match up perfectly inside the fractal (just on certain faces!)... I think it's because the Menger switches orientation as the calculation proceeds.  On second thought.. maybe need to use the same orbitTraps for both.  Will UPDATE later...

UPDATE:  Forgot to post it!  I didn't figure out the orientation problem yet.  I'll post the Menger and raytracer here, but the coloring only aligns perfectly in certain cases.

  With the Menger, I'm assuming that interior orientations are switched around as the x,y, and z coordinates are selected from, since the z coordinate is the one the majority of operations are performed on (although I should probably look at the math of this version before I go making statements like that.... will later).

  I wrote another version of the Menger sponge a LONG time ago that didn't use the orientation optimizations that Knighty, Kali or maybe msltoe?? (I forgot who did it, I apologize!) introduced.  It calculated EVERY single part of the whole cube individually, which means that it preserves orientations.

  Hahaha... whoever thought that my old clunky non-optimized formula would be useful?  I'll dig around.  

  For your amusement:
Code:
rmin=minRadius;
r=sqr(sx- 1) + sqr(sy- 1) + sqr (sz- 1 );
if (r<rmin) {
rmin=r; sx2=1 ; sy2=1 ; sz2=1 ;
}
r=sqr(sx) + sqr(sy- 1) + sqr (sz- 1);
if (r<rmin) {
rmin=r; sx2=0 ; sy2=1 ; sz2=1 ;
}
r=sqr(sx+1) + sqr(sy- 1) + sqr (sz- 1 );
if (r<rmin) {
rmin=r; sx2=-1 ; sy2=1 ; sz2=1 ; /* third one  */
}
r=sqr(sx- 1) + sqr(sy) + sqr (sz- 1 );
if (r<rmin) {
rmin=r; sx2=1 ; sy2=0 ; sz2=1 ;
}

r=sqr(sx+1) + sqr(sy) + sqr (sz- 1 );  
if (r<rmin) {
rmin=r; sx2=-1 ; sy2=0 ; sz2=1 ;
}

r=sqr(sx- 1) + sqr(sy+1) + sqr (sz- 1 );
if (r<rmin) {
rmin=r; sx2=1 ; sy2=-1 ; sz2=1 ;
}
r=sqr(sx) + sqr(sy+1) + sqr (sz- 1);
if (r<rmin) {
rmin=r; sx2=0 ; sy2=-1 ; sz2=1 ;
}
r=sqr(sx+1) + sqr(sy+1) + sqr (sz- 1 );   /* 9  */
if (r<rmin) {
rmin=r; sx2=-1 ; sy2=-1 ; sz2=1 ;
}
/* next set  */
r=sqr(sx+ 1) + sqr(sy- 1) + sqr (sz );
if (r<rmin) {
rmin=r; sx2=-1 ; sy2=1 ; sz2=0 ;
}

r=sqr(sx+1) + sqr(sy+ 1) + sqr (sz );
if (r<rmin) {
rmin=r; sx2=-1 ; sy2=-1 ; sz2=0 ; /* third one  */
}
r=sqr(sx- 1) + sqr(sy+1) + sqr (sz );
if (r<rmin) {
rmin=r; sx2=1 ; sy2=-1 ; sz2=0 ;
}

r=sqr(sx-1) + sqr(sy-1) + sqr (sz );   /*  6    */
if (r<rmin) {
rmin=r; sx2=1 ; sy2=1 ; sz2=0 ;
}
/* -z set  */
r=sqr(sx- 1) + sqr(sy- 1) + sqr (sz+ 1 );
if (r<rmin) {
rmin=r; sx2=1 ; sy2=1 ; sz2=-1 ;
}
r=sqr(sx) + sqr(sy- 1) + sqr (sz+ 1);
if (r<rmin) {
rmin=r; sx2=0 ; sy2=1 ; sz2=-1 ;
}
r=sqr(sx+1) + sqr(sy- 1) + sqr (sz+ 1 );
if (r<rmin) {
rmin=r; sx2=-1 ; sy2=1 ; sz2=-1 ; /* third one  */
}
r=sqr(sx- 1) + sqr(sy) + sqr (sz+ 1 );
if (r<rmin) {
rmin=r; sx2=1 ; sy2=0 ; sz2=-1 ;
}

r=sqr(sx+1) + sqr(sy) + sqr (sz+ 1 );  
if (r<rmin) {
rmin=r; sx2=-1 ; sy2=0 ; sz2=-1 ;
}

r=sqr(sx- 1) + sqr(sy+1) + sqr (sz+ 1 );
if (r<rmin) {
rmin=r; sx2=1 ; sy2=-1 ; sz2=-1 ;
}
r=sqr(sx) + sqr(sy+1) + sqr (sz+1);
if (r<rmin) {
rmin=r; sx2=0 ; sy2=-1 ; sz2=-1 ;
}
r=sqr(sx+1) + sqr(sy+1) + sqr (sz+ 1 );   /* 9  */
if (r<rmin) {
rmin=r; sx2=-1 ; sy2=-1 ; sz2=-1 ;
}

if (juliaMode) {
sx= cr+ scalef*sx-sx2*scalef2;
sy= ci+ scalef*sy-sy2*scalef2;
sz= cj+ scalef*sz-sz2*scalef2;
} else {
sx= pixelr+ scalef*sx-sx2*scalef2;
sy= pixeli+ scalef*sy-sy2*scalef2;
sz= pixelj+ scalef*sz-sz2*scalef2;
}
z=quaternion(sx,sy,sz,sqrt(sqr(sx)+sqr(sy)+sqr(sz)));
//bailout = sqrt(scalef2);
if (skmode) {
if (abs(sx)>abs(sy) && abs(sx)>abs(sz)) {
bail=abs(sx);

} else if (abs(sy)>abs(sz)) {
bail= abs(sy);
} else {
bail=abs(sz);
} } else  {
bail = sqr(sx)+sqr(sy)+sqr(sz);
}

  So... it'll take a bit of editing and rewriting.  Actually, I think there might be some other old Menger code around here that doesn't use the abs(z) optimization.. but maybe not.  I didn't see it when I did a search.

  Anyway- the point is that for the Menger, I need to rewrite the whole thing in order to see if preserving orientation helps.  We'll see...  

  A couple things (about the updated version... which isn't attached now because I have a few things to fix):

1)  orbits are trapped on the coloring iteration for texture based coloring, so you'll have to capture color orbits on the same iteration as you're doing the height map   (use trapmode switch in the Menger tab, and set coloring iterations to 0 to try it out in the following frags)

2)  I re-wrote the raytracer and Menger so that the maptypes are the same, HOWEVER, it won't allow you to load the same texture twice (maybe some "streamlining" in the compiler) unless you rename the 2nd texture as another name...


   You can click the "trapmode" option in the Menger tab, set color iterations to 0, heightIter=1, and match your texture and heightmap settings if you want to try to align coloring with the heightmap in the code I am attaching (including fast-raytracer.frag).

  Turn off trapmode, and set coloring iterations= 1 less than height iterations if you want to match them up in different ways.

  For some reason mapmode 0 doesn't match when color iterations !=0, trapmode is not set, and heightIter=coloriterations+1, but mapmode1 does.... so...  :shrug:  
« Last Edit: January 02, 2016, 10:00:47 AM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #111 on: December 10, 2015, 09:18:51 PM »

i overclocked my gtx660 in bios  grin

  yeah... my 8 year old mobile GPU isn't known to be OC friendly.  wink  In fact, there were a bunch of recalls because of heat issues with it...    anyway... overclocking it wouldn't do much. 
Logged

Pages: 1 ... 6 7 [8]   Go Down
  Print  
 
Jump to:  


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.223 seconds with 24 queries. (Pretty URLs adds 0.009s, 2q)