POV-Ray : Newsgroups : moray.win : Ingo's Make Mesh include with udo support Server Time
17 May 2024 22:43:23 EDT (-0400)
  Ingo's Make Mesh include with udo support (Message 1 to 8 of 8)  
From: StephenS
Subject: Ingo's Make Mesh include with udo support
Date: 29 Jan 2004 16:41:47
Message: <40197e1b@news.povray.org>
I have placed a modified makemesh.inc file temporarily on my website
http://www.ottawa.net/sshonfield/Moray%20resources.htm

There's also a short description of what to do with it.
I invite you to download the file and try it out.

If the changes are usefull (and error free) Ingo will concider including
them in the next update of the 'Meshmerizing Mesh Maker Macros package'

Please direct any comments about my changes (udo support) to me.

Stephen


Post a reply to this message

From: Steve Shelby
Subject: Re: Ingo's Make Mesh include with udo support
Date: 30 Jan 2004 09:11:25
Message: <401a660d@news.povray.org>
I tried it out for a while and it looks like it could be pretty useful. Will
it only work with objects that have a special include file written for them?
I would be interested in being able to convert a heightfield to a mesh.
Steve Shelby

"StephenS" <ssh### [at] ottawanet> wrote in message
news:40197e1b@news.povray.org...
> I have placed a modified makemesh.inc file temporarily on my website
> http://www.ottawa.net/sshonfield/Moray%20resources.htm
>
> There's also a short description of what to do with it.
> I invite you to download the file and try it out.
>
> If the changes are usefull (and error free) Ingo will concider including
> them in the next update of the 'Meshmerizing Mesh Maker Macros package'
>
> Please direct any comments about my changes (udo support) to me.
>
> Stephen
>
>
>
>


Post a reply to this message

From: ABX
Subject: Re: Ingo's Make Mesh include with udo support
Date: 30 Jan 2004 09:17:16
Message: <9mpk10d1d2v0cg7polcd2cbsvs05pnnbuu@4ax.com>
On Fri, 30 Jan 2004 09:11:22 -0500, "Steve Shelby" <ssh### [at] rexnetnet> wrote:
> convert a heightfield to a mesh.

This is possible with so called HF* macros in world of pure POV-Ray. Perhaps
somebody have to write plugin to them too.

ABX


Post a reply to this message

From: StephenS
Subject: Re: Ingo's Make Mesh include with udo support
Date: 30 Jan 2004 13:31:09
Message: <401aa2ed$1@news.povray.org>
> I tried it out for a while and it looks like it could be pretty useful.
> Will
> it only work with objects that have a special include file written for
> them?
From what I understand, Yes.

> I would be interested in being able to convert a heightfield to a mesh.
A regular heightfield can already be converted into a mesh. A heightfield
wrapped around a cylinder can be done.

For example:
Create a new file based on p_crackle_cylinder.pov demo scene.
Adding the function

#declare Name= function {
  pigment {
    image_map {
      png "blurred name.png"
       interpolate 2
    }
  scale <-2.5,-2.5,1>
  translate <.5,1,0>
  }
}

and changing the part of the function affecting the radius
from
Crack(u,v,0).gray
to
(Name(u,v,0).gray+10)/10 // scale to avoid divide by 0

'blurred name.png' is a file made in a paint program, simple text with a
blur effect applied.
Sample pictures at
http://www.ottawa.net/sshonfield/Gallery.htm

Stephen


Post a reply to this message

From: Steve Shelby
Subject: Re: Ingo's Make Mesh include with udo support
Date: 31 Jan 2004 08:06:45
Message: <401ba865@news.povray.org>
Thanks for the info. I played with that for a while using some of my own
heightfield images. Really cool! :^}>
Steve Shelby

"StephenS" <ssh### [at] ottawanet> wrote in message
news:401aa2ed$1@news.povray.org...
> A regular heightfield can already be converted into a mesh. A heightfield
> wrapped around a cylinder can be done.
>
> For example:
> Create a new file based on p_crackle_cylinder.pov demo scene.
> Adding the function
>
> #declare Name= function {
>   pigment {
>     image_map {
>       png "blurred name.png"
>        interpolate 2
>     }
>   scale <-2.5,-2.5,1>
>   translate <.5,1,0>
>   }
> }
>
> and changing the part of the function affecting the radius
> from
> Crack(u,v,0).gray
> to
> (Name(u,v,0).gray+10)/10 // scale to avoid divide by 0
>
> 'blurred name.png' is a file made in a paint program, simple text with a
> blur effect applied.
> Sample pictures at
> http://www.ottawa.net/sshonfield/Gallery.htm
>
> Stephen
>
>
>
>


Post a reply to this message

