Logo by mclarekin - 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 the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 27, 2024, 06:44:44 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 ... 12 13 [14] 15 16   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: updating of DE-Raytracer  (Read 38509 times)
Description: adding features in DE-raytracer: volumetric light, kaliset3d, clouds...
0 Members and 1 Guest are viewing this topic.
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #195 on: May 28, 2016, 09:58:16 PM »

I uploaded a new version now that will let you export as .xyz files, previously an internal format was used.
There is now a export.scene file with the basic settings needed for this.

The .xyz files can be found in the cache folder.

That's kind of you! Thanks! Will see how it works when I got a moment.
Logged

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



WWW
« Reply #196 on: May 30, 2016, 10:04:18 PM »

When i use two textures and normal for separation I got something like this:


Code:
vec3 TerrainColour(vec3 pos, vec3 normal) {
vec4 tm1=vec4(0.0);
vec4 tm2=vec4(0.0);
if (normal.z < tex_normal) {
tm1 = texture2D(tex1, pos.xy);
}
if (normal.z > tex_normal) {
tm2 = texture2D(tex2, pos.xy);
}
return tm1.rgb + tm2.rgb;
}

How quickly get smooth transition between textures? I think it must be completely different way.
Logged

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



WWW
« Reply #197 on: May 31, 2016, 02:54:54 AM »

@Crist-JRoger  shocked  afro
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #198 on: May 31, 2016, 01:32:31 PM »

Here http://www.iquilezles.org/www/articles/terrainmarching/terrainmarching.htm talking about smooth functions for coloring. And Patryk Kizny in his material blender talks about it.
How blend two textures? I get a multiplication or addition of color and brightness  sad

upd.: I'll search the answer by myself, but very glad any help.
« Last Edit: May 31, 2016, 01:58:07 PM by Crist-JRoger » Logged

SCORPION
Conqueror
*******
Posts: 104


« Reply #199 on: May 31, 2016, 03:42:27 PM »

Сергей, выложи код полностью, пожалуста...
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #200 on: May 31, 2016, 03:59:11 PM »

Сергей, выложи код полностью, пожалуста...
Привет! Этот способ не подходит для плавного перехода.

* 2texture_terrain_simple.bmp Files.zip (17.24 KB - downloaded 94 times.)
Logged

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



WWW
« Reply #201 on: June 01, 2016, 02:53:36 AM »

Попробуйте это ... это делает то, что вы хотите ?

Code:
vec3 TerrainColour(vec3 pos, vec3 normal)
{
vec3 mat=vec3(0.0);
vec4 tm1=vec4(0.0);
vec4 tm2=vec4(0.0);
vec4 tm3=vec4(0.0);

// if (normal.z < tex_normal) {
tm1 = texture2D(tex1, pos.xy*tex1size);
// }
// if (normal.z > tex_normal) {
tm2 = texture2D(tex2, pos.xy*tex2size);
//        }

return mix(tm1.rgb,tm2.rgb,normal.z*tex_normal).rgb; // + tm3;
}

модифицированный: ^ ^ ^ rgb + это показывает различные области наклона с помощью красной и зеленой текстурой


* smooth2textures.jpg (212.8 KB, 1280x720 - viewed 223 times.)

* smooth2textures-1.jpg (41.89 KB, 512x288 - viewed 209 times.)
« Last Edit: June 01, 2016, 06:05:31 AM by 3dickulus, Reason: +pic » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #202 on: June 01, 2016, 07:16:16 AM »

Not exactly... I mean smooth soft blend from one texture to another
Ideally - something like this  embarrass
Logged

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



WWW
« Reply #203 on: June 01, 2016, 02:14:47 PM »

good for game realism but has no impact on exploring fractals, nice eye candy though.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #204 on: June 01, 2016, 02:18:10 PM »

This is for terrain surface. I found great example link
Logged

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



kizny
WWW
« Reply #205 on: June 01, 2016, 04:20:27 PM »

@Crist-JRoger

That looks awesome.
I have recently implemented another thing that may be of interest to you - a falloff map.
That is essentially mixing two different materials proportionally to a dot product of view and normal direction.
I did it to mix two different materials, but even with a color it's totally cool.

You can spot it in some of the fractals in Lifeline.
Logged

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



WWW
« Reply #206 on: June 01, 2016, 04:52:25 PM »

Yes I am interested. If you will show how change color with height changing, I will be very grateful. For simple example - white at the top and black at the bottom, with smooth transition  roll eyes I looked at parts of code you posted in your topic, but didn't understand how you use smooth function.
Logged

SCORPION
Conqueror
*******
Posts: 104


« Reply #207 on: June 02, 2016, 04:49:00 AM »

Сергей, вот какое интересное дело - по моему, наши друзья не могут понять, что мы от них хотим, хотя могли бы спокойно реализовать идею.
Я прекрасно понимаю, что ты хочешь сделать, да ума не хватает реализовать... Вот такой парадокс....
Ну вот же Патрик как сделал переход:

http://www.fractalforums.com/fragmentarium/patryk-kizny-raytracer-updates/msg92821/#msg92821

Я попробовал сделать через
Code:
float smin(float a, float b, float k) {
    float h = clamp(0.5 + 0.5 * (b - a) / k, 0.0, 1.0);
    return mix(b, a, h) - k * h * (1.0 - h);
}

картинка без цвета и плавного перехода нет...

Вот так цвет есть, но плавного перехода нет всё равно.

Code:
vec3 smin( vec3 a, vec3 b, vec3 k)
{
vec3 h = clamp( 0.5 + 0.5*(b-a)/k, 0.0, 1.0 );
return mix( b, a, h ) - k*h*(1.0-h);
}

Блин, как Патрик то сделал?  huh?
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #208 on: June 02, 2016, 10:45:29 AM »

In search of texturing techniques i found that post Very interesting method. Both techniques works well!

another quick render on intel gpu

« Last Edit: June 02, 2016, 02:30:10 PM by Crist-JRoger, Reason: add picture » Logged

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



WWW
« Reply #209 on: June 07, 2016, 06:29:28 AM »

Rendered on amd radeon. Used part of terain generator - iq3d noise. Thank to Patryk for this crazy terrains )

Logged

Pages: 1 ... 12 13 [14] 15 16   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.187 seconds with 25 queries. (Pretty URLs adds 0.014s, 2q)