POV-Ray : Newsgroups : povray.binaries.images : Strange Artifacts Server Time
30 Jul 2024 18:15:06 EDT (-0400)
  Strange Artifacts (Message 21 to 25 of 25)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: Strange Artifacts
Date: 3 Oct 2011 21:55:54
Message: <4e8a67aa$1@news.povray.org>


> After your suggested corrections, it looks almost perfect... but there
> are still those parallel rows of dots, just like there were
> coincindental surfaces!

For those I have no explanation so far. I'll probably need more code to 
find out anything (camera, lights, global settings... the whole smash).


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Strange Artifacts
Date: 4 Oct 2011 04:14:29
Message: <4e8ac065@news.povray.org>
High!

> For those I have no explanation so far. I'll probably need more code to
> find out anything (camera, lights, global settings... the whole smash).

Should I really post the 500+ lines of code here?

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Strange Artifacts
Date: 4 Oct 2011 06:53:58
Message: <4e8ae5c6@news.povray.org>
On 04.10.2011 03:55, clipka wrote:

> For those I have no explanation so far. I'll probably need more code to
> find out anything (camera, lights, global settings... the whole smash).

Here it is, the whole smash:

// Residential area architectural study for Port Whatmough


// SWITCHES

#declare r=1; // toggles basic radiosity: 0 = off, 1 = on

#declare av=0; // toggles assembly view: 0 = off, 1 = on


global_settings
{
   #if (r=1)
     radiosity { }
     ambient_light 0
   #else
     ambient_light 0.25
   #end
}


// PIGMENTS

#declare P_Sky =
pigment
{
   gradient y
   color_map
   {
     [0 rgb <0.7, 1, 1>]
     [0.2 rgb <0, 0.25, 1>]
     [1   rgb <0, 0.25, 1>]
   }
}

// FINISHES

#declare F_Standard =
finish
{
   diffuse 1
   brilliance 0.15
}

#declare F_Shiny =
finish
{
   diffuse 1
   brilliance 0.6
   specular 0.8
   roughness 0.05
}

// TEXTURES

#declare T_Simple_White =
texture
{
   pigment { color rgb 1 }
   finish { F_Standard }
}

#declare T_Red_Metal =
texture
{
   pigment { color rgb <0.8, 0, 0> }
   finish { F_Shiny }
}

#declare T_Soil =
texture
{
   pigment { color rgb <0.8, 0.65, 0.4> }
   finish { F_Standard }
}

// STANDARDIZED OBJECTS

#declare sh = 2.6; // storey overall height
#declare cl = 0.15; // ceiling thickness
#declare ow = 0.18; // outer walls thickness
#declare iw = 0.1;  // inner walls thickness
#declare wr = 0.1;  // window rounding radius

#declare df=0.0001; // difference value to add or subtract to avoid 
coincidental surfaces


#declare Column =
cylinder
{
   0, <0, sh, 0>, 0.1
}

#declare Suspension =
prism
{
   linear_sweep
   linear_spline
   0, 0.1, 5
   <0, 0>, <2, 0>, <4, sh>, <0, sh>, <0, 0>
}

#declare OuterStair=
box
{
   0, <0.3, 0.2, 0.6>
}

#declare OuterStairs=
union
{
   #declare st=sh;
   #declare i=1;
   #while (i<(sh/0.2)+1)
     object
     {
       OuterStair
       scale <i, 1, 1>
       translate <0, st-i*0.2, 0>
     }
     #declare i=i+1;
   #end
}

#declare OuterStairs_Balustrade=
prism
{
   linear_sweep
   linear_spline
   0, 0.1, 5
   <0, 0>, <3.9, 0>, <3.9, 0.9>, <0, sh+0.9>, <0, 0>
}

#declare rfh = 1; // Roof railing total height
#declare ur = 0.025; // Upper rail radius
#declare or = 0.018; // Other rails' radius
#declare pr = 0.018; // Railing post radius
#declare cp = 0.08;  // Rail cornerpieces' radius
#declare fh = 0.02;  // Railing post foot height
#declare fpr = 0.005; // Railing post foot outer rounding radius
#declare jlt = 0.012; // Railing middle join loop thickness
#declare jlr = 0.005; // Railing middle join loop outer rounding radius
#declare jlw = 2*(jlr+pr); // Railing middle join loop width
#declare mr = 2;      // Number of middle rails
#declare rvsp = rfh/(mr+1); // Vertical spacing of rails

