POV-Ray : Newsgroups : povray.advanced-users : Editing or creating an image or heightfield in POV-Ray Server Time
10 Dec 2024 19:43:34 EST (-0500)
  Editing or creating an image or heightfield in POV-Ray (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: ingo
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 13 Sep 2023 07:50:00
Message: <web.6501a08f5742124017bac71e8ffb8ce3@news.povray.org>
"ingo" <nomail@nomail> wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> > Could we somehow achieve something similar using functions in POV-Ray,
> > without the help of isosurfaces? That would be my question.
> >
>
> Create hight-fields using functions. Then rotate the one with the 'lines' and
> intersect it with the one with the horizontal landscape.
>
> ingo

simple quick example of HF intersection (the Mount2.png is in the 3.7
distribution):

---%<------%<------%<---
// PoVRay 3.7 Scene File " hf_intersection.pov"
// author:  ingo
// date:    2023-09-13
//--------------------------------------------------------------------------
#version 3.7;
global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.9 }}

camera {
  perspective angle 75               // front view
  location  <0.0 , 4.0 ,-10.0>
  right     x*image_width/image_height
  look_at   <0.0 , 1.0 , 0.0>
}

light_source{< 3000,3000,-3000> rgb 1}

sky_sphere {
  pigment {
    gradient <0,1,0>
    color_map {
      [0.00 rgb <0.6,0.7,1.0>]
      [0.35 rgb <0.1,0.0,0.8>]
      [0.65 rgb <0.1,0.0,0.8>]
      [1.00 rgb <0.6,0.7,1.0>]
    }
    scale 2
  }
}


#declare Rock = height_field{
  png "Mount2.png" smooth double_illuminate
  translate<-0.5,-0.0,-0.5>
  scale<9, 2.5, 9>*2
  texture{
    pigment { color rgb <0.82,0.6,0.4>}
  }
  rotate<0,-110,0>
  translate<1,0,11>
}

intersection{

  object{Rock}

  object {
    Rock
    scale 1.5
    rotate <-33,0,-90>
    translate <-4,-1,0>
  }

  object {
    Rock
    rotate <0,0,90>
  }


---%<------%<------%<---

ingo


Post a reply to this message

From: Thomas de Groot
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 13 Sep 2023 11:03:31
Message: <6501cf43$1@news.povray.org>
Op 13-9-2023 om 13:45 schreef ingo:
> 
> simple quick example of HF intersection (the Mount2.png is in the 3.7
> distribution):
> 
> ---%<------%<------%<---
> // PoVRay 3.7 Scene File " hf_intersection.pov"
> // author:  ingo
> // date:    2023-09-13
> //--------------------------------------------------------------------------
> #version 3.7;
> global_settings{ assumed_gamma 1.0 }
> #default{ finish{ ambient 0.1 diffuse 0.9 }}
> 
> camera {
>    perspective angle 75               // front view
>    location  <0.0 , 4.0 ,-10.0>
>    right     x*image_width/image_height
>    look_at   <0.0 , 1.0 , 0.0>
> }
> 
> light_source{< 3000,3000,-3000> rgb 1}
> 
> sky_sphere {
>    pigment {
>      gradient <0,1,0>
>      color_map {
>        [0.00 rgb <0.6,0.7,1.0>]
>        [0.35 rgb <0.1,0.0,0.8>]
>        [0.65 rgb <0.1,0.0,0.8>]
>        [1.00 rgb <0.6,0.7,1.0>]
>      }
>      scale 2
>    }
> }
> 
> 
> #declare Rock = height_field{
>    png "Mount2.png" smooth double_illuminate
>    translate<-0.5,-0.0,-0.5>
>    scale<9, 2.5, 9>*2
>    texture{
>      pigment { color rgb <0.82,0.6,0.4>}
>    }
>    rotate<0,-110,0>
>    translate<1,0,11>
> }
> 
> intersection{
> 
>    object{Rock}
> 
>    object {
>      Rock
>      scale 1.5
>      rotate <-33,0,-90>
>      translate <-4,-1,0>
>    }
> 
>    object {
>      Rock
>      rotate <0,0,90>
>    }
> 
> 
> ---%<------%<------%<---
> 
> ingo
> 
> 

Right! I had been briefly wondering about something like this, but 
thought it would not really do. However, your example makes me think 
again more seriously. I need to think some more and - above all - play. 
Potential solutions are certainly there indeed.

Thanks for the pointer, Ingo!

-- 
Thomas


Post a reply to this message

From: ingo
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 13 Sep 2023 13:35:00
Message: <web.6501f2555742124017bac71e8ffb8ce3@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> Thanks for the pointer, Ingo!
>

Here's an other version, using a patter function for the structure. First a
union{hf box} then the intersection.

An other option, if you want to shape an island, in the insert menu/special
shapes/meshmaker.inc/p_cylinder_crackle2 shows how to do displacement of mesh
vertices. This in principle works for all things one can make with the mesh
macros. You could extrude the island shape and then deform the mesh or build the
island shape with multiple splines.

---%<------%<------%<---

// PoVRay 3.7 Scene File " hf_intersection_2.pov"
// author:  ingo
// date:    2023-09-13
//--------------------------------------------------------------------------

#version 3.7;
global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.7 }}

