|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello everyone,
For a research project, I need to make a physically accurate simulation of
candlewax. I have taken a photo of what it looks like when I embed a small
black bead in a cube of wax and shine a light on it:
http://www.turingbirds.com/personal/random/wax.png
However, in POVRay, I cannot get the wax material to interact with the
sphere:
http://www.turingbirds.com/personal/random/nogoodrender.png
http://www.turingbirds.com/personal/random/wax.pov
Am I forgetting something, or is POVRay incapable of rendering this (without
hacks, e.g. blur)?
Thanks in advance,
Charles
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Charles wrote:
> Hello everyone,
>
> For a research project, I need to make a physically accurate simulation of
> candlewax. I have taken a photo of what it looks like when I embed a small
> black bead in a cube of wax and shine a light on it:
>
> http://www.turingbirds.com/personal/random/wax.png
>
> However, in POVRay, I cannot get the wax material to interact with the
> sphere:
>
> http://www.turingbirds.com/personal/random/nogoodrender.png
> http://www.turingbirds.com/personal/random/wax.pov
>
> Am I forgetting something, or is POVRay incapable of rendering this (without
> hacks, e.g. blur)?
Basically, your CG-wax is very "thin" (density-wise), you can raise that
simply by adding a density{rgb 10} to raise it tenfold, for example. I
do that all the time for my clouds, so they are less translucent, and
works best with scattering media of course.
As for the blurriness, you'd probably have to use an arealight, maybe
even an area of point light sources to achieve what you're aiming for.
A given fact is that lightrays won't be bent inside media, so achieving
realistic wax is, at least with the current and official povray, not
possible by just using a simple media container.
If you make layers of objects, their surface irregular/normal-mapped,
and use photons for the media-calculation, you might get somewhere, but
the rendering times will skyrocket tremendously.
Just a couple thoughts right off the top of my head, probably not worth
much. 2 cents maybe. ;-)
Regards,
Tim
--
aka "Tim Nikias"
Homepage: <http://www.nolights.de>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Charles nous apporta ses lumieres en ce 2007/09/01 19:39:
> Hello everyone,
>
> For a research project, I need to make a physically accurate simulation of
> candlewax. I have taken a photo of what it looks like when I embed a small
> black bead in a cube of wax and shine a light on it:
>
> http://www.turingbirds.com/personal/random/wax.png
>
> However, in POVRay, I cannot get the wax material to interact with the
> sphere:
>
> http://www.turingbirds.com/personal/random/nogoodrender.png
> http://www.turingbirds.com/personal/random/wax.pov
>
> Am I forgetting something, or is POVRay incapable of rendering this (without
> hacks, e.g. blur)?
>
> Thanks in advance,
> Charles
>
>
You are on the right track. You need your media MUCH dencer!
Your media as it is now:
media
{
scattering { 2, 0.5 extinction 0.9}
}
Wax works as a very dense scattering media, a color of 0.5 is just to small.
Wax does bend light going trough it: if have an index of refraction: ior.
I think that solid wax have an ior slightly higher than water, while molten wax
is slightly lower than water.
Try:
interior{
scattering{2, 5 }
ior 1.4
}
You may need to push the color even higher.
The surface of the wax not perfectly smooth, it's covered by tyni irregularities.
Another thing that you may try, is to use blured transparence:
Add an averaged normal statement to your cube:
#declare Scale = 0.001;// use a large (>100) or a small (<0.01) value
#declare R = seed(1);// any value will do
#declare Samples = 10;// use a larger value only if absolutely needed, as you
cross 2 surfaces, each ray will split in 10 two times!
normal{average{normal_map{
#while(Samples)
[1 normal bumps translate<rand(R),rand(R),rand(R)>*Scale scale Scale]
// you use a broad pattern with large displacemen
//OR tyni pattern with small displacement.
#declare Samples = Samples - 1;
#end
}
Be carefull, as this will greatly slow down the rendering speed: each ray will
be split in 10 before it enter the media,
As your scene is set now, you probably don't need the radiosity. Remove the
radiosity block.
By default, lights interact with the media: media_interaction on not usefull.
You use media_interaction off when you don't want a light to interact with medias.
The only include file that you realy use is color.inc.
You can remove all the other include without causing any change.
--
Alain
-------------------------------------------------
The tree of liberty must be refreshed from time to time with the blood of
patriots and tyrants.
Thomas Jefferson
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain <ele### [at] netscapenet> wrote:
> Charles nous apporta ses lumieres en ce 2007/09/01 19:39:
> > Hello everyone,
> >
> > For a research project, I need to make a physically accurate simulation of
> > candlewax.
Hi!
I made a demo scene with wax this spring (see below).
The material is slightly altered from the one first provided by Andy Cocker
in his posting:
http://news.povray.org/povray.text.scene-files/thread/%3C3fcddaec$1@news.povray.org%3E/?ttop=238503&toff=100
The media density is very high (seven).
Perhaps try this, should render in a few seconds.
Yours,
Bu.
Only code follows:
//////////////////////////////////////////////////////////////////////
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.6
// Desc: Checkered Floor Example
// Date: mm/dd/yy
// Auth: ?
//
#version 3.6;
#include "colors.inc"
global_settings {
assumed_gamma 1.0
max_trace_level 5
}
// ----------------------------------------
camera {
location <0.0, 0.5, -4.0>
direction 1.5*z
right x*image_width/image_height
look_at <0.0, 0.0, 0.0>
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
}
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
plane { // checkered floor
y, -1
texture
{
pigment {
checker
color rgb 1
color blue 1
scale 0.5
}
finish{
diffuse 0.8
ambient 0.1
}
}
}
//
http://news.povray.org/povray.text.scene-files/thread/%3C3fcddaec$1@news.povray.org%3E/?ttop=238503&toff=100
#declare Obj_Col = <1, 0.6, 0.2>;
#declare Obj_Absorption = 1 - Obj_Col;
#declare Media_Density = 7; //was 6.5; // must be adapted to size
#declare SSS_Tex =
texture {
pigment {
rgb Obj_Col
filter 1.2 // was 1.0
}
finish {
brilliance 4 // wasn't included from Andy Cocker
specular 0.5
roughness 0.2
ambient 0.2
reflection {
0.0,
0.5
fresnel
}
conserve_energy
}
}
#declare SSS_Int =
interior {
ior 1.3 // close to water
// Media with absorption and scattering
media {
absorption Obj_Absorption*2
scattering {
4, // Rayleigh
Media_Density //see above
}
method 3 // adaptive sampling, is default anyway
}
}
#declare SSS_Material =
material {
texture {
SSS_Tex
}
interior {
SSS_Int
}
}
//
cylinder{
<0, -1, 0>
<0, 0.3, 0>
0.3
hollow
material {SSS_Material}
}
//end of file
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Burki nous apporta ses lumieres en ce 2007/09/02 13:15:
> Alain <ele### [at] netscapenet> wrote:
>> Charles nous apporta ses lumieres en ce 2007/09/01 19:39:
>>> Hello everyone,
>>>
>>> For a research project, I need to make a physically accurate simulation of
>>> candlewax.
>
>
> Hi!
>
> I made a demo scene with wax this spring (see below).
>
> The material is slightly altered from the one first provided by Andy Cocker
> in his posting:
>
http://news.povray.org/povray.text.scene-files/thread/%3C3fcddaec$1@news.povray.org%3E/?ttop=238503&toff=100
> The media density is very high (seven).
>
> Perhaps try this, should render in a few seconds.
>
>
> Yours,
> Bu.
>
>
> Only code follows:
>
> //////////////////////////////////////////////////////////////////////
> // Persistence of Vision Ray Tracer Scene Description File
> // File: ?.pov
> // Vers: 3.6
> // Desc: Checkered Floor Example
> // Date: mm/dd/yy
> // Auth: ?
> //
>
> #version 3.6;
>
> #include "colors.inc"
>
> global_settings {
> assumed_gamma 1.0
> max_trace_level 5
> }
>
> // ----------------------------------------
>
> camera {
> location <0.0, 0.5, -4.0>
> direction 1.5*z
> right x*image_width/image_height
> look_at <0.0, 0.0, 0.0>
> }
>
> sky_sphere {
> pigment {
> gradient y
> color_map {
> [0.0 rgb <0.6,0.7,1.0>]
> [0.7 rgb <0.0,0.1,0.8>]
> }
> }
> }
>
> light_source {
> <0, 0, 0> // light's position (translated below)
> color rgb <1, 1, 1> // light's color
> translate <-30, 30, -30>
> }
>
> // ----------------------------------------
>
> plane { // checkered floor
> y, -1
> texture
> {
> pigment {
> checker
> color rgb 1
> color blue 1
> scale 0.5
> }
> finish{
> diffuse 0.8
> ambient 0.1
> }
> }
> }
> //
>
http://news.povray.org/povray.text.scene-files/thread/%3C3fcddaec$1@news.povray.org%3E/?ttop=238503&toff=100
>
> #declare Obj_Col = <1, 0.6, 0.2>;
> #declare Obj_Absorption = 1 - Obj_Col;
> #declare Media_Density = 7; //was 6.5; // must be adapted to size
> #declare SSS_Tex =
> texture {
> pigment {
> rgb Obj_Col
> filter 1.2 // was 1.0
> }
> finish {
> brilliance 4 // wasn't included from Andy Cocker
> specular 0.5
> roughness 0.2
> ambient 0.2
> reflection {
> 0.0,
> 0.5
> fresnel
> }
> conserve_energy
> }normal{ granite 0.2 scale 0.001}
> }
> #declare SSS_Int =
> interior {
> ior 1.3 // close to water
> // Media with absorption and scattering
> media {
> absorption Obj_Absorption*2
> scattering {
> 4, // Rayleigh
> Media_Density //see above
> }
> method 3 // adaptive sampling, is default anyway
> }
> }
>
> #declare SSS_Material =
> material {
> texture {
> SSS_Tex
> }
> interior {
> SSS_Int
> }
> }
>
>
>
> //
> cylinder{
> <0, -1, 0>
> <0, 0.3, 0>
> 0.3
> hollow
> material {SSS_Material}
> }
sphere{0,0.1 pigment{rgb 0}}
>
> //end of file
>
>
Added:
normal{ granite 0.2 scale 0.001} to the texture of the cylinder.
Added:
sphere{0,0.1 pigment{rgb 0}}
Some improvement.
--
Alain
-------------------------------------------------
OK, so what's the speed of dark?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dear Everyone,
Burki: even though your candle looks very nice, it still doesn't render
embedded objects with "participating" wax. I think (read: fear) that what I
need is a full volume render, which
1) takes ages to render;
2) I don't know if povray is capable of.
What seems to be the problem is that POVRay treats a material as a single
entity instead of rendering it as thousands if not millions of particles
(think of smoke). The obvious solution here is a #while-loop to dynamically
generate as many of these micro-particles as gives a good render result.
This post is a last cry for something more decent. Some sort of mapping?
Thanks,
Charles
PS. Alain, I'm not sure this is what your code attempts to do. I couldn't
get it parsed (latest POVRay version).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Charles nous apporta ses lumieres en ce 2007/09/02 17:18:
> Dear Everyone,
>
> Burki: even though your candle looks very nice, it still doesn't render
> embedded objects with "participating" wax. I think (read: fear) that what I
> need is a full volume render, which
> 1) takes ages to render;
> 2) I don't know if povray is capable of.
>
> What seems to be the problem is that POVRay treats a material as a single
> entity instead of rendering it as thousands if not millions of particles
> (think of smoke). The obvious solution here is a #while-loop to dynamically
> generate as many of these micro-particles as gives a good render result.
> This post is a last cry for something more decent. Some sort of mapping?
>
> Thanks,
> Charles
>
> PS. Alain, I'm not sure this is what your code attempts to do. I couldn't
> get it parsed (latest POVRay version).
>
>
>
>
Where is the error? And what does it say?
Try this one:
#include "colors.inc"
global_settings {
assumed_gamma 1.0
max_trace_level 5
photons{spacing 0.1}
}
// ----------------------------------------
camera {
location <0.0, 0.5, -4.0>
direction 1.5*z
right x*image_width/image_height
look_at <0.0, 0.0, 0.0>
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
}
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
plane { // checkered floor
y, -1
texture
{
pigment {
checker
color rgb 1
color blue 1
scale 0.5
}
finish{
diffuse 0.8
ambient 0.1
}
}
}
#declare Obj_Col = <1, 0.6, 0.2>;
#declare Obj_Absorption = 1 - Obj_Col;
#declare Media_Density = 7; //was 6.5; // must be adapted to size
#declare SSS_Tex =
texture {
pigment {
rgb Obj_Col
filter 1.2 // was 1.0
}
finish {
brilliance 4 // wasn't included from Andy Cocker
specular 0.5
roughness 0.2
ambient 0.2
reflection {
0.0,
0.5
fresnel
}
conserve_energy
}
normal{ granite 0.2 scale 0.00041}
}
#declare SSS_Int =
interior {
ior 1.3 // close to water
// Media with absorption and scattering
media {
absorption Obj_Absorption*2
scattering {
4, // Rayleigh
Media_Density //see above
}
}
}
#declare SSS_Material =
material {
texture {
SSS_Tex
}
interior {
SSS_Int
}
}
//
cylinder{
<0, -1, 0>
<0, 0.3, 0>
0.3
hollow
material {SSS_Material}
//photons{target refraction on}
}
sphere{<-0.1, -0.3, -0.1>,0.1 pigment{rgb 0}}
// an imbeded black sphere.
//end of file
--
Alain
-------------------------------------------------
Just because someone doesn't love you the way you want them to, doesn't mean
they don't love you with all they have.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dear Alain,
I was referring to the snipped you posted earlier:
#declare Scale = 0.001;// use a large (>100) or a small (<0.01) value
#declare R = seed(1);// any value will do
#declare Samples = 10;// use a larger value only if absolutely needed, as
you
cross 2 surfaces, each ray will split in 10 two times!
normal{average{normal_map{
#while(Samples)
[1 normal bumps translate<rand(R),rand(R),rand(R)>*Scale scale Scale]
// you use a broad pattern with large displacemen
//OR tyni pattern with small displacement.
#declare Samples = Samples - 1;
#end
}
This gives me a syntax error.
Another way to state the issue, by the way, is that a single material cannot
cast a shadow upon itself. I think I'm going to try simulating a few
thousand microscopic spheres and see what results that gives me.
Kind regards,
Charles
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Charles nous apporta ses lumieres en ce 2007/09/03 07:23:
> Dear Alain,
>
> I was referring to the snipped you posted earlier:
>
> #declare Scale = 0.001;// use a large (>100) or a small (<0.01) value
> #declare R = seed(1);// any value will do
> #declare Samples = 10;// use a larger value only if absolutely needed, as
> you
> cross 2 surfaces, each ray will split in 10 two times!
>
> normal{average{normal_map{
> #while(Samples)
> [1 normal bumps translate<rand(R),rand(R),rand(R)>*Scale scale Scale]
> // you use a broad pattern with large displacemen
> //OR tyni pattern with small displacement.
> #declare Samples = Samples - 1;
> #end
> }
>
> This gives me a syntax error.
>
> Another way to state the issue, by the way, is that a single material cannot
> cast a shadow upon itself. I think I'm going to try simulating a few
> thousand microscopic spheres and see what results that gives me.
>
> Kind regards,
> Charles
>
>
The problem is that a comment line was split in 2. The error comes from that
second part whitch is NOT proper SDL syntax ;-)
--
Alain
-------------------------------------------------
Lutheran: If shit happens, don't talk about it.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
I've made some progress:
http://www.turingbirds.com/personal/random/wax_trial_2_render.png
http://www.turingbirds.com/personal/random/wax_trial_2.pov
However, despite the end of the cylinder being inside the box, it is not
getting "blurry", just darker. It looks like povray is treating the
scattering media as a single entity, rather than a near-infinite number of
particles which it's supposed to represent. Kasuga_Kyousuke on povray irc
advised me that radiosity will not fix this scene, because of the same
reason: looking at the media as a single entity. Does anyone know of a way
to make this work?
Thanks,
Charles
PS. Intended result: candle wax with black bead embedded
(http://www.turingbirds.com/personal/random/wax.png)
PS2. adding absorption does not work; it only makes everything evenly darker
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|