#declare Railing_Post_Foot =
union
{
	difference
	{
		cylinder
		{
		  0, <0, 0.02, 0>, pr+0.024
		}
		cylinder
		{
		  <0, -df, 0>, <0, 0.02+df, 0>, pr
		}
		difference
		{
	    cylinder
	    {
		    <0, 0.02-fpr, 0>, <0, 0.02+df, 0>, pr+0.024+df
		  }
		  cylinder
		  {
		    <0, 0.02-fpr-df, 0>, <0, 0.02+2*df, 0>, pr+0.024-fpr
		  }
		}
	}
   torus
   {
     pr+0.024-fpr, fpr
     translate <0, 0.02-fpr, 0>
   }
}


#declare Railing_Join_Loop_Rounding_Cutout =
difference
{
   cylinder
   {
     <-jlr-df, 0, 0>, 0, pr+jlt+df
   }
   cylinder
   {
     <-jlr-2*df, 0, 0>, <df, 0, 0>, pr+jlt-jlr
   }
}

#declare Railing_Join_Loop_Rounding =
torus
{
   pr+jlt-jlr, jlr
   rotate <0, 0, 90>
}


#declare Railing_Join_Loop=
union
{
	difference
	{
		cylinder
		{
		  0, <jlw, 0, 0>, pr+jlt
		}
	  cylinder
	  {
	    <-df, 0, 0>, <jlw+df, 0, 0>, pr
	  }
	  object
	  {
	    Railing_Join_Loop_Rounding_Cutout
	    translate <jlr, 0, 0>
	  }
	  object
	  {
	    Railing_Join_Loop_Rounding_Cutout
	    rotate <0, 180, 0>
	    translate <jlr+2*pr, 0, 0>
	  }
	}
   object
   {
     Railing_Join_Loop_Rounding
     translate <jlr, 0, 0>
   }
   object
   {
     Railing_Join_Loop_Rounding
     translate <jlr+2*pr, 0, 0>
   }
}

#declare Upper_Railing_Join_Loop =
object
{
   Railing_Join_Loop
   scale ur/or
}


#declare Railing_Post_Lower_Segment =
cylinder
{
   0, <0, rvsp-or-(jlt/2), 0>, pr
}

#declare Railing_Post_Middle_Segment =
cylinder
{
   <0, or+(jlt/2), 0>, <0, rvsp-(or+jlt/2), 0>, pr
}

#declare Railing_Post_Upper_Segment =
cylinder
{
   <0, or+(jlt/2), 0>, <0, rvsp-(ur+jlt*(ur/or)/2), 0>, pr
}



#declare Railing_Post =
union
{
   object { Railing_Post_Foot }
   object { Railing_Post_Lower_Segment }
   #declare s=1;
   #while (s<mr)
     object { Railing_Join_Loop translate <-jlw/2, s*rvsp, 0> }
     object { Railing_Post_Middle_Segment translate <0, s*rvsp, 0> }
     #declare s=s+1;
   #end
   object { Railing_Join_Loop translate <-jlw/2, s*rvsp, 0> }
   object { Railing_Post_Upper_Segment translate <0, s*rvsp, 0> }
   object { Upper_Railing_Join_Loop translate <-jlw*(ur/or)/2, rfh, 0> }
}

#declare Railing_Rail_Cornerpiece =
difference
{
   torus
   {
     cp, or
   }
   box
   {
     -(cp+or+df), <cp+or+df, cp+or+df, 0>
   }
   box
   {
     <0, -(cp+or+2*df), cp+or+df>, <cp+or+2*df, cp+or+2*df, -(cp+or+2*df)>
   }
}

#declare Upper_Railing_Rail_Cornerpiece =
difference
{
   torus
   {
     cp, ur
   }
   box
   {
     -(cp+ur+df), <cp+ur+df, cp+ur+df, 0>
   }
   box
   {
     <0, -(cp+ur+2*df), cp+ur+df>, <cp+ur+2*df, cp+ur+2*df, -(cp+ur+2*df)>
   }
}

// ACTUAL SCENE