camera {
  perspective angle 5               // front view
  location  <20.0 , 0.0 ,-40.0>
  right     x*image_width/image_height
  look_at   <0.0 , 0.0 , 0.0>
}

light_source{< 3000, 3000,-6000> rgb 1}

sky_sphere {
  pigment {
    gradient <0,1,0>
    color_map {
      [0.00 rgb <0.6,0.7,1.0>]
      [0.35 rgb <0.1,0.0,0.8>]
      [0.65 rgb <0.1,0.0,0.8>]
      [1.00 rgb <0.6,0.7,1.0>]
    }
    scale 2
  }
}


#declare Rock = union {
  intersection{
    height_field {
      function 1000,1000 {
        pattern {
          gradient -y
          scale .1
          turbulence 0.7
          octaves 12
          lambda 1.5
          omega 0.3
        }
      }
    }
    box{0,1.001}
    scale <1,0.05,1>
  }
  box{<0,0,0>,<1,-1,1>}
  translate <-0.5,0.5,-0.5>
}

intersection{
  object{
    Rock
    translate <0,-0.1,0>
    pigment{rgb 1}
  }

  object{
    Rock
    rotate <-90,0,0>
    translate <0,0,0.1>
    pigment{rgb 1}
  }

  object{
    Rock
    rotate <90,90,0>
    translate <-0.1,0,0>
    pigment{rgb 1}
  }

  rotate <-45,0,0>
}

---%<------%<------%<---

You can modify the patterns in the HF_function with the functions in
https://ingoogni.nl/download/Gradients.zip


ingo


Post a reply to this message

From: Bald Eagle
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 13 Sep 2023 13:40:00
Message: <web.6501f2c5574212401f9dae3025979125@news.povray.org>
I think that if you did something like make a brick wall out of mesh blocks, in
the manner of building a wood floor, then you could "erode" the faces ad
abutting edges of all the blocks according to hardness assigned by a noise
function, and you could vary the height of the lateral strata, and govern the
shape of the protruding layer by using something like an x=pow(y, N) type
function that gets more square with higher powers (superellipsoid).

For that matter, you could even try just stacking superellipsoids to see how
that works.

Building the cliff with individual blocks would allow you to govern the size and
width of each piece, and allow indexing of any individual block.  You could also
remove or fracture out the majority of an individual block.

Also, going with the heightfield thing, you could just use a base heightfield
image for the basic clock, and then perturb it with a noise function, but rotate
it on its side, and scale it be a "block".

- BW


Post a reply to this message

From: Bald Eagle
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 13 Sep 2023 16:05:00
Message: <web.650214eb574212401f9dae3025979125@news.povray.org>
So, this is just boxes with a granite texture, nothing fancy yet.


Post a reply to this message


Attachments:
Download 'rockcliff.png' (746 KB)

Preview of image 'rockcliff.png'
rockcliff.png


 

