POV-Ray : Newsgroups : povray.binaries.images : POVghanistan Revisited! Server Time: 15 Dec 2019 21:01:30 GMT
  POVghanistan Revisited! (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Jörg "Yadgar" Bleimann
Subject: POVghanistan Revisited!
Date: 23 Nov 2019 21:17:59
Message: <5dd9a207@news.povray.org>
Hi(gh)!

After having been inspired by Vahur Krouverk's ancient grass script to 
once more take up the Khyberspace project after a six-year lull, I soon 
had to realize that Kabul, even Kabul in the 1970s, is much better 
documented on the Internet than Herat. So I dug out my ASTER-based 
GeoTIFF tiles, more precisely, the PNG conversions I made from them back 
then and started to render Kabul basin vistas once more.

Back in 2013 and still with POV-Ray 3.6, I had to lower the elevation 
data tiles' original resolution (3600 by 3600) to 2600 by 2600 measuring 
points per square degree to get the mesh generated at all...
I supposed that the internal treatment of mesh2 data (ASCII rather than 
binary) in POV-Ray 3.6 was responsible for this, so I almost started to 
rewrite the relevant sections in the source code...

Obviously, this has been fixed with 3.7, for now rendering works 
flawlessly even with the original data resolution! Or is it just because 
of my recent RAM upgrade from 16 to 24 GiB?

And, yes, pre-generating the terrain mesh speeds up things dramatically: 
from about 1 hour 40 minutes (when calculating the mesh2 together with 
the rendering proper) to a mere 12 minutes!

I also think it's time to change the general concept of Khyberspace: as 
cartographic data for Afghanistan in the early 1970s are pretty coarse, 
I now prefer to start with present-day Afghanistan (minus the war), 
blending past, present and even future ("Afghatopia") together, creating 
something entirely new!

So I started once more rendering some vistas in and around Kabul, three 
of them attached here... but this time, I wonder that my old recipe 
against dot artifacts which I looked up in a posting from July 2013 
(defining the mesh2 vertices close to the origin and moving the whole 
mesh2 afterwards) does work with 3.7 only when I do the generating of 
the mesh2 within the rendering proper (the time-consuming way as 
described here further up), not anymore with a pre-generated mesh2! How 
can I fix this?

The first of the attached images has been calculated this way, the other 
ones with a pre-generated mesh2 and thus contain those weird dots...

See you in Khyberspace!

Yadgar


Post a reply to this message


Attachments:
Download '2019-11-23 view over kabul and shomali plain from south, take 2 - full mesh2 resolution.jpg' (80 KB)
Download '2019-11-23 view from kabul international airport towards bibi mahru hill and koh-e asmai, take 2 - full mesh2 resolution' (41 KB)
Download '2019-11-23 paghman range from east-southeast, take 2 - full mesh2 resolution.jpg' (108 KB)
Download '2019-11-23 koh-e safi from southwest, take 2 - full mesh2 resolution.jpg' (66 KB)
Download '2019-11-23 approaching kabul international airport from east, take 2 - full mesh2 resolution.jpg' (88 KB)

Preview of image '2019-11-23 view over kabul and shomali plain from south, take 2 - full mesh2 resolution.jpg'
2019-11-23 view over kabul and shomali plain from south, take 2 - full mesh2 resolution.jpg

Preview of image '2019-11-23 view from kabul international airport towards bibi mahru hill and koh-e asmai, take 2 - full mesh2 resolution'
2019-11-23 view from kabul international airport towards bibi mahru hill and koh-e asmai, take 2 - full mesh2 resolution

Preview of image '2019-11-23 paghman range from east-southeast, take 2 - full mesh2 resolution.jpg'
2019-11-23 paghman range from east-southeast, take 2 - full mesh2 resolution.jpg

Preview of image '2019-11-23 koh-e safi from southwest, take 2 - full mesh2 resolution.jpg'
2019-11-23 koh-e safi from southwest, take 2 - full mesh2 resolution.jpg

Preview of image '2019-11-23 approaching kabul international airport from east, take 2 - full mesh2 resolution.jpg'
2019-11-23 approaching kabul international airport from east, take 2 - full mesh2 resolution.jpg


 

From: Melody
Subject: Re: POVghanistan Revisited!
Date: 24 Nov 2019 05:25:01
Message: <web.5dda13c36fbb8a6f9da690110@news.povray.org>
I suppose you have the digital elevation model, I wouldn't know by looking.
https://pubs.er.usgs.gov/publication/ds130
dem2pov.exe exists, but you probably knew that.

render on


Post a reply to this message

From: Melody
Subject: Re: POVghanistan Revisited!
Date: 24 Nov 2019 05:35:00
Message: <web.5dda15c46fbb8a6f9da690110@news.povray.org>
just some shade trees and an oasis, maybe a waterfall or two, one might have
something .... :)