#if (av=0)
	sky_sphere
	{
	  pigment { P_Sky }
	}
	
	plane
	{
	  y, 0
	  texture { T_Soil }
	}
	
	union
	{
		difference
		{
			box // main block
			{
			  <2, 0, 4>, <14, sh, 12>
			}
		  cylinder // verandah cutout, western part
		  {
		    <8.5, -df, 4>, <8.5, sh+df, 4>, 3.5
		  }
		  box // verandah cutout, eastern part
		  {
		    <8.5, -df, 4-df>, <14+df, sh+df, 7.5>
		  }
		}
	  box
	  {
	    <11, sh-cl, 2>, <14, sh, 7.5>
	  }
	  object
	  {
	    Column
	    translate <11.1, 0, 2.1>
	  }
	  object
	  {
	    Column
	    translate <13.9, 0, 2.1>
	  }
	  box // 1st floor
	  {
	    <9, sh, 9.5>, <14, sh*2, 16>
	  }
	  difference
	  {
	    object { Suspension }
	    cylinder { <1.5, -df, 1.1>, <1.5, 0.1+df, 1.1>, 0.45 }
	    cylinder { <0.4, -df, 2>, <0.4, 0.1+df, 2>, 0.2 }
	    cylinder { <0.65, -df, 1.5>, <0.65, 0.1+df, 1.5>, 0.1 }
	    cylinder { <0.35, -df, 0.4>, <0.35, 0.1+df, 0.4>, 0.15 }
	    cylinder { <2.7, -df, 2.05>, <2.7, 0.1+df, 2.05>, 0.3 }
	    rotate <-90, -90, 0>
	    translate <13.9, 0, 12>
	  }
	  difference
	  {
	    object { Suspension }
	    cylinder { <0.7, -df, 1.9>, <0.7, 0.1+df, 1.9>, 0.45 }
	    cylinder { <1.6, -df, 0.4>, <1.6, 0.1+df, 0.4>, 0.2 }
	    cylinder { <0.6, -df, 0.8>, <0.6, 0.1+df, 0.8>, 0.1 }
	    cylinder { <3, -df, 2.3>, <3, 0.1+df, 2.3>, 0.15 }
	    cylinder { <1.9, -df, 1.2>, <1.9, 0.1+df, 1.2>, 0.3 }
	    rotate <-90, -90, 0>
	    translate <9, 0, 12>
	  }
	  object
	  {
	    OuterStairs
	    rotate <0, 180, 0>
	    translate <9, sh, 10.2>
	  }
	  object
	  {
	    OuterStairs_Balustrade
	    rotate <-90, 180, 0>
	    translate <9, sh, 9.5>
	  }
	  object
	  {
	    OuterStairs_Balustrade
	    rotate <-90, 180, 0>
	    translate <9, sh, 10.2>
	  }

		texture { T_Simple_White }
	}
	
	#declare p=0;
	#while (p<7)
	  object
	  {
	    Railing_Post
	    translate <2.5+p, sh, 11.9>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end
	
   cylinder
   {
     <9+df, sh+rfh/(mr+1), 11.9>, <2.1+cp, sh+rfh/(mr+1), 11.9>, or
     texture { T_Red_Metal }
   }

   cylinder
   {
     <9+df, sh+2*rfh/(mr+1), 11.9>, <2.1+cp, sh+2*rfh/(mr+1), 11.9>, or
     texture { T_Red_Metal }
   }

   cylinder
   {
     <9+df, sh+rfh, 11.9>, <2.1+cp, sh+rfh, 11.9>, ur
     texture { T_Red_Metal }
   }



   #declare p=0;
	#while (p<mr)
	  object
     {
	    Railing_Rail_Cornerpiece
	    translate <2.1+cp, sh+(p+1)*(rfh/(mr+1)), 11.9-cp>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end
	

	object
	{
	  Upper_Railing_Rail_Cornerpiece
	  translate <2.1+cp, sh+rfh, 11.9-cp>
	  texture { T_Red_Metal }
	}
	
	
	#declare p=0;
	#while (p<8)
	  object
	  {
	    Railing_Post
       rotate <0, 90, 0>
	    translate <2.1, sh, 11.5-p>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end

   cylinder
   {
     <2.1, sh+rfh/(mr+1), 11.9-cp>, <2.1, sh+rfh/(mr+1), 4.1+cp>, or
     texture { T_Red_Metal }
   }

   cylinder
   {
     <2.1, sh+2*rfh/(mr+1), 11.9-cp>, <2.1, sh+2*rfh/(mr+1), 4.1+cp>, or
     texture { T_Red_Metal }
   }

   cylinder
   {
     <2.1, sh+rfh, 11.9-cp>, <2.1, sh+rfh, 4.1+cp>, ur
     texture { T_Red_Metal }
   }

   #declare p=0;
	#while (p<mr)
	  object
	  {
	    Railing_Rail_Cornerpiece
	    rotate <0, -90, 0>
	    translate <2.1+cp, sh+(p+1)*(rfh/(mr+1)), 4.1+cp>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end
	
	object
	{
	  Upper_Railing_Rail_Cornerpiece
     rotate <0, -90, 0>
	  translate <2.1+cp, sh+rfh, 4.1+cp>
	  texture { T_Red_Metal }
	}

   cylinder
   {
     <2.1+cp, sh+rfh/(mr+1), 4.1>, <4.9+(3.6-sqrt(pow(3.6, 2)-pow(0.1, 
2))), sh+rfh/(mr+1), 4.1>, or
     texture { T_Red_Metal }
   }

   cylinder
   {
     <2.1+cp, sh+2*rfh/(mr+1), 4.1>, <4.9+(3.6-sqrt(pow(3.6, 2)-pow(0.1, 
2))), sh+2*rfh/(mr+1), 4.1>, or
     texture { T_Red_Metal }
   }

   cylinder
   {
     <2.1+cp, sh+rfh, 4.1>, <4.9+(3.6-sqrt(pow(3.6, 2)-pow(0.1, 2))), 
sh+rfh, 4.1>, ur
     texture { T_Red_Metal }
   }


	#declare p=0;
	#while (p<3)
	  object
	  {
	    Railing_Post
	    translate <2.5+p, sh, 4.1>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end
	
	sphere
	{
           // sqrt(sqr(3.6)-sqr(0.1))
	  // <4.9+(3.6-cos(atan(0.1/3.6))*3.6), sh+rfh/(mr+1), 4.1>, or
	  <4.9+(3.6-sqrt(pow(3.6, 2)-pow(0.1, 2))), sh+rfh/(mr+1), 4.1>, or
	  texture { T_Red_Metal }
	}
	sphere
	{
	  <4.9, sh+2*rfh/(mr+1), 4.1>, or
	  texture { T_Red_Metal }
	}
	
	sphere
	{
	  <4.9, sh+rfh, 4.1>, ur
	  texture { T_Red_Metal }
	}
	

   difference // ground floor round cutout railing, lower rail
   {
		torus
		{
		  3.6, or
	  }
	  box
	  {
	    <0, -(or+df), -(3.6+or+df)>, <3.6+or+df, or+df, 3.6+or+df>
	  }
	  box
	  {
	    <-(3.6+or+df), -(or+2*df), -(3.6+or+2*df)>, <3.6+or+2*df, or+2*df, 0>
       rotate <0, degrees(asin(0.1/3.6)), 0>
	  }
	  translate <8.5, sh+rfh/3, 4>
	  texture { T_Red_Metal }
	}
	
	
	
	#declare p=0;
	#while (p<5)
	  object
	  {
	    Railing_Post
       rotate <0, 279+p*18, 0>
	    translate <8.5, sh, 4>+3.6*<sin(radians(279+p*18)), 0, 
cos(radians(279+p*18))>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end

	#declare p=0;
	#while (p<3)
	  object
	  {
	    Railing_Post
	    translate <8.5+p, sh, 7.6>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end

	#declare p=0;
	#while (p<5)
	  object
	  {
	    Railing_Post
       rotate <0, 90, 0>
	    translate <11.1, sh, 7-p>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end

	#declare p=0;
	#while (p<3)
	  object
	  {
	    Railing_Post
	    translate <11.5+p, sh, 2.1>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end

	#declare p=0;
	#while (p<7)
	  object
	  {
	    Railing_Post
       rotate <0, 90, 0>
	    translate <13.9, sh, 2.5+p>
	    texture { T_Red_Metal }
	  }
	  #declare p=p+1;
	#end
	
	// LIGHTING
	
	light_source
	{
	  <500000, 3000000, 700000>
	  color rgb 1
	}
	
	// CAMERAS
	
	#declare vp = 15; // selects viewpoint
	
	#switch (vp)
	  #case (0) // view from south
	    #declare CamPos = <8, 1.7, -10>;
	    #declare dir = 0;
	    #declare azi = 0;
	    #declare ang = 55;
	  #break
	  #case (1) // top view
	    #declare CamPos = <6, 30, 7>;
	    #declare dir = 0;
	    #declare azi = -89.9999;
	    #declare ang = 65;
	  #break
	  #case (2) // view from north
	    #declare CamPos = <9.5, 1.7, 25>;
	    #declare dir = 180;
	    #declare azi = 0;
	    #declare ang = 55;
	  #break
	  #case (3) // view from east
	    #declare CamPos = <30, 1.7, 9>;
	    #declare dir = 270;
	    #declare azi = 0;
	    #declare ang = 55;
	  #break
	  #case (4) // Outer stairs, view upstairs
	    #declare CamPos = <2.5, sh+1.7, 9.9>;
	    #declare dir = 90;
	    #declare azi = 0;
	    #declare ang = 55;
	  #break
	  #case (5) // Outer stairs, view downstairs
	    #declare CamPos = <9.5, 2*sh+1.7, 9.9>;
	    #declare dir = 270;
	    #declare azi = -40;
	    #declare ang = 55;
	  #break
	  #case (6) // oblique view from south
	    #declare CamPos = <8, 20, -10>;
	    #declare dir = 0;
	    #declare azi = -45;
	    #declare ang = 55;
	  #break
	  #case (7) // view to northwest from base of outer stairs
	    #declare CamPos = <3.5, sh+1.7, 9.9>;
	    #declare dir = 315;
	    #declare azi = -25;
	    #declare ang = 55;
	  #break
	  #case (8) // view to southeast from base of outer stairs
	    #declare CamPos = <3.5, sh+1.7, 9.9>;
	    #declare dir = 135;
	    #declare azi = -20;
	    #declare ang = 55;
	  #break
	  #case (9) // top view of northwestern corner of ground floor
	    #declare CamPos = <2.1+cp, sh+5, 11.9-cp>;
	    #declare dir = 0;
	    #declare azi = -89.9999;
	    #declare ang = 55;
	  #break
	  #case (10) // view to south-southwest from base of outer stairs
	    #declare CamPos = <3.5, sh+1.7, 9.9>;
	    #declare dir = 202.5;
	    #declare azi = -25;
	    #declare ang = 55;
	  #break
	  #case (11) // top view of southwestern corner of ground floor
	    #declare CamPos = <2.1+cp, sh+5, 4.1-cp>;
	    #declare dir = 0;
	    #declare azi = -89.9999;
	    #declare ang = 55;
	  #break
	  #case (12) // top view of round cutout of ground floor
	    #declare CamPos = <6.75, 1500, 4>;
	    #declare dir = 0;
	    #declare azi = -89.9999;
	    #declare ang = 55;
	  #break
	  #case (13) // top view of southern end of round cutout of ground floor
	    #declare CamPos = <4.9, sh+0.7, 4.1>;
	    #declare dir = 0;
	    #declare azi = -89.9999;
	    #declare ang = 55;
	  #break
	  #case (14) // close-up view of southern end of round cutout of ground 
floor
	    #declare CamPos = <5.9, sh+0.5, 3.1>;
	    #declare dir = 315;
	    #declare azi = -10;
	    #declare ang = 55;
	  #break
	  #case (15) // extreme close-up view of southern end of round cutout 
of ground floor
	    #declare CamPos = <5.9, sh+rfh/3, 3.1>;
	    #declare dir = 315;
	    #declare azi = -0;
	    #declare ang = 5;
	  #break
	#end
	
	#declare CamLook = <sin(radians(dir)) * cos(radians(azi)), 
sin(radians(azi)), cos(radians(dir)) * cos(radians(azi))>;
	
	camera
	{
	  location CamPos
	  look_at CamPos+CamLook
	  angle ang
	}
#else // assembly view
   sky_sphere
   {
     pigment { color rgb 0.7 }
   }

   light_source
   {
     <2000, 500, -2000>
     color rgb 1
   }

   object
   {
     Railing_Rail_Cornerpiece
     texture { T_Red_Metal }
   }

   camera
   {
     location <0, 0.4, 0>
     look_at 0
     angle 40
   }
#end

// end of code

See you in Khyberspace!

Yadgar


Post a reply to this message

From: clipka
Subject: Re: Strange Artifacts
Date: 4 Oct 2011 07:50:46
Message: <4e8af316$1@news.povray.org>

> On 04.10.2011 03:55, clipka wrote:
>
>> For those I have no explanation so far. I'll probably need more code to
>> find out anything (camera, lights, global settings... the whole smash).
>
> Here it is, the whole smash:

The bad news for us is that this is indeed a bug. Apparently the math 
for the torus is very susceptible to rounding errors when the camera is 
inside a very thin torus, on (or very close to) the torus' "center 
plane". (The cylindrical part of the railing seems to be affected only 
because the torus, despite being cut away, still "projects" artifacts.) 
The bug might be pretty similar in nature to the artifacts seen in 
sphere sweeps.

The good news for you is that for obvious reasons these artifacts are 
highly unlikely to show up in your final render.


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Strange Artifacts
Date: 4 Oct 2011 08:03:23
Message: <4e8af60b$1@news.povray.org>
Hi(gh)!

On 04.10.2011 13:50, clipka wrote:
 > The bad news for us is that this is indeed a bug.
No, this is not really bad news - at least it does not show that even 
after 15 years of poving, I still get messed up with trivial beginners' 
mistakes...

 > The good news for you is that for obvious reasons these artifacts are 
highly unlikely to show up in your final render.
 >
Yes, very probably not... and in animations, these dots would be almost 
surely lost in compression!

See you in Khyberspace!

Yadgar


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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