POV-Ray : Newsgroups : povray.newusers : Creating a rotating gem : Re: Creating a rotating gem Server Time
5 Jul 2024 07:28:39 EDT (-0400)
  Re: Creating a rotating gem  
From: Alain
Date: 11 Dec 2010 19:18:42
Message: <4d0414e2$1@news.povray.org>

You can apply the material to the whole thing instead of to each triangle.

> Here is the texture and material that I am using for all of the triangles and
> the mesh (material for mesh, texture for triangles).
> #declare Diamond_Tex = texture
> {
>    pigment { rgbf<1, 1, 1, 1>  }
OK
>
>    finish
>    {
>      ambient 0
>      diffuse 0
>      brilliance 0.5
>      specular 0.9
>      roughness 0.05
I'd use a much smaller roughness value.
>
>      reflection
>      {
>        colour rgb<1, 1, 1>
>        0.1
>        fresnel on
>      }
This reflection is maximum at a perpendicular angle and minimum at a 
grazing angle. You don't need the colour keyword here. "on" is not 
needed after fresnel.

Proposed change:
reflection{0.1 1 fresnel}
Low perpendicular to strong grazing reflection obeying the fresnel model.

>
>      conserve_energy
OK
>    }
> }
>
> #declare Diamond_Mat = material
> {
>    texture { Diamond_Tex }
>
>    interior
>    {
>      ior 2.417
OK
>      caustics 1
Should not use, it can give unnatural results.
>      dispersion Diamond_Dispersion     // Defined in consts.inc
>      dispersion_samples 7
>      fade_power 2                      // Used because POV-Ray complained about
> me using refraction in the finish, said I should use fade_power and
> fade_distance instead.
>      fade_distance 1
>      fade_colour colour White
>    }
> }

For the interior fade_power, a value of 2 is NOT correct. Use 1 (linear 
fading) or 1001 (exponential fading).
Fade_colour White is mostly a do nothing.
In your case, you can remove all fade_ things.

refraction in the finish is a left over from old versions. It's not 
needed as refraction appens automaticaly whenever you have an ior 
different than 1.

Also, total internal reflection appens automaticaly.

>
> I added a sphere of radius 5 centered at the origin as an evironment (just added
> it) to no effect, I still get the same results as I did. I coloured it white. If
> I use rgb<1, 1, 1>  with a radius of 10 everything vomes up grey, with a radius
> of 5 the whole screen is a complete white-wash, using rgbf/t<1, 1, 1, 1>  gives
> me the same results as Stone1.bmp (both with a radius of 5 or 10). If I specify
> no colour the whole picture is black (can't see the gem at all). Am I doing the
> right thing here for an environment?
Is your light, diamond and camera inside the sphere?
>
> I had already changed max_trace_level from 5 to 10 (was getting warnings about
> it, 10 removed the warnings). However I further changed it to 50 and then 100,
> the only change that made was that the top of the gem got brigther and at 100 it
> was nearly completely white.
>
> I ran through all the finishes and interioirs in glass.inc. All the finishes
> gave results close to that of Stone3.bmp, so i kept my finish. All the interiors
> gave little to no change to the one I already had.
>
> One thing that I am noticing is that it spends a lot of time rendering the top
> of the gem (the part with the most clarity in Stone1.bmp) and then it chops
> through the last part in less than a second (total rendering time is 17
> seconds).
On the top, you must have a lot of reflections, while on the bottom 
part, most of the rays go straight through, or only have a few 
intersection with the surfaces.

>
> Regards
> Bidski
>
>

If your sphere is white, or any uniform colour, it don't do it's work as 
an environment.
Use some mostly dark texture with some small bright areas.
You can use an image_map with map_type 1 on your sphere with some 
interesting image. If you use version 3.7, you can use some high dynamic 
range image to good effect.

The effects of the caustics feature are distance and ior independent, 
been only dependent on the curvature of the surface. It also don't work 
well if you have flat areas with sharp angles.
It's a quick and dirty way to simulate the underwater caustics play of a 
pool.



Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.