POV-Ray : Newsgroups : povray.binaries.images : Problem with mesh2 building - memory crash! Server Time
13 Nov 2024 22:27:23 EST (-0500)
  Problem with mesh2 building - memory crash! (Message 1 to 4 of 4)  
From: Jörg 'Yadgar' Bleimann
Subject: Problem with mesh2 building - memory crash!
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


 

From: Alain
Subject: Re: Problem with mesh2 building - memory crash!
Date: 25 Apr 2010 15:00:41
Message: <4bd49159$1@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...
>

Personaly, I'd use that image directly as a hight_field.


Alain


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Problem with mesh2 building - memory crash!
Date: 25 Apr 2010 16:27:37
Message: <4bd4a5b9$1@news.povray.org>
High!

Alain wrote:

> Personaly, I'd use that image directly as a hight_field.

Is POV-Ray nowadays able to use 24-bit heightfields? I never heard of 
that...

But even if it would be possible, it will probably be of no use to me, 
as my terrain relief should follow the curvature of the planet's surface!

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Ray Gardener
Subject: Re: Problem with mesh2 building - memory crash!
Date: 26 Apr 2010 22:29:36
Message: <4bd64c10@news.povray.org>
You should do an optimization of the mesh before using in POV-Ray. This 
will also let you bend the mesh to do curvature, since you're getting a 
mesh as a result whose vertices you can move.

Ray


Post a reply to this message

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