POV-Ray : Newsgroups : povray.general : Interlocking Heightfields. Server Time
27 Nov 2024 16:32:29 EST (-0500)
  Interlocking Heightfields. (Message 1 to 10 of 33)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Stephen
Subject: Interlocking Heightfields.
Date: 11 May 2008 15:02:07
Message: <nkge24ll63d2pdoe3qr8kvg29bgf79sf63@4ax.com>
Can anyone advise me on how to create a patchwork of heightfields
where the edges match up? It is for a landscape and I've spent a
couple of days trying to no avail.
-- 

Regards
     Stephen


Post a reply to this message

From: Ger
Subject: Re: Interlocking Heightfields.
Date: 11 May 2008 15:23:28
Message: <482747b0@news.povray.org>
Stephen wrote:

> Can anyone advise me on how to create a patchwork of heightfields
> where the edges match up? It is for a landscape and I've spent a
> couple of days trying to no avail.

The easiest way is to create a very big heightfield and cut it up into
sections.

-- 
Ger


Post a reply to this message

From: Stephen
Subject: Re: Interlocking Heightfields.
Date: 11 May 2008 16:08:25
Message: <ogke24lr1u94rbvq3j0adc1bcnse32fk5a@4ax.com>
On Sun, 11 May 2008 14:23:28 -0500, Ger <No.### [at] ThankYou> wrote:

>Stephen wrote:
>
>> Can anyone advise me on how to create a patchwork of heightfields
>> where the edges match up? It is for a landscape and I've spent a
>> couple of days trying to no avail.
>
>The easiest way is to create a very big heightfield and cut it up into
>sections.

That's true Ger, but not very elegant :)

I want to make the final heightfield "L" or "U" shaped and don't know
how far it needs to extend back from the gap. I also want to texture
it with Rune's Grass texture macro so I don't want any mismatches.
Thanks for the suggestion
-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Interlocking Heightfields.
Date: 12 May 2008 03:33:47
Message: <4827f2db$1@news.povray.org>
"Stephen" <mcavoysAT@aolDOTcom> schreef in bericht 
news:ogke24lr1u94rbvq3j0adc1bcnse32fk5a@4ax.com...
>
> I want to make the final heightfield "L" or "U" shaped and don't know
> how far it needs to extend back from the gap. I also want to texture
> it with Rune's Grass texture macro so I don't want any mismatches.
> Thanks for the suggestion
> -- 

What I have done sometimes, and if some repetition is not too obvious in the 
final image, is to mirror a height_field along x or z (or both, according to 
need). The seam is absolutely invisible.

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Interlocking Heightfields.
Date: 12 May 2008 03:44:56
Message: <4827f578$1@news.povray.org>
"Thomas de Groot" <t.d### [at] internlDOTnet> schreef in bericht 
news:4827f2db$1@news.povray.org...
>
>
> What I have done sometimes, and if some repetition is not too obvious in 
> the final image, is to mirror a height_field along x or z (or both, 
> according to need). The seam is absolutely invisible.
>

Forgot to mention the following possibility (if you use programs like 
Leveller, World Machine, GeoControl, or whatever):
1) make a height_field
2) duplicate it
3) mirror the duplicate along x or z (or both)
4) modify the central parts of the duplicate, leaving the edges unchanged 
(very important, obviously)
5) tile the original height_field and the duplicate(s)

Thomas


Post a reply to this message

From: Stephen
Subject: Re: Interlocking Heightfields.
Date: 12 May 2008 04:08:09
Message: <imuf24dlh7v0k244h0bbbp5el1a9em5ajn@4ax.com>
On Mon, 12 May 2008 09:33:47 +0200, "Thomas de Groot"
<t.d### [at] internlDOTnet> wrote:

>
>What I have done sometimes, and if some repetition is not too obvious in the 
>final image, is to mirror a height_field along x or z (or both, according to 
>need). The seam is absolutely invisible.