Post a reply to this message

From: Thomas de Groot
Subject: Re: POVghanistan Revisited!
Date: 24 Nov 2019 07:33:19
Message: <5dda323f@news.povray.org>
Op 23/11/2019 om 22:18 schreef Jörg "Yadgar" Bleimann:
> Hi(gh)!
> 
[snip]

> So I started once more rendering some vistas in and around Kabul, three 
> of them attached here... but this time, I wonder that my old recipe 
> against dot artifacts which I looked up in a posting from July 2013 
> (defining the mesh2 vertices close to the origin and moving the whole 
> mesh2 afterwards) does work with 3.7 only when I do the generating of 
> the mesh2 within the rendering proper (the time-consuming way as 
> described here further up), not anymore with a pre-generated mesh2! How 
> can I fix this?
> 
> The first of the attached images has been calculated this way, the other 
> ones with a pre-generated mesh2 and thus contain those weird dots...
> 

I shouldn't be too concerned about the dots presently. As Melody also 
suggests, once you add objects to the scene, especially in the 
foreground, the dots will become invisible or at least inconspicuous. 
The foreground texture(s) also will help. All that will be needed 
additionally to help hide the triangles of course.

-- 
Thomas


Post a reply to this message

From: Melody
Subject: Re: POVghanistan Revisited!
Date: 24 Nov 2019 10:25:01
Message: <web.5dda58a86fbb8a6f9da690110@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> I shouldn't be too concerned about the dots presently. As Melody also
> suggests, once you add objects to the scene, especially in the
> foreground, the dots will become invisible or at least inconspicuous.
> The foreground texture(s) also will help. All that will be needed
> additionally to help hide the triangles of course.
>
> --
> Thomas

calculate normals of each point, respective to all adjacent faces and use smooth
triangles, lines go bye bye. iterate verts and compare to each triangle face.


#macro normal_vector(A,B,C)
 #local result = vcross(C-B,A-B);
 result
 // 1
 // |
 // 2__ 3 vz points at you (neg) unless reverse y like pov, then
 //
 // 2__ 3
 // |
 // 1
#end

#macro FastNorms77(sw)
  // set norms based on ALL adjacent faces-lots of verts means lots of time
  #local i=0;
  #while (i<NumVertices)
    #local nrm = <0,0,0>;
    #local j = 0;
    #while (j<NumFaces)
      #if ((i = Face_Arr[j].x)|(i = Face_Arr[j].y)|(i = Face_Arr[j].z))
        #local norm =
normal_vector(V_vec_Arr[Face_Arr[j].x],V_vec_Arr[Face_Arr[j].y],V_vec_Arr[Face_Arr[j].z]);
        #local nrm = vnormalize(nrm+vnormalize(norm));
      #end
      #local j=j+1;
    #end // Faces
    #declare N_vec_Arr[i] = nrm;
    #local i=i+1;
    #if (sw)  // Progress on/off
        #if (mod(100*i/NumVertices,20)<0.1)
          #debug concat("Checking Normals  >
",str(int(100*i/NumVertices),5,1),"%\n")
       #end
    #end
  #end // Verts
#end


Post a reply to this message

From: Thomas de Groot
Subject: Re: POVghanistan Revisited!
Date: 24 Nov 2019 11:47:11
Message: <5dda6dbf$1@news.povray.org>
Op 24/11/2019 om 11:21 schreef Melody:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> 
>> I shouldn't be too concerned about the dots presently. As Melody also
>> suggests, once you add objects to the scene, especially in the
>> foreground, the dots will become invisible or at least inconspicuous.
>> The foreground texture(s) also will help. All that will be needed
>> additionally to help hide the triangles of course.
>>
>> --
>> Thomas
> 
> calculate normals of each point, respective to all adjacent faces and use smooth
> triangles, lines go bye bye. iterate verts and compare to each triangle face.
> 
> 
> #macro normal_vector(A,B,C)
>   #local result = vcross(C-B,A-B);
>   result
>   // 1
>   // |
>   // 2__ 3 vz points at you (neg) unless reverse y like pov, then
>   //
>   // 2__ 3
>   // |
>   // 1
> #end
> 
> #macro FastNorms77(sw)
>    // set norms based on ALL adjacent faces-lots of verts means lots of time
>    #local i=0;
>    #while (i<NumVertices)
>      #local nrm = <0,0,0>;
>      #local j = 0;
>      #while (j<NumFaces)
>        #if ((i = Face_Arr[j].x)|(i = Face_Arr[j].y)|(i = Face_Arr[j].z))
>          #local norm =
>
normal_vector(V_vec_Arr[Face_Arr[j].x],V_vec_Arr[Face_Arr[j].y],V_vec_Arr[Face_Arr[j].z]);
>          #local nrm = vnormalize(nrm+vnormalize(norm));
>        #end
>        #local j=j+1;
>      #end // Faces
>      #declare N_vec_Arr[i] = nrm;
>      #local i=i+1;
>      #if (sw)  // Progress on/off
>          #if (mod(100*i/NumVertices,20)<0.1)
>            #debug concat("Checking Normals  >
> ",str(int(100*i/NumVertices),5,1),"%\n")
>         #end
>      #end
>    #end // Verts
> #end
> 
> 
> 
> 
I think smooth triangles are already in use in this scene and lines 
appear because of the height_field size close to the camera. However, 
your macros are worth to be tried out here, I guess, to see if it 
improves the image.

