|
|
James Holsenback <nom### [at] nonecom> wrote:
> On 04/17/2014 08:32 AM, CAS wrote:
> > "CAS" <sup### [at] cstnetcn> wrote:
> >> Alain <kua### [at] videotronca> wrote:
> >>>> scott <sco### [at] scottcom> wrote:
> >>>>>> Hello,everyone.I am a student.I am doing my graduation project recently.It is
> >>>>>> simulating radiance with ray-tracing.I have done a test with pov.But I am
> >>>>>> confronting a error with my result.Could anyboby help me check out my
issue.Beg
> >>>>>> a hot.I am a student.I am confronting the pressure of graduation.I feel so
> >>>>>> worry.I have uploaded the whole process of my test,beg a hot help me!
> >>>>>> "pov-xyz"is the location of each sphere.
> >>>>>> "pov-ref"is the reflectivity of each sphere.
> >>>>>> "pov.exr"is the output image by pov.
> >>>>>> I have converted "pov.exr" to "pov.tiff".
> >>>>>> "result"is my analyse.My issue was wrote in it.
> >>>>>> Expecting somebody help me.Great gratitudes!
> >>>>>
> >>>>> Using a specular highlight on tiny spheres is going to give very
> >>>>> unpredictable results, the output pixel value will highly depend on
> >>>>> exactly where the ray hits the sphere compared to the highlight
> >>>>> position. I zoomed in on your scene and rendered it, see attached, I
> >>>>> also changed the background colour to red to highlight the spheres
> >>>>> better. Do you see the problem?
> >>>>>
> >>>>> I would use boxes rather than spheres and use diffuse rather than
> >>>>> specular reflection:
> >>>>>
> >>>>> pigment{color rgb 1}
> >>>>> finish {
> >>>>> ambient 0
> >>>>> diffuse ref
> >>>>> }
> >>>>> }
> >>>>>
> >>>>> That should give much more uniform results and not depend on where each
> >>>>> ray hits the shapes. I don't know if that will solve your problem or not.
> >>>>
> >>>> I have modified the statements and done a test with your advice.I find the
> >>>> result changed,but not what I wanted.Besides,I only have 40000 points ,if I
used
> >>>> box as my model, which needs two points to describle,but my input scene is as
> >>>> "pov.tif".One point stands for one object,corresponding,with a reflectity.If I
> >>>> used box,may need two point to descible a object,I doublt the scene is not my
> >>>> wanted.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>> You can use boxes instead of spheres without doubling the size of your
> >>> file. Curently, you use this code to place your spheres:
> >>> sphere {
> >>> <x1-center_x,y1-center_y,z1-center_z>,1.55
> >>> finish { ambient 0
> >>> emission 0
> >>> specular ref
> >>> }
> >>> }
> >>>
> >>> To use box, just use this code:
> >>> box{-1.55, 1.55 // reduce slightly is you want to keep some gap.
> >>> // The following line is the key...
> >>> translate <x1-center_x,y1-center_y,z1-center_z>
> >>> finish { ambient 0
> >>> emission 0
> >>> specular ref
> >>> }
> >>> }
> >>>
> >>>
> >>> This will give you boxes with a width identical to the diameter of your
> >>> spheres.
> >>>
> >>> Even beter, make an union containing all your objects:
> >>>
> >>> union{
> >>> #fopen Input_geom_file geom_file_name read
> >>> #fopen Input_spec_file spec_file_name read
> >>> #while(defined(Input_geom_file))
> >>>
> >>> #read(Input_geom_file, X1, Y1, Z1)
> >>> #read(Input_spec_file, Ref)
> >>>
> >>> box{-1.55, 1.55 // reduce slightly is you want to keep some gap.
> >>> // The following line is the key...
> >>> translate <X1-Center_X,Y1-Center_Y,Z1-Center_Z>
> >>> }// Remove the texture from the objects
> >>> #end
> >>> // and apply it to all objects at once
> >>> finish { ambient 0
> >>> emission 0
> >>> specular Ref
> >>> }
> >>> }// End of the union
> >>>
> >>> As the variable "n" is never used, I removed it.
> >>>
> >>> Finaly, a general recomendation: In all of your user defined variable,
> >>> use at least ONE upper case letter. This ensure that you don't have any
> >>> conflict with predefined variables and primitive. It also make it clear
> >>> that those are YOUR variables. It can realy help when debugging your code.
> >>>
> >>>
> >>>
> >>>
> >>> Alain
> >>
> >> Hello,I want to ask a question:
> >> "try
> >> {
> >> Imf::RgbaChannels channels;
> >> if (options.grayscale)
> >> if (use_alpha)
> >> channels = WRITE_YA; // only write luminance & alpha
> >> else
> >> channels = WRITE_Y; // only write luminance
> >> else
> >> if (use_alpha)
> >> channels = WRITE_RGBA; // write RGB & alpha
> >> else
> >> channels = WRITE_RGB; // write RGB"
> >>
> >> this is a part of resource code in openexr.cpp,I want to write luminance
> >> only,how can I set some parameters in pov?
> >
> > -UA :Sets alpha output off
> > +Feg:output type 'e' grayscale output
> > I set "-UA +Feg" in command line,but messages says :grayscale not currently
> > supported whith output file format "e";But only openexr file supports luminance
> > output.How can I solve this problem?
> >
> Currently PNG, and PPM are the only file formats that support grayscale
> output
"try
{
Imf::RgbaChannels channels;
if (options.grayscale)
if (use_alpha)
channels = WRITE_YA; // only write luminance & alpha
else
channels = WRITE_Y; // only write luminance
else
if (use_alpha)
channels = WRITE_RGBA; // write RGB & alpha
else
channels = WRITE_RGB; // write RGB"
this is a part of resource code in openexr.cpp,and only this text mentions
something about luminance.
However,when I turn on grayscale output for png file ,setting alpha turned
off,the result of simulated image may not be luminance,what is it?I input "-UA
+FNg"in command line,whcih is supported.
Post a reply to this message
|
|