Patryk Kizny
|
|
« 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
|
|
« Reply #196 on: May 30, 2016, 10:04:18 PM » |
|
When i use two textures and normal for separation I got something like this: 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
|
|
|
|
|
|
SCORPION
|
|
« Reply #199 on: May 31, 2016, 03:42:27 PM » |
|
Сергей, выложи код полностью, пожалуста...
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #200 on: May 31, 2016, 03:59:11 PM » |
|
Сергей, выложи код полностью, пожалуста...
Привет! Этот способ не подходит для плавного перехода.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #201 on: June 01, 2016, 02:53:36 AM » |
|
Попробуйте это ... это делает то, что вы хотите ? 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 + это показывает различные области наклона с помощью красной и зеленой текстурой
|
|
« Last Edit: June 01, 2016, 06:05:31 AM by 3dickulus, Reason: +pic »
|
Logged
|
|
|
|
Crist-JRoger
|
|
« 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
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« 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
|
|
|
|
Crist-JRoger
|
|
« Reply #204 on: June 01, 2016, 02:18:10 PM » |
|
This is for terrain surface. I found great example link
|
|
|
Logged
|
|
|
|
Patryk Kizny
|
|
« 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
|
|
« 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 I looked at parts of code you posted in your topic, but didn't understand how you use smooth function.
|
|
|
Logged
|
|
|
|
SCORPION
|
|
« Reply #207 on: June 02, 2016, 04:49:00 AM » |
|
Сергей, вот какое интересное дело - по моему, наши друзья не могут понять, что мы от них хотим, хотя могли бы спокойно реализовать идею. Я прекрасно понимаю, что ты хочешь сделать, да ума не хватает реализовать... Вот такой парадокс.... Ну вот же Патрик как сделал переход: http://www.fractalforums.com/fragmentarium/patryk-kizny-raytracer-updates/msg92821/#msg92821Я попробовал сделать через 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); } картинка без цвета и плавного перехода нет... Вот так цвет есть, но плавного перехода нет всё равно. 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); } Блин, как Патрик то сделал?
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« 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
|
|
« 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
|
|
|
|
|