From: Steve Shelby
Subject: Re: Ingo's Make Mesh include with udo support
Date: 1 Feb 2004 10:11:52
Message: <401d1738@news.povray.org>
Stephen,
I experimented with a heightfield on a cylinder and a sphere with excellent
results, but what I'd really like to do is create a heightfield on a flat
surface, which can be converted to a mesh that can be manipulated in Moray.
I tried doing this with p_square.pov, but could not figure out the proper
coding. I need to have values for F1, F2, and F3, and I don't have a clue
what they should be. I tried different things and got some interesting
shapes, but nothing even in the same universe as what I was trying for. Do
you have any suggestions?
Steve Shelby

"StephenS" <ssh### [at] ottawanet> wrote in message
news:401aa2ed$1@news.povray.org...
> For example:
> Create a new file based on p_crackle_cylinder.pov demo scene.
> Adding the function
>
> #declare Name= function {
>   pigment {
>     image_map {
>       png "blurred name.png"
>        interpolate 2
>     }
>   scale <-2.5,-2.5,1>
>   translate <.5,1,0>
>   }
> }
>
> and changing the part of the function affecting the radius
> from
> Crack(u,v,0).gray
> to
> (Name(u,v,0).gray+10)/10 // scale to avoid divide by 0
>
> 'blurred name.png' is a file made in a paint program, simple text with a
> blur effect applied.
> Sample pictures at
> http://www.ottawa.net/sshonfield/Gallery.htm
>
> Stephen
>
>
>
>


Post a reply to this message

From: StephenS
Subject: Re: Ingo's Make Mesh include with udo support
Date: 1 Feb 2004 13:06:05
Message: <401d400d@news.povray.org>
> Stephen,
> I experimented with a heightfield on a cylinder and a sphere with
excellent
> results, but what I'd really like to do is create a heightfield on a flat
> surface, which can be converted to a mesh that can be manipulated in
Moray.
The regular heightfield object in Moray can be converted to a mesh. You can
use the step control (heightfield object) to help setup the number of
triangles used.

> I tried doing this with p_square.pov, but could not figure out the proper
> coding. I need to have values for F1, F2, and F3, and I don't have a clue
> what they should be. I tried different things and got some interesting
> shapes, but nothing even in the same universe as what I was trying for. Do
> you have any suggestions?
> Steve Shelby

Try this, based on p_square.pov
#declare Name= function {
  pigment {
    image_map {
      png "blurred name.png"
       interpolate 2
       once
    }
  #declare S= 2;
  scale <4*S,3*S,1>
  translate <-4,-3,0>
  }
}
#declare F1= function(u,v){u}
#declare F2= function(u,v){v}
#declare F3= function(u,v){Name(u,v,0).gray}

Some variations on using a name are:
#declare Mytextname=text{
   ttf "timrom.ttf" "Stephen" 1, .1*x
   scale<.24,.24,1>  // scale to fit from 0 to 1
   translate<.02,.5,-.1>}
#declare ob_Name= function {
  pigment{
    object {
      Mytextname
    }
  #declare S= 2;
  scale <4*S,3*S,1>
  translate <-4,-3,0>
  }
}
#declare F3= function(u,v){ob_Name(u,v,0).gray}

Or
#declare f_ob_Name= function {
  pigment {
    image_map {
      function 600,600 {
        pigment{
          object {
            Mytextname
          }
        }
      }
      once
      interpolate 2
    }
  #declare S= 2;
  scale <4*S,3*S,1>
  translate <-4,-3,0>
  }
}
#declare F3= function(u,v){f_ob_Name(u,v,0).gray}

Comments welcome

Stephen


Post a reply to this message

From: Steve Shelby
Subject: Re: Ingo's Make Mesh include with udo support
Date: 2 Feb 2004 09:17:05
Message: <401e5be1@news.povray.org>
"StephenS" <ssh### [at] ottawanet> wrote in message
news:401d400d@news.povray.org...
> The regular heightfield object in Moray can be converted to a mesh. You
can
> use the step control (heightfield object) to help setup the number of
> triangles used.

Thanks for the tip. I think I had decided that wouldn't work because I
didn't know about the step control trick, and it looked like it was simply
making a mesh cube shape.

> Try this, based on p_square.pov
>
<snip>
> Comments welcome
>
> Stephen

Here's what ultimately worked for me:

#declare Spikes=function{pigment {
    image_map{
    tga "C:\Documents and Settings\Administrator\My Documents\3D\spots1.tga"
    interpolate 2}

    }
    }

#declare S= function(u,v) {
  (Spikes(u,v,0).gray)
}
#declare F1= function(u,v){u}
#declare F2= function(u,v){v}
#declare F3= function(u,v){S(u,v)}


object{
   Parametric(
      F1, F2, F3,
      <-3,-3>,
      < 3, 3>,
      200,200,"p_square2.udo"
   )
   pigment{rgb 1}

   scale<5,5,-5>
}

This makes some fairly realistic-looking grass. It converts to mesh in Moray
perfectly, and renders quickly.

Steve Shelby


Post a reply to this message

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