|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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'
Preview of image '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'
Preview of image '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'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
just some shade trees and an oasis, maybe a waterfall or two, one might have
something .... :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi(gh)!
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|