|
|
Hi,
Here's an alum crystal.
The face data (including HKL, distance and colors [not used]) were copied from
KrystalShaper and converted to an array-ready format thanks to a couple of find
& replace operations in notepad++. Because the data works with the cubic
crystalline system, they were easily converted into plane normals and offsets.
The planes were then used in an intersection object. 50 faces total. No
light_sources are present in the scene; just reflections.
(If anyone's wondering why I don't simply export POV-Ray files from
KrystalShaper, it's because in the future I intend to have more customization
options for certain faces.)
Here's the source code (minus luminous bloom):
/*
HKL-cubic-alaun.pov
2021 Samuel B.
Suggested command line options:
+fn +f +a0.3 +am2 +r1
If outputting to luminous bloom:
+fh +f +a0.3 +am2 +r1
*/
#version 3.7;
global_settings{
assumed_gamma 1.0
max_trace_level 11
}
#default{ finish{ambient 0} }
#declare RGBSun = srgb 1.3*<2, 1.99, 1.97>;
#declare RGBSky = srgb <.45, .475, .5>;
#declare CamPos = <0, 7, -10>;
camera{
fisheye right x*.7 up y*.7
location CamPos
look_at 0
angle 60/3.5
aperture .77 focal_point -z blur_samples 30 variance 0
}
#if(1)
sky_sphere{
pigment{
spherical scale 2 translate z
poly_wave 2
rotate -x*30
rotate y*40
color_map{
[0 RGBSky]
[1 RGBSun]
}
}
}
#end
// ground plane
#if(1)
plane{
y, -1.001
pigment{
pigment_pattern{
cylindrical
scale 5
translate 2*z
}
pigment_map{
[0 rgb 0]
[1
granite
scale 5
turbulence .2 lambda 3
poly_wave .2
]
}
}
finish{reflection{.2, 1 fresnel metallic 1} conserve_energy}
normal{granite .05 scale .001}
interior{ior 1.55}
}
#end
// KRSCOPY KrystalShaper data copied from program and converted with notepad++
#declare FaceData =
array[50][7]{
{1, 0, 0, 1.02, 255, 255, 128},
{0, 1, 0, 1.02, 255, 255, 128},
{0, -1, 0, 1.02, 255, 255, 128},
{-1, 0, 0, 1.02, 255, 255, 128},
{0, 0, -1, 1.02, 255, 255, 128},
{0, 0, 1, 1.02, 255, 255, 128},
{1, 1, 1, 0.7, 0, 255, 255},
{1, 1, -1, 0.7, 0, 255, 255},
{1, -1, 1, 0.7, 0, 255, 255},
{-1, -1, 1, 0.7, 0, 255, 255},
{-1, 1, 1, 0.7, 0, 255, 255},
{1, -1, -1, 0.7, 0, 255, 255},
{-1, -1, -1, 0.7, 0, 255, 255},
{-1, 1, -1, 0.7, 0, 255, 255},
{1, 1, 0, 0.799, 255, 128, 128},
{1, -1, 0, 0.799, 255, 128, 128},
{-1, -1, 0, 0.799, 255, 128, 128},
{-1, 1, 0, 0.799, 255, 128, 128},
{-1, 0, -1, 0.799, 255, 128, 128},
{0, 1, 1, 0.799, 255, 128, 128},
{1, 0, -1, 0.799, 255, 128, 128},
{0, 1, -1, 0.799, 255, 128, 128},
{1, 0, 1, 0.799, 255, 128, 128},
{0, -1, -1, 0.799, 255, 128, 128},
{-1, 0, 1, 0.799, 255, 128, 128},
{0, -1, 1, 0.799, 255, 128, 128},
{3, 2, 1, 0.869, 0, 255, 0},
{-2, -1, -3, 0.869, 0, 255, 0},
{1, 3, 2, 0.869, 0, 255, 0},
{-3, -2, -1, 0.869, 0, 255, 0},
{2, 1, 3, 0.869, 0, 255, 0},
{-1, -3, -2, 0.869, 0, 255, 0},
{3, 2, -1, 0.869, 0, 255, 0},
{-2, -1, 3, 0.869, 0, 255, 0},
{1, 3, -2, 0.869, 0, 255, 0},
{-3, -2, 1, 0.869, 0, 255, 0},
{2, 1, -3, 0.869, 0, 255, 0},
{-1, -3, 2, 0.869, 0, 255, 0},
{-1, 3, 2, 0.869, 0, 255, 0},
{2, -1, 3, 0.869, 0, 255, 0},
{3, -2, -1, 0.869, 0, 255, 0},
{-1, 3, -2, 0.869, 0, 255, 0},
{-2, 1, 3, 0.869, 0, 255, 0},
{3, -2, 1, 0.869, 0, 255, 0},
{1, -3, -2, 0.869, 0, 255, 0},
{-2, 1, -3, 0.869, 0, 255, 0},
{-3, 2, 1, 0.869, 0, 255, 0},
{1, -3, 2, 0.869, 0, 255, 0},
{2, -1, -3, 0.869, 0, 255, 0},
{-3, 2, -1, 0.869, 0, 255, 0}
}
// crystal
#if(1)
intersection{
#for(I, 0, 49)
plane{
<FaceData[I][0], FaceData[I][1], FaceData[I][2]>, FaceData[I][3]
}
#end
// I guessed the proper color :/
pigment{rgb <.85, .7, 1> filter 1}
finish{reflection{0, 1 fresnel} conserve_energy}
normal{granite .03 scale .001}
interior{
// alum ior from classicgems.net
ior 1.453
media{absorption .3}
// an unrealistic dispersion value
dispersion 1.075 dispersion_samples 7
}
hollow
rotate -y*43
}
#end
Post a reply to this message
Attachments:
Download 'hkl-cubic-alaun9m_07s-plus-lb7b1m_02s.jpg' (29 KB)
Preview of image 'hkl-cubic-alaun9m_07s-plus-lb7b1m_02s.jpg'
|
|
|
|
On 9/21/21 8:05 PM, Samuel B. wrote:
> ... Is there a binary of povr for Windows, or am I just not seeing it?
No, it's a linux / unix / macos only effort. I don't use windows.
Further, I only once in a while publish a tarball(1) that you currently
have to compile yourself. I've not yet gotten to what I want to be my
initial, public, git repository. It's my playpen, but hope some find
bits of the play/work useful.
(1) - To povray.binaries.programming
>> because my povr branch now doesn't allow srgb channel specifications
>> outside the 0-1 range.
> Is that why the image is darker overall?
Yes.
(Why the clamping, btw?)
It isn't about clamping values, but rather restricting the srgb* keyword
use to values which make sense. There is an underlying equation - and it
runs for any input channel value - but only values in the [0..1] range
make sense.
//--- Limit srgb use to [0..1] range!
#version 3.8;
global_settings {assumed_gamma 1.0}
#declare RGBSun = srgb 1.30*<2, 1.99, 1.97>;
#declare RGBSun_0 = rgb 1.30*<2, 1.99, 1.97>;
#declare RGBSun_1 = rgb 4.58*<2, 1.99, 1.97>;
#declare RGBSun_2 = srgb <2.0, 0.9, 0.8>;
#declare RGBSun_3 = srgb <2.0,-0.9,-1.8>;
#declare SRGBSun = srgb <1.0, 0.45, 0.4>;
#declare RGBSun_4 = 9.16*SRGBSun;
#debug "\n"
#debug concat("srgb 1.30*<2, 1.99, 1.97> = rgb <",
vstr(3,RGBSun,",", 0,-1),">\n")
#debug concat("rgb 1.30*<2, 1.99, 1.97> = rgb <",
vstr(3,RGBSun_0,",", 0,-1),">\n")
#debug concat("rgb 4.58*<2, 1.99, 1.97> = rgb <",
vstr(3,RGBSun_1,",", 0,-1),">\n")
#debug concat("srgb <2.0, 0.9, 0.8> = rgb <",
vstr(3,RGBSun_2,",", 0,-1),">\n")
#debug concat("srgb <2.0,-0.9,-1.8> = rgb <",
vstr(3,RGBSun_3,",", 0,-1),">\n")
#debug "\n"
#debug concat("9.16*SRGBSun = rgb <",
vstr(3,RGBSun_4,",", 0,-1),">\n")
#debug "\n"
#error "Parsing test. Stop early."
//---
> The blur is exaggerated in your render compared to mine, so perhaps the
> performance would be more comparative with a reduced bump_size and lower +r
> value?
Yes, I expect you are correct.
Attaching another image. Here playing with one of the prototype normal
patterns in povr's bevy normal wrapper. It's kind of a non-drifting(1)
wrinkles rotation about a specified axis (or was it toward a point...).
Anyhow, it's perturbing/mangling the normal and for the image use a
negative bump to intentionally 'sometimes' invert the normals. Doesn't
represent anything real, but I think it looks neat! :-)
(1) - Elsewhere I posted about our current "normal wrinkles pattern bias."
Bill P.
Post a reply to this message
Attachments:
Download 'sam_bevy_normal_6_negbmp.jpg' (49 KB)
Preview of image 'sam_bevy_normal_6_negbmp.jpg'
|
|