POV-Ray : Newsgroups : povray.binaries.images : Problem with mesh2 building - memory crash! : Problem with mesh2 building - memory crash! Server Time
2 Nov 2024 18:48:41 EDT (-0400)
  Problem with mesh2 building - memory crash!  
From: Jörg 'Yadgar' Bleimann
Date: 25 Apr 2010 10:51:58
Message: <4bd4570e@news.povray.org>
High!

Today I tried to build a mesh2 from the 24-bit heightfield I recently 
generated from my original Ghurghusht isosurface (attached here)... 
after completing the eval_pigment() scan of the heightfield, POV-Ray 
crashed with an error message: "corrupted double-linked list" and a long
list of addresses...

Here is the relevant code:

#declare T_Ghurghusht=
texture
{
   pigment { color rgb <0.98, 0.85, 0.45> }
   finish { ambient 0.05 diffuse 1 brilliance 0.98 }
}

#if (tcm=0)
   #declare Ghurghusht =
     isosurface
     {
       function { Terrain_Function(x, y, z) }
       contained_by { sphere { 0, 1 } }
       max_gradient 5
       accuracy 0.0001
       double_illuminate
       texture { T_Ghurghusht }
       scale 5178
     }
#else
   #declare hf=
   pigment
   {
     image_map
     {
       png "tiles/ghurghusht360_n05_040.png"
     }
   }

   #declare sl=5124.6666;
   #declare rng=31.5519+6.2452;
   #declare ll=sl-6.2452;
   #declare long=40;
   #declare lat=5;

   #declare Ghurghusht =
   mesh2
   {
     vertex_vectors
     {
       1440000 // 1200 * 1200
       #declare a=0;
       #while (a<1200)
	#declare b=0;
	#while (b<1200)
	  #declare rd=eval_pigment(hf, <1/2400+b/1200, 2399/2400-a/1200, 0>).red;
	  #declare gr=eval_pigment(hf, <1/2400+b/1200, 2399/2400-a/1200, 
0>).green/256;
	  #declare bl=eval_pigment(hf, <1/2400+b/1200, 2399/2400-a/1200, 
0>).blue/65536;
	 
(ll+(rd+gr+bl)*rng)*<sin(radians(-long-(10/3)*(1/2400+b/1200)))*cos(radians(lat-(10/3)*(1/2400+a/1200))),

sin(radians(lat-(10/3)*(1/2400+a/1200))), 
cos(radians(-long-(10/3)*(1/2400+b/1200)))*cos(radians(lat-(10/3)*(1/2400+a/1200)))>
	  #declare b=b+1;
	#end
	#warning concat("Assigning vectors for line ", str(a, 4, 0))
	#declare a=a+1;
       #end
     }
     face_indices
     {
       2875202 // 1199 * 1199 * 2
       #declare a = 0;
       #while (a < 1199)
	#declare b = 0;
	#while (b < 1199)
	  <1200*a + b, 1200*a + b+1, 1200*(a+1) + b>,
	  <1200*a + b+1, 1200*(a+1) + b+1, 1200*(a+1) + b>
	  #if(b<(l-2))
	    ,
	  #end
	  #declare b = b+1;
	#end
	#warning concat("Parsing lines ", str(a, 4, 0), " and ", str(a+1, 4, 
0),".")
	#declare a = a+1;
       #end
     }
     texture { T_Ghurghusht }
   }
#end

// end of code

Why?

See you in Khyberspace!

Yadgar

Now playing: I've Seen All Good People (Yes)


Post a reply to this message


Attachments:
Download 'ghurghusht360_n05_040.png' (3431 KB)

Preview of image 'ghurghusht360_n05_040.png'
ghurghusht360_n05_040.png


 

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