That was my second thought Thomas but my scripting skills are somewhat
lacking. I am using a #while loop and the mirrored HF are displaced.
In the morning (with a clearer head I might be able to do it properly
using a local transformation. My first thought was to use a function
like:
   height_field {
      function 100, 100 {pattern {spotted scale 0.3 rotate -90*x}}
smooth
      scale <30,5,30>
   }

Which should define a height field in 3D space but I cannot find
enough information in the documentation to enable me to do it
properly. Again poor scripting skills. Alas alack, the curse of using
a modeller :-(
-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: Interlocking Heightfields.
Date: 12 May 2008 04:12:24
Message: <euuf2453aph6vptakbgqion871uop41lhb@4ax.com>
On Mon, 12 May 2008 09:44:56 +0200, "Thomas de Groot"
<t.d### [at] internlDOTnet> wrote:

>Forgot to mention the following possibility (if you use programs like 
>Leveller, World Machine, GeoControl, or whatever):

Ah! Time constraints I've spent too long modelling a bridge and I need
to spend a lot of time in Poser. So I tried Teragen but could not
create anything acceptable. 

Thanks for the ideas.
-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Interlocking Heightfields.
Date: 12 May 2008 08:03:06
Message: <482831fa$1@news.povray.org>
"Stephen" <mcavoysAT@aolDOTcom> schreef in bericht 
news:imuf24dlh7v0k244h0bbbp5el1a9em5ajn@4ax.com...
>
> That was my second thought Thomas but my scripting skills are somewhat
> lacking. I am using a #while loop and the mirrored HF are displaced.
> In the morning (with a clearer head I might be able to do it properly
> using a local transformation. My first thought was to use a function
> like:
>   height_field {
>      function 100, 100 {pattern {spotted scale 0.3 rotate -90*x}}
> smooth
>      scale <30,5,30>
>   }
>
I just finished my Bridge entry, so I have time to spare :-)
I shall have a look at this and report back.

> ...... Alas alack, the curse of using
> a modeller :-(

LOL. I know what you mean :-)

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Interlocking Heightfields.
Date: 12 May 2008 08:24:56
Message: <48283718$1@news.povray.org>
Hmmm... Here is a solution. However, there is a problem I had not foreseen. 
While the joining edges are perflectly parallel to each other, the adjoining 
surfaces make a sharp angle in some places. I wonder how to solve that...

Here is a little bit of code:

#declare HF01 =
height_field {
  function 100, 100 {pattern {spotted scale 0.3 rotate -90*x}}
  smooth
  translate <-0.5,-0.5,-0.5>
  scale <30,5,30>
}

#declare HF02 =
object {HF01
  scale <1,1,-1>
  translate 30*z
}

#declare HF03 =
object {HF01
  scale <-1,1,1>
  translate 30*x
}

union {
  object {HF01 pigment {Red}}
  object {HF02 pigment {Green}}
  object {HF03 pigment {Yellow}}
  translate -15*x
}


Post a reply to this message

From: Stephen
Subject: Re: Interlocking Heightfields.
Date: 12 May 2008 09:18:30
Message: <vlgg24d2uho0olc8us6unf682kdm9nooh7@4ax.com>
On Mon, 12 May 2008 14:24:56 +0200, "Thomas de Groot"
<t.d### [at] internlDOTnet> wrote:

>Hmmm... Here is a solution. However, there is a problem I had not foreseen. 
>While the joining edges are perflectly parallel to each other, the adjoining 
>surfaces make a sharp angle in some places. I wonder how to solve that...
>
>Here is a little bit of code:

Thanks Thomas, on cleaning up my code (below) I found your problem.
But I also discovered that I don't understand the "function", function
:) 

#version 3.6;

background { color rgb <0.000,0.000,0.000> }    

   global_settings {noise_generator 3}


//*****************************************************************************
// referenced scene items and forced visible scene items declaration
begin
//*****************************************************************************

#declare Shadow_Clouds_Bot =
pigment {
  bozo
  color_map {
    [0.000 rgbft <0.850,0.850,0.850,0.000,0.000>]
    [0.100 rgbft <0.750,0.750,0.750,0.000,0.000>]
    [0.500 rgbft <1.000,1.000,1.000,0.000,1.000>]
  }

  rotate    <0.0,0.0,90.000>
  rotate    <180.000,0.0,0.0>
  scale     <1.000,6.000,6.000>
  rotate    <-180.000,0.000,-90.000>
  translate <0.000,-0.150,0.000>
  turbulence <0.650,0.650,0.650>
  octaves 6
  lambda 2.000
  omega 0.700
}

#declare Shadow_Clouds_Top =
pigment {
  color rgbft <0.196,0.600,0.800,0.000,0.000>
}

#declare Shadow_Clouds_Mid =
pigment {
  bozo
  color_map {
    [0.000 rgbft <0.850,0.850,0.850,0.000,0.000>]
    [0.100 rgbft <0.750,0.750,0.750,0.000,0.000>]
    [0.500 rgbft <1.000,1.000,1.000,0.000,1.000>]
  }

  rotate    <0.0,0.0,90.000>
  rotate    <180.000,0.0,0.0>
  scale     <1.000,6.000,6.000>
  rotate    <-180.000,0.000,-90.000>
  turbulence <0.650,0.650,0.650>
  octaves 6
  lambda 2.000
  omega 0.700
}

#declare SMcA_White0 =
texture {
  pigment {
    color rgbft <1.000,1.000,1.000,0.000,0.000>
  }

  finish {
    ambient     rgb <0.100,0.100,0.100>
    brilliance  1.000
    crand       0.000
    diffuse     0.600
    metallic    0.000
    phong       0.000
    phong_size  40.000
    specular    0.000
    roughness   0.050
  }

}

#declare SMcA_Green0 =
texture {
  pigment {
    color rgbft <0.2000,0.5000,0.2000,0.000,0.000>
  }

  finish {
    ambient     rgb <0.0100,01.100,0.0100>
    brilliance  0.5000
    crand       0.000
    diffuse     0.600
    metallic    0.000
    phong       0.000
    phong_size  40.000
    specular    0.000
    roughness   0.50
  }

}


////////////////////////////////////////////////////////////////////


#declare ColT=3;

#declare RowT=3;


#declare Col=1;

#while (Col<=ColT)

        #declare Row=1;

                #declare X_Scaler =select(mod(Col, 2), 1, 0, 1)  ;  //
Odd or even Col

        #while (Row<=RowT)

                #declare Z_Scaler =select(mod(Row, 2), 1, 0, 1)  ; //
Odd or even Row

           #declare HF =
   height_field { 
     
      function 100, 100  {pattern {spotted scale 0.25  rotate -90*x }}
smooth
       translate <-0.5,0,-0.5>
       scale <25,5,25>
   
        #if (X_Scaler = 0)   
        #debug concat( "Col X_Scaler: ",str(X_Scaler,5,0),"\n")

                #if (Z_Scaler = 0)  
                        #debug concat( "Row Z_Scaler:
",str(X_Scaler,5,0),"\n")
                        
                        scale <-1,1,-1> 
                                #else
                                scale <-1,1,1>
                        #end           
                
                #else  
                
                #debug concat( "Col X_Scaler:
",str(X_Scaler,5,0),"\n")
                
                #if (Z_Scaler = 0)    
                        #debug concat( "Row Z_Scaler:
",str(X_Scaler,5,0),"\n")
                        scale <1,1,-1> 
                                #else
                                scale <1,1,1>
                                #end     
                       
                        #end       
                        
      translate <-25*Col,0,-25*Row>



   }
        object { HF

         texture{ SMcA_Green0 }


        }

        #declare Row=Row+1;

        #end

        #declare Col=Col+1;

#debug concat( "X_Scaler is: ",str(X_Scaler,5,0),"\n")
#end



///////////////////////////////////////////////////////////////////////



#declare Camera0 =
camera {
  perspective
  location <-50.000,300.000,-70.000>
  up y
  right 1.333*x
  angle 50.000
  sky <0,1,00>
  look_at < 0,0,-70 >
}


//*****************************************************************************
// referenced scene items and forced visible scene items declaration
end
//*****************************************************************************

light_source {  // Light_Source1
  < 50, 0.000000, -50 >, color rgb <1.000,1.000,1.000>
  fade_power 0.000
  fade_distance 100.000
  media_attenuation off
  media_interaction on
  translate <21.797291,33.663000,-0.606643>
}
sky_sphere {  // SkySphere1
  pigment{ Shadow_Clouds_Top }
  pigment{ Shadow_Clouds_Mid }
  pigment{ Shadow_Clouds_Bot }

}



plane {  // Plane1
  y , -1
  texture{ SMcA_White0 }
}

camera{ Camera0 }
-- 

Regards
     Stephen


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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