From: Thomas de Groot
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 14 Sep 2023 02:35:18
Message: <6502a9a6$1@news.povray.org>
Op 13/09/2023 om 19:33 schreef ingo:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> 
>> Thanks for the pointer, Ingo!
>>
> 
> Here's an other version, using a patter function for the structure. First a
> union{hf box} then the intersection.
> 
> An other option, if you want to shape an island, in the insert menu/special
> shapes/meshmaker.inc/p_cylinder_crackle2 shows how to do displacement of mesh
> vertices. This in principle works for all things one can make with the mesh
> macros. You could extrude the island shape and then deform the mesh or build the
> island shape with multiple splines.
> 
> ---%<------%<------%<---
> 
> // PoVRay 3.7 Scene File " hf_intersection_2.pov"
> // author:  ingo
> // date:    2023-09-13
> //--------------------------------------------------------------------------
> 
> #version 3.7;
> global_settings{ assumed_gamma 1.0 }
> #default{ finish{ ambient 0.1 diffuse 0.7 }}
> 
> camera {
>    perspective angle 5               // front view
>    location  <20.0 , 0.0 ,-40.0>
>    right     x*image_width/image_height
>    look_at   <0.0 , 0.0 , 0.0>
> }
> 
> light_source{< 3000, 3000,-6000> rgb 1}
> 
> sky_sphere {
>    pigment {
>      gradient <0,1,0>
>      color_map {
>        [0.00 rgb <0.6,0.7,1.0>]
>        [0.35 rgb <0.1,0.0,0.8>]
>        [0.65 rgb <0.1,0.0,0.8>]
>        [1.00 rgb <0.6,0.7,1.0>]
>      }
>      scale 2
>    }
> }
> 
> 
> #declare Rock = union {
>    intersection{
>      height_field {
>        function 1000,1000 {
>          pattern {
>            gradient -y
>            scale .1
>            turbulence 0.7
>            octaves 12
>            lambda 1.5
>            omega 0.3
>          }
>        }
>      }
>      box{0,1.001}
>      scale <1,0.05,1>
>    }
>    box{<0,0,0>,<1,-1,1>}
>    translate <-0.5,0.5,-0.5>
> }
> 
> intersection{
>    object{
>      Rock
>      translate <0,-0.1,0>
>      pigment{rgb 1}
>    }
> 
>    object{
>      Rock
>      rotate <-90,0,0>
>      translate <0,0,0.1>
>      pigment{rgb 1}
>    }
> 
>    object{
>      Rock
>      rotate <90,90,0>
>      translate <-0.1,0,0>
>      pigment{rgb 1}
>    }
> 
>    rotate <-45,0,0>
> }
> 
> ---%<------%<------%<---
> 
> You can modify the patterns in the HF_function with the functions in
> https://ingoogni.nl/download/Gradients.zip
> 
> 
> ingo
> 
Thanks for all this ingo, very much appreciated indeed. I need to review 
all this at leisure.

I used displacement mapping a couple of years ago for stoneworks, using 
Poseray:

https://news.povray.org/povray.binaries.images/thread/%3C60e02637%40news.povray.org%3E/

And (I think) I tackled Meshmaker too somewhere/-time in a similar 
manner. I really /need/ to delve deeper in my archives (and my hazy 
memory).... :-/

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 14 Sep 2023 02:42:02
Message: <6502ab3a@news.povray.org>
Op 13/09/2023 om 22:00 schreef Bald Eagle:
> So, this is just boxes with a granite texture, nothing fancy yet.

Yes indeed. Thanks Bill. My main problem at the moment is that I have so 
little time to do some significant experiments, and I fail to come 
across those things I did already in the past on this very same chapter. 
Patience! I shall tackle all this asap and see where it brings me; there 
are a couple of ideas you and ingo have reawakened that I want to pursue.

-- 
Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 14 Sep 2023 06:50:00
Message: <web.6502e530574212401f9dae3025979125@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> Yes indeed. Thanks Bill. My main problem at the moment is that I have so
> little time to do some significant experiments, and I fail to come
> across those things I did already in the past on this very same chapter.

That is indeed the ebb and flow of what we do here.
A long, prolonged and eerie silence, followed by a sudden flurry of frenetic
activity.


> Patience! I shall tackle all this asap and see where it brings me; there
> are a couple of ideas you and ingo have reawakened that I want to pursue.


Excellent.
Here's another one where I just rendered the faces of the boxes as meshes and
added in a function to give some tectonic sqooshing of the lateral layers of the
strata.

Very quick, buggy early morning WIP.


Post a reply to this message


Attachments:
Download 'rockcliff.png' (744 KB)

Preview of image 'rockcliff.png'
rockcliff.png


 

From: Thomas de Groot
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 14 Sep 2023 08:57:08
Message: <65030324$1@news.povray.org>
Op 14-9-2023 om 12:49 schreef Bald Eagle:
> Excellent.
> Here's another one where I just rendered the faces of the boxes as meshes and
> added in a function to give some tectonic sqooshing of the lateral layers of the
> strata.
> 
> Very quick, buggy early morning WIP.

For a quick buggy, it is a ride I would not have missed! ;-)

Very good indeed; it is development full of promises.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Editing or creating an image or heightfield in POV-Ray
Date: 14 Sep 2023 09:04:02
Message: <650304c2@news.povray.org>
Op 13-9-2023 om 19:33 schreef ingo:
> An other option, if you want to shape an island, in the insert menu/special
> shapes/meshmaker.inc/p_cylinder_crackle2 shows how to do displacement of mesh
> vertices. This in principle works for all things one can make with the mesh
> macros. You could extrude the island shape and then deform the mesh or build the
> island shape with multiple splines.
> 

I correctly remembered I had played some with meshmaker. I used in the 
example included, a granite pattern, heavily scaled up in the horizontal 
directions. Not a sedimentary pattern but I see where to go from here.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'ij_displacementmapping_meshmaker_test.png' (134 KB)

Preview of image 'ij_displacementmapping_meshmaker_test.png'
ij_displacementmapping_meshmaker_test.png


 

<<< Previous 10 Messages Goto Initial 10 Messages

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