-- 
Thomas


Post a reply to this message

From: Melody
Subject: Re: POVghanistan Revisited!
Date: 24 Nov 2019 12:10:00
Message: <web.5dda72b76fbb8a6f9da690110@news.povray.org>
the scene looks like a billion points,
so I would say isolate local points for mesh of smooth triangles.

I might have more ideas when I have time to look that this Grand Canyon DEM
used here. smooth smooth.

but height_field I recall seeing triangles, but there's a smoothing command?
I dont really remember exactly.


Post a reply to this message


Attachments:
Download 'rebel_snowspeeder.jpg' (103 KB)

Preview of image 'rebel_snowspeeder.jpg'
rebel_snowspeeder.jpg


 

From: Jörg "Yadgar" Bleimann
Subject: Re: POVghanistan Revisited!
Date: 24 Nov 2019 13:22:35
Message: <5dda841b$1@news.povray.org>
Hi(gh)!

On 24.11.19 12:47, Thomas de Groot wrote:

> I think smooth triangles are already in use in this scene

No, they are not... I will try Melody's macros, though its gonna be tough!

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: POVghanistan Revisited!
Date: 24 Nov 2019 23:53:23
Message: <5ddb17f3@news.povray.org>
Hi(gh)!

On 24.11.19 14:23, Jörg "Yadgar" Bleimann wrote:

> No, they are not... I will try Melody's macros, though its gonna be tough!

Perhaps too tough for me... I don't have the faintest clue how to 
integrate the output of these functions (i. e. N_vec_Arr[])! Where shall 
I invoke the macro - inside the mesh2 object?

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: POVghanistan Revisited!
Date: 25 Nov 2019 00:16:10
Message: <5ddb1d4a$1@news.povray.org>
Hi(gh)!

On 24.11.19 11:21, Melody wrote:
> 
> calculate normals of each point, respective to all adjacent faces and use smooth
> triangles, lines go bye bye. iterate verts and compare to each triangle face.
> 
> 
> #macro normal_vector(A,B,C)
>   #local result = vcross(C-B,A-B);
>   result
>   // 1
>   // |
>   // 2__ 3 vz points at you (neg) unless reverse y like pov, then
>   //
>   // 2__ 3
>   // |
>   // 1
> #end
> 
> #macro FastNorms77(sw)
>    // set norms based on ALL adjacent faces-lots of verts means lots of time
>    #local i=0;
>    #while (i<NumVertices)
>      #local nrm = <0,0,0>;
>      #local j = 0;
>      #while (j<NumFaces)
>        #if ((i = Face_Arr[j].x)|(i = Face_Arr[j].y)|(i = Face_Arr[j].z))
>          #local norm =
>
normal_vector(V_vec_Arr[Face_Arr[j].x],V_vec_Arr[Face_Arr[j].y],V_vec_Arr[Face_Arr[j].z]);
>          #local nrm = vnormalize(nrm+vnormalize(norm));
>        #end
>        #local j=j+1;
>      #end // Faces
>      #declare N_vec_Arr[i] = nrm;
>      #local i=i+1;
>      #if (sw)  // Progress on/off
>          #if (mod(100*i/NumVertices,20)<0.1)
>            #debug concat("Checking Normals  >
> ",str(int(100*i/NumVertices),5,1),"%\n")
>         #end
>      #end
>    #end // Verts
> #end
> 
> 
> 
> 

Where did you define Face_Arr and V_vec_Arr?

See you in Khyberspace!

Yadgar


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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