|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
With 3.6 version, i use a photon #macro like under this line, and the 'no_image'
for object, to see the refraction appeer on a plane and it's ok.
But with the 3.7 version, and the same file, there is nothing appeer on plane,
and no photons count on render.
#macro PhotonBlock()
#if(Photons)
photons {
target
collect off
reflection off
refraction on
}
#end
#end
Do you see a solution with 3.7 language ?
Albun
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 7-5-2019 18:28, Albun wrote:
> Hi,
>
> With 3.6 version, i use a photon #macro like under this line, and the 'no_image'
> for object, to see the refraction appeer on a plane and it's ok.
> But with the 3.7 version, and the same file, there is nothing appeer on plane,
> and no photons count on render.
>
> #macro PhotonBlock()
> #if(Photons)
> photons {
> target
> collect off
> reflection off
> refraction on
> }
> #end
> #end
>
> Do you see a solution with 3.7 language ?
>
You didn't tell, do you have a photons statement in the global_settings?
That is essential.
either:
global_settings {
photons {
spacing 0.02
}
}
or:
global_settings {
photons {
count 1000
}
}
Also, the photons-receiving objects need a photons definition, like the
following example:
plane {
y, 0
texture {
pigment { color srgb <1.0, 0.8, 0.6> }
}
photons {collect on}
}
Maybe also the light source:
light_source {
<100, 300, 500>
color rgb 1.0
parallel
photons {
refraction on
reflection on
}
}
See the appropriate sections in the docs.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Well Thomas,
ok for global setting with spacing
ok for color srgb
ok for light and object collect photon
ok for render photons count
but with the 'no_image' in object no ok, and no photons count in render.
May i will use only 3.6 version for this file...
Albun
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Here is the file, no_image is in sphere.
#version 3.7;
#include "colors.inc"
#declare Camera_0 = camera {perspective angle 75 // front view
location <0.0 , 1.0 ,-3.0>
right x*image_width/image_height
look_at <0.0 , 1.0 , 0.0>}
camera{Camera_0}
#declare Photons = on;
#declare Interior =
interior {
fade_distance 2
fade_power 3
ior 1.45
dispersion .05
dispersion_samples 12
}
#macro PhotonBlock()
#if(Photons)
photons {
target
collect off
reflection off
refraction on
}
#end
#end
#declare Intensity = 12;
#declare L_Fade_Distance = 40;
#declare L_Fade_Power = 1;
#declare Area_Light=off;
#declare ALL = 1;//area light height (width?)
#declare ALW = 8;//area light width
#declare ALR = 5;//area light resolution
global_settings { ambient_light .1
assumed_gamma 1.3
max_trace_level 5
#if(Photons)
photons {spacing 0.0015} //0.015
#end
}
light_source{< 0,0,30> White*Intensity
#if(Area_Light)
area_light x*ALL, z*ALW, ALR, ALR
adaptive 1
jitter
#end
fade_distance L_Fade_Distance
fade_power L_Fade_Power
#if(Photons)
photons {refraction on reflection off}
#end
rotate<-5,0,0>
}
// sky ----------------------------------------------------------------------
sky_sphere { pigment { gradient <0,1,0>
color_map { [0.00 srgb <0.6,0.7,1.0>]
[0.35 srgb <0.1,0.0,0.8>]
[0.65 srgb <0.1,0.0,0.8>]
[1.00 srgb <0.6,0.7,1.0>]
}
scale 2
} // end of pigment
} //end of skysphere
// ground -------------------------------------------------------------------
plane{ <0,1,0>, 0
texture{ pigment{ checker color srgb<.8,.8,.8> color srgb<0.5,0.5,0.5>*1}
} // end of texture
photons {collect on}
} // end of plane
//---------------------------------------------------------------------------
//---------------------------- objects in scene ----------------------------
//---------------------------------------------------------------------------
#declare GlassTex =
texture {
pigment {color srgbf <1, 1, 1, 1>}
finish {
reflection 0.05
specular 1
roughness 0.001
metallic on
irid {0.65 // contribution to overall color
thickness 0.8 // affects frequency, or "busy-ness"
turbulence 0.1 // Variance in film thickness
}
}
}
// sample sphere
sphere { <0,0,0>, 1.00
texture { GlassTex} // end of texture
interior {Interior}
PhotonBlock()
no_image ///////////////////////
scale<1,1,1> rotate<0,0,0> translate<0,1.35,0>
} // end of sphere -----------------------------------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 19-05-08 à 10:11, Albun a écrit :
>
>
>
>
>
>
Can you try using the object's photons block without the macro?
It's OK for any object to have a photons block in a non-photons scene.
It will just have no effect.
Your sample sphere will look like :
sphere { <0,0,0>, 1.00
texture { GlassTex} // end of texture
interior {Interior}
//// The following is a "no op" in non-photon scene /////////
photons {
target
collect off
reflection off
refraction on
}
/////////////
no_image ///////////////////////
scale<1,1,1> rotate<0,0,0> translate<0,1.35,0>
} // end of sphere -----------------------------------
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 5/8/19 10:11 AM, Albun wrote:
>
> Here is the file, no_image is in sphere.
>
Thanks. I can see that the no_image behavior is different 3.6 to
3.7/3.8. Anyone know if such a change was intentional for some reason?
FYI. I moved the light source to a z of 300 and then rotated -55*x to
get photons on the plane with your camera set up. Otherwise - with the
point light at least - the photons mostly miss the plane off the bottom
of the image. I also took your light intensity down from 12 to 1 to
prevent white out.
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
So, with or without macro, with no_image the render do the same result, and no
photons count in 3.7.
Who can tell better ?
Thanks all
Albun
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 5/9/19 4:53 AM, Albun wrote:
>
> So, with or without macro, with no_image the render do the same result, and no
> photons count in 3.7.
>
> Who can tell better ?
>
> Thanks all
>
> Albun
>
It happens I've been working some in the photon code for another
investigation so I started to dig here. I have to take a short break but
what I've found so far is that having the no_image or not changes
whether the following test:
if (Test_Flag(bestisect.Object, PH_TARGET_FLAG))
in PhotonTrace::TraceRay in photons.cpp is true.
I thought, OK, it must be a parser issue and started to look at things
from that end. But, the sphere's PH_TARGET_FLAG is true with and without
the no_image flag checking just after the
Parse_Object_Mods(reinterpret_cast<ObjectPtr>(Object));
call in ObjectPtr Parser::Parse_Sphere() in parser.cpp.
So... I still don't know what's going on, but looking like the sphere's
photon target flag is changing state sometime after being set correctly
in the parser and before the photon TraceRay call due the no_image modifier.
More when I get back to it - unless someone beats me to it.
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
For the moved light, and any other set up, it's another beautyful aspect.
But i stay right in my boots for that ....;-)))
For the code, i havent an idea about what happen with the source.
But i understand that is not easy to really know all
thing happen in the 'troubling unknowquantic rendering',
if i can naming it like that.
Albun
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 5/9/19 10:36 AM, Albun wrote:
>
>
> For the moved light, and any other set up, it's another beautyful aspect.
> But i stay right in my boots for that ....;-)))
>
> For the code, i havent an idea about what happen with the source.
> But i understand that is not easy to really know all
> thing happen in the 'troubling unknowquantic rendering',
> if i can naming it like that.
>
> Albun
>
OK. The actual issue is in the PhotonTrace::TraceRay code in photons.cpp
where we have:
found = FindIntersection(bestisect, ray, precond, postcond);
if(found)
{...
this borrows 'NoSomethingFlagRayObjectCondition precond' from trace.cpp
which starts off with:
bool NoSomethingFlagRayObjectCondition::operator()(const Ray& ray,
ConstObjectPtr object, double) const
{
if(ray.IsImageRay() && Test_Flag(object, NO_IMAGE_FLAG))
return false;
which returns false because of how ray.IsImageRay() is set up. We can
hard code around the issue by changing:
found = FindIntersection(bestisect, ray, precond, postcond);
to
found = FindIntersection(bestisect, ray);
but I think the right thing to do is probably to change the
ray.IsImageRay() definition in ray.h from:
bool IsImageRay() const { return primaryRay || (refractionRay &&
!reflectionRay && !radiosityRay); }
to:
bool IsImageRay() const { return (primaryRay && !photonRay) ||
(refractionRay && !reflectionRay && !photonRay && !radiosityRay); }
or suppose some photon code specific precond a possibility too. My guess
at the moment is that this 3.6 to 3.7 change was not intentional.
Christoph?
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|