buddhi1980 / mandelbulber2

Official repository for Mandelbulber v2
GNU General Public License v3.0
905 stars 115 forks source link

Round Sun light #478

Closed mclarekin closed 4 years ago

mclarekin commented 6 years ago

Implement a light source specific to being manipulated to look more like a spherical sun The basic concept is to get a round sun, however there are various additional features that could be added. It may even be a better idea to make an actual 3D sun(s)

buddhi1980 commented 6 years ago

It is already possible with main light source. Is this what you asked about?

# Mandelbulber settings file
# version 2.14
# only modified parameters
[main_parameters]
ambient_occlusion_enabled true;
camera 2,983933178603285 -5,96786635720657 2,116769691806946;
camera_distance_to_target 7,000000000000002;
camera_rotation 26,56505117707794 -6,601549599020264 0;
camera_top -0,05141352432691971 0,1028270486538394 0,9933688170200821;
detail_level 2;
flight_last_to_render 99999;
keyframe_last_to_render 0;
main_light_alpha -164,48;
main_light_beta 13,57;
main_light_colour ff00 ef00 c600;
main_light_position_relative false;
main_light_visibility 8;
main_light_visibility_size 0,25;
mat1_is_defined true;
mat2_fresnel_reflectance true;
mat2_is_defined true;
mat2_name water;
mat2_reflectance 1;
mat2_specular_width 0,161;
mat2_surface_color 2300 4800 6800;
mat2_use_colors_from_palette false;
primitive_water_1_enabled true;
primitive_water_1_iterations 10;
primitive_water_1_material_id 2;
primitive_water_1_relative_amplitude 0,05;
primitive_water_1_rotation 0 0 61,39;
raytraced_reflections true;
target -0,1258057322062271 0,2516114644124542 1,31202157407918;
volumetric_fog_colour_1_distance 0,2645962114758683;
volumetric_fog_colour_2_distance 0,5291924229517365;
volumetric_fog_density 0,25;
volumetric_fog_distance_factor 0,5291924229517365;
volumetric_fog_enabled true;

image

mclarekin commented 6 years ago

that is close, but it is a sloping ellipse.

even with small FOV we get an ellipse if the light/sun is not placed along the camera axis.

On Sat, May 26, 2018 at 3:03 AM, Krzysztof Marczak <notifications@github.com

wrote:

It is already possible with main light source. Is this what you asked about?

Mandelbulber settings file

version 2.14

only modified parameters

[main_parameters] ambient_occlusion_enabled true; camera 2,983933178603285 -5,96786635720657 2,116769691806946; camera_distance_to_target 7,000000000000002; camera_rotation 26,56505117707794 -6,601549599020264 0; camera_top -0,05141352432691971 0,1028270486538394 0,9933688170200821; detail_level 2; flight_last_to_render 99999; keyframe_last_to_render 0; main_light_alpha -164,48; main_light_beta 13,57; main_light_colour ff00 ef00 c600; main_light_position_relative false; main_light_visibility 8; main_light_visibility_size 0,25; mat1_is_defined true; mat2_fresnel_reflectance true; mat2_is_defined true; mat2_name water; mat2_reflectance 1; mat2_specular_width 0,161; mat2_surface_color 2300 4800 6800; mat2_use_colors_from_palette false; primitive_water_1_enabled true; primitive_water_1_iterations 10; primitive_water_1_material_id 2; primitive_water_1_relative_amplitude 0,05; primitive_water_1_rotation 0 0 61,39; raytraced_reflections true; target -0,1258057322062271 0,2516114644124542 1,31202157407918; volumetric_fog_colour_1_distance 0,2645962114758683; volumetric_fog_colour_2_distance 0,5291924229517365; volumetric_fog_density 0,25; volumetric_fog_distance_factor 0,5291924229517365; volumetric_fog_enabled true;

[image: image] https://user-images.githubusercontent.com/11696990/40551506-6c5e35aa-603d-11e8-8c6b-9a78b3370497.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/buddhi1980/mandelbulber2/issues/478#issuecomment-392086456, or mute the thread https://github.com/notifications/unsubscribe-auth/AMLZHAngbPbBC1JX7H96RhBVONxSJsYMks5t2B0_gaJpZM4UNeQn .

mclarekin commented 6 years ago

The sun is so far away that it's appearance is not effected by perspective.

With perspective up-close we get the sloping ellipse. The angle of slope at any position is related to the geometry which we can calculate. The shape then needs to be shortened along the ellipse major axis to return to a circle. This minor enhancement is related to another Nice to Have enhancement, for a new type of visible light source, which can be manipulated into a candle flame shape.

It is V2.20+, for now I am just recording my thoughts.

On Sat, May 26, 2018 at 11:15 AM, carbuncle grim mclarekin@gmail.com wrote:

that is close, but it is a sloping ellipse.

even with small FOV we get an ellipse if the light/sun is not placed along the camera axis.

On Sat, May 26, 2018 at 3:03 AM, Krzysztof Marczak < notifications@github.com> wrote:

It is already possible with main light source. Is this what you asked about?

Mandelbulber settings file

version 2.14

only modified parameters

[main_parameters] ambient_occlusion_enabled true; camera 2,983933178603285 -5,96786635720657 2,116769691806946; camera_distance_to_target 7,000000000000002; camera_rotation 26,56505117707794 -6,601549599020264 0; camera_top -0,05141352432691971 0,1028270486538394 0,9933688170200821; detail_level 2; flight_last_to_render 99999; keyframe_last_to_render 0; main_light_alpha -164,48; main_light_beta 13,57; main_light_colour ff00 ef00 c600; main_light_position_relative false; main_light_visibility 8; main_light_visibility_size 0,25; mat1_is_defined true; mat2_fresnel_reflectance true; mat2_is_defined true; mat2_name water; mat2_reflectance 1; mat2_specular_width 0,161; mat2_surface_color 2300 4800 6800; mat2_use_colors_from_palette false; primitive_water_1_enabled true; primitive_water_1_iterations 10; primitive_water_1_material_id 2; primitive_water_1_relative_amplitude 0,05; primitive_water_1_rotation 0 0 61,39; raytraced_reflections true; target -0,1258057322062271 0,2516114644124542 1,31202157407918; volumetric_fog_colour_1_distance 0,2645962114758683; volumetric_fog_colour_2_distance 0,5291924229517365; volumetric_fog_density 0,25; volumetric_fog_distance_factor 0,5291924229517365; volumetric_fog_enabled true;

[image: image] https://user-images.githubusercontent.com/11696990/40551506-6c5e35aa-603d-11e8-8c6b-9a78b3370497.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/buddhi1980/mandelbulber2/issues/478#issuecomment-392086456, or mute the thread https://github.com/notifications/unsubscribe-auth/AMLZHAngbPbBC1JX7H96RhBVONxSJsYMks5t2B0_gaJpZM4UNeQn .

buddhi1980 commented 4 years ago

Here is described this phenomenon. https://www.dxo.com/project/understanding-volume-deformation/ It happens also with real wide angle camera lenses.

mclarekin commented 4 years ago

yes but if someone has made a nice image with a wide FOV, and they just want to add a sun or moon that looks like what we see from earth , currently they can not unless they place it along camera to target axis(or know some tricks). Hmmm?? If I implemented ellipsoid (pseudo anti-FOV) into primitives then they probably could.get close to real looking, plus they could add a material texture

On Fri, Aug 28, 2020 at 8:45 AM Krzysztof Marczak notifications@github.com wrote:

Closed #478 https://github.com/buddhi1980/mandelbulber2/issues/478.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/buddhi1980/mandelbulber2/issues/478#event-3701355128, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBNSHDCU62KXQDESZFS3TDSC3AXHANCNFSM4FBV4QTQ .

buddhi1980 commented 4 years ago

For real looking with wide angle should be used fish eye projection. Then perspective distortion will not be visible.

mclarekin commented 4 years ago

this is placing a pseudo-round moon with FOV at default. BTW i started off my working life as a draftsman with pencils ( along time before CAD)

Mandelbulber settings file

version 2.23

only modified parameters

[main_parameters] ambient_occlusion_enabled true; boolean_operators true; camera 0 -15.0517424585598 0; camera_distance_to_target 15.0517424585598; camera_rotation 0 0 0; camera_top 0 0 1; dont_add_c_constant_1 true; fake_lights_color aa00 ff00 0000; fake_lights_enabled true; fake_lights_orbit_trap 0 0 0; fake_lights_orbit_trap_shape cube; flight_last_to_render 0; formula_1 127; formula_2 1602; formula_material_id_2 2; formula_position_2 12 12 12; formula_rotation_2 0 45 0; image_width 900; keyframe_last_to_render 0; mat1_is_defined true; mat1_use_colors_from_palette false; mat2_file_color_texture C:\Users\graeme\Downloads\mandelbulber-Release-x64-f323497a2860c729b99750512914b4e16311587a\build-win\Release\x64\textures\background3.jpg; mat2_is_defined true; mat2_texture_mapping_type 0; mat2_use_color_texture true; view_distance_max 40.7466503117834; [fractal_1] transf_addition_constant 0 0 1; transf_addition_constant_111 2 2.3 1; transf_function_enabled false; transf_minR2_p25 0; transf_rotation 6.000023 24 40; transf_rotation_enabled true; [fractal_2] transf_addition_constant_111 1 1 1.15;