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: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 25, 2024, 06:29:28 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]   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: texture and displace the floor using the Kaliset  (Read 5355 times)
0 Members and 1 Guest are viewing this topic.
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #15 on: September 18, 2015, 07:59:24 PM »

here i am talking about what you can do inside a DE() method
<a href="https://www.youtube.com/v/pltkqEdxuzI&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/pltkqEdxuzI&rel=1&fs=1&hd=1</a>
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #16 on: September 18, 2015, 08:23:12 PM »

Is that YOU?  shocked
I don't know that when see this video before )
Logged

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



WWW
« Reply #17 on: September 21, 2015, 07:21:30 PM »

Experiment with surface mapping. The garden of Kali`s trees and last DE-raytracer. I attached .frag file, but it's very resource-intensive (on gtx660 run 400x225)
Need to create single colormap for the Surface separately from main fractal. Surface needs debugging  help


* frag-19.09.15-01.bmp Files.rar (17.79 KB - downloaded 98 times.)
Logged

cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #18 on: September 21, 2015, 08:01:14 PM »

Is that YOU?  shocked
I don't know that when see this video before )

sure, this is one of my alter egos in my show cheesy
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #19 on: September 23, 2015, 12:48:37 AM »

 cheesy I combined Terrain and Kaliset

Logged

cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #20 on: September 23, 2015, 10:19:06 AM »

wow, that tree gives the scene a strane sense of nature, looks cool!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #21 on: September 24, 2015, 02:09:22 PM »

And in my version of the raytracer there is a global 'translate' tab which does exactly this (and a bit more).
There's a full affine transformation allowing you to translate/rotate/scale the space. Ax an extra there's also 1-axis twist, stereographic projection and an interseting space noise.

-- edit

That's a reply for the previous page questions
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #22 on: September 26, 2015, 12:32:54 AM »

@Patryk Kizny, i get your code with camera settings. Very easy to use.

So there is another settings of Terrain+Kaliset and attached script with presets. Maybe code is wrong, i think something works badly... but this script very interesting to create different landscapes  smiley



* frag-24.09.2015-02.bmp Files.zip (22.83 KB - downloaded 104 times.)
« Last Edit: November 01, 2015, 11:38:44 AM by Crist-JRoger » Logged

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



kizny
WWW
« Reply #23 on: September 26, 2015, 02:09:17 PM »

This looks awesome!
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #24 on: September 26, 2015, 02:49:10 PM »

And actually that could look even cooler if merged with the dirt effect from my latest raytracer update.
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #25 on: October 04, 2015, 08:04:28 AM »

Terrain+Kaliset. Global illumination

« Last Edit: November 01, 2015, 11:41:18 AM by Crist-JRoger » Logged

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



kizny
WWW
« Reply #26 on: November 02, 2015, 06:40:53 PM »

I checked your frag and noticed you have some issues within the DE.
I am not sure what you meant there.

Quote
float DE(vec3 pos) {
   
   int i=0;
   for (i=0; i<Iterations; i++) {
      
      float h = height(pos);
      float k = Kaliset(pos);
      
      if (KTex) {orbitTrap=vec4(1,1,1,1)*(k*ColorScale+ColorOffset);}
      if (KHeightmap) {
                       float sc=k*Strength;
                       pos+=vec3(sc,sc,sc)*Strength2;}
      h += k;
      if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(pos.xyz,expsmoothing)));
      
      
      return (pos.z-Slope*h);
   }
}


Since return is within the "for" loop it's actually never going through the loop cause it breaks the loop on return.
Also if KHeightmap is false, even if it did go through the loop, it wouldn't do much cause nothing changes there.
And Iterations is bound to both terrain and main loop, so I'd suggest adding another control for that. 5-6 its for terrain are sufficient and in your presets there were like 25-35 values which is an overkill even for my Titan X.
Finally you're nesting a lot of DE functions within a for loop which is a computational overkill (not sure if that's crucial for the intended result here).

So a proposed alternate:

Quote

#info Terrain
#include "MathUtils.frag"
#include "DE-kn9.frag"
#include "Classic-Noise.frag"
#group Terrain

// Number of differnt noise scales
uniform int Iterations;  slider[0,5,100]
uniform int mIterations;  slider[0,5,100]
uniform int ColorIterations;  slider[0,3,300]
uniform bool fromFloor; checkbox[true]
// Slope
uniform float terrSlope; slider[-5,-0.5,5]
uniform float kaliSlope; slider[-5,-0.5,5]

uniform float FreqMul; slider[1,2,10]
uniform float Offset; slider[0,0.4,1]
uniform float AmpMul; slider[0,0.3,1]

uniform float WaterLevel; slider[0.0,0.6,1]
uniform float S; slider[0,1,3]

float expsmoothing = 0.0;

float height(vec3 pos) {
   float A = 1.0;
   float B = 1.0;
   float r = 0.0;
   for (int j = 0; j < 5; j++) {
      r+= B*cnoise(A*(pos.xy)+Offset);
      A*=FreqMul;
      B*=AmpMul;
   }
   if (r>WaterLevel) r = WaterLevel;
   return r;
}

vec3 baseColor(vec3 pos, vec3 normal) {
   
   float h = height(pos);
   if (h==WaterLevel) return vec3(0.0,0.0,1.0);
   h = 1.0-clamp(h, 0.0, 1.0);
   if (h>0.5) return  vec3(h-0.5,1.0,h-0.5);
   if (h<0.5) return mix(vec3(0.0,0.0,1.0),vec3(0.0,1.0,0.0),h*2.0);
   
   
}

float DE(vec3 pos) {
   
   float h = height(pos);
   float k = Kaliset(pos);
   
   
   if (KHeightmap) {
      float sc=k*Strength;
      pos+=vec3(sc,sc,sc)*Strength2;
   }

   if (KTex) {
      orbitTrap=vec4(1,1,1,1)*(k*ColorScale+ColorOffset);
   } else {
      orbitTrap = min(orbitTrap, abs(vec4(pos.xyz,expsmoothing)));
   }

   float de = pos.z - (k * kaliSlope + h * terrSlope);
   return de;
}




« Last Edit: November 02, 2015, 06:53:07 PM by Patryk Kizny » Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #27 on: November 02, 2015, 08:55:41 PM »

Wow! Your script quickly ) Thank you! As i say more times - i am not a programmer, i just open frag files, copy-paste code and see what happens.
If that possible, can you add this surface into raytracer? Maybe with 3 modes - terrain, kalitex, terrain+kalitex. I tried, but my videocard crash...
And problem that i had when played with this. All scene has color from kalitex (i like this color palette!). When you add other object to this scene - it has color from kalitex too. Need to create manually different colors or color schemes for surface and other objects. So now i just don't using orbit color )
Logged

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



kizny
WWW
« Reply #28 on: November 03, 2015, 01:50:49 AM »

I did not check your changes to the ray tracer.
And did not study the color yet.
For sure you can add color by saving the final point coords into color, this can be easily added to ray tracer.
You can also implement color base color function after adding #define providescolor.
So there's a bunch of options that you could blend: height, orbit trap, map, coords, normal. Could be fun.
Adding multiple materials is tricky - would require lots of changes in the tracer. Good approach is already present in GI tracer. Would adapt it some day and integrate into mine.
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Ocean Floor Images Showcase (Rate My Fractal) Fractal Ken 0 725 Last post January 03, 2011, 06:13:40 AM
by Fractal Ken
Kaliset 3D fractal used as coloring & texture for DE systems 3D Fractal Generation « 1 2 » Kali 17 14149 Last post September 14, 2015, 03:57:37 PM
by Crist-JRoger
Kaliset coloring and texture feature request PhotoComix 2 1365 Last post July 21, 2012, 10:01:49 PM
by PhotoComix
Mandelboxed floor Images Showcase (Rate My Fractal) VanlindtMarc 1 778 Last post July 27, 2013, 03:04:36 AM
by C.K.
Forest Floor 44 Mandelbulber Gallery mclarekin 1 642 Last post April 08, 2014, 09:43:14 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.16 seconds with 25 queries. (Pretty URLs adds 0.012s, 2q)