POV-Ray : Newsgroups : povray.general : Spherical Isosurface + HieghtMap Server Time
6 Aug 2024 17:03:48 EDT (-0400)
  Spherical Isosurface + HieghtMap (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Corey Woodworth
Subject: Re: Spherical Isosurface + HieghtMap
Date: 25 Mar 2002 18:12:43
Message: <3c9faeeb$1@news.povray.org>
"Hugo" <hua### [at] post3teledk> wrote in message
news:3c9fac93$1@news.povray.org...
> May I interfere?  :o)  Well, I don't know how slow the isosurface solution
> is, but I would go for a mesh. If you hesitate to do this because you
> consider the memory it needs, please remember that even with an
isosurface,
> your input is an image_map. This also needs a lot of memory. If you save a
> mesh, you nolonger need the bump map.
>
> As for mesh resolution, it normally doesn't need to be very high. Meshes
can
> be smoothed (faked). I'm not sure an isosurface will look better in this
> case.
>
> Btw, don't worry about asking questions. :o)

Ok then :) Here is another question! I parsed a mesh and saved it to a file
named
earthMesh.pov. I added #declare earthMesh = to the beginning of the file and
then included it in my scene. I also commented out the macro that created
the
mesh so I didn't have to make it again. Why does it still take SOO LONG to
parse?! It takes just about as long as it originally did. Are meshes
supposed to
be imported differently than this? What am I doing wrong?

Thanks,
Corey

> Regards,
> Hugo
>
>


Post a reply to this message

From: Hugo
Subject: Re: Spherical Isosurface + HieghtMap
Date: 25 Mar 2002 19:27:33
Message: <3c9fc075@news.povray.org>
> I parsed a mesh and saved it to a file ....
> Why does it still take SOO LONG to parse?!
> It takes just about as long as it originally did.

Sounds strange. Reading a mesh2 file is the fastest way to go. If your
computer is modern, it shouldn't take more than a second unless the mesh is
huge (tens of megabytes). Coming to think of it .... HF_Sphere outputs an
old-style mesh, not mesh2 as far as I know.. This must be the problem.. Do
you know how to convert it to mesh2  ??  ;o)  Sorry for these troubles, I
think the final HF_Sphere include file ought to use mesh2.

Does someone have a mesh2 version?  There's a good explanation of mesh2 in
the docs, but it might still take a little effort.


Regards,
Hugo


Post a reply to this message

From: Corey Woodworth
Subject: Re: Spherical Isosurface + HieghtMap
Date: 25 Mar 2002 19:46:46
Message: <3c9fc4f6$1@news.povray.org>
"Hugo" <hua### [at] post3teledk> wrote in message
news:3c9fc075@news.povray.org...
> > I parsed a mesh and saved it to a file ....
> > Why does it still take SOO LONG to parse?!
> > It takes just about as long as it originally did.
>
> Sounds strange. Reading a mesh2 file is the fastest way to go. If your
> computer is modern, it shouldn't take more than a second unless the mesh
is
> huge (tens of megabytes). Coming to think of it .... HF_Sphere outputs an
> old-style mesh, not mesh2 as far as I know.. This must be the problem.. Do
> you know how to convert it to mesh2  ??  ;o)  Sorry for these troubles, I
> think the final HF_Sphere include file ought to use mesh2.

Is it possible to convert it to mesh2? I've never used mesh2 before because
I
read it was mostly for importing files from other formats.

Thanks,
Corey

> Does someone have a mesh2 version?  There's a good explanation of mesh2 in
> the docs, but it might still take a little effort.
>
>
> Regards,
> Hugo
>
>


Post a reply to this message

From: Hugo
Subject: Re: Spherical Isosurface + HieghtMap
Date: 26 Mar 2002 03:00:57
Message: <3ca02ab9$1@news.povray.org>
> Is it possible to convert it to mesh2? I've never used mesh2
> before because I read it was mostly for importing files from
> other formats.

That's true because imported meshes are usually big and mesh2 is better to
handle this. It's the same data but written in a more efficient way. The
result is higher speed and less memory usage. At the same time it's harder
to read for the human eye, so sometimes old-style mesh is still preferred.

But readability is hardly necessary unless you want to manually edit the
files.. If I get the time, I'll write a mesh2 version for you.. I just
checked the HF_Sphere macros and they are easy to convert.. Let me know if
you think help is urgent.

Regards,
Hugo


Post a reply to this message

From: normdoering
Subject: Re: Spherical Isosurface + HieghtMap
Date: 12 Oct 2002 02:50:02
Message: <web.3da7c4958dccf4e514e415dd0@news.povray.org>
W wrote:
>On Mon, 25 Mar 2002 06:55:32 -0500, "Corey Woodworth" <cdw### [at] mpinetnet>
>wrote:
>> I don't really understand how far
>> reaching the function goes but I think I've figured out that it doesn't
>> scale with the container.
>
>One advice. Read _carefully_ documentation (all chapters about isosurfaces),
>then read http://www.econym.demon.co.uk/isotut/, and then study examples in
>/scenes/ folder available in standard distribution. It helps a lot.
>
>ABX
>

The http://www.econym.demon.co.uk/isotut/ link here isn't working anymore.

I use to do the image map stuff with megaPOV, but that code doesn't work
with POV 3.5, at least the version I downloaded a few months ago (I
think?).

This is how I did it in megaPOV -- but it doesn't work with POV 3.5:

// declare function with map_type 1 (spherical) mapping
#declare imageMap=function
{ pigment
 { image_map
   { png "C:\images\povsurf\earthbump.png"
     map_type 1 interpolate 2
   }
  scale 0.32
  //rotate x*45
  //rotate y*85
  //translate y*0.3
}}

// isosurface
#declare rs=0.015; // try rs values <1; higher it is, higher is text

#declare PlanetX = isosurface
{   function{x*x+y*y+z*z + rs - imageMap(x,y,z)*rs}
    contained_by{sphere{0,1}}
    eval
     max_gradient 150 // adjust to picture otherwise strange things happen
    threshold 1
    texture
    { pigment
      { image_map
        { png "C:\images\povsurf\earthcolor.png"
          map_type 1 interpolate 2
        }
  scale 0.32
  //rotate x*45
  //rotate y*85
  //translate y*0.3
      }
    }
}

I've got a lot of megaPOV code like that, is there an easy way to translate
it into something that works in POV 3.5?

normdoering


Post a reply to this message

From: hughes, b 
Subject: Re: Spherical Isosurface + HieghtMap
Date: 12 Oct 2002 04:46:00
Message: <3da7e148$1@news.povray.org>
Two things is all, I think. eval is now evaluate and you'll need to use the
dot vector of your imageMap function. Example:

imageMap(x,y,z).gray*rs

Look up evaluate in the help, it takes three parameters. Checking the Scene
Help myself... maybe a read at section 3.6.3.6 noise and pigment functions
will also help.
Another keyword I see you hadn't used is 'accuracy' although I think maybe
that was already in MegaPOV.

P.S. http://www.econym.demon.co.uk/isotut/  is working okay for me.
--
Farewell,
Bob

"normdoering" <nor### [at] yahoocom> wrote in message
news:web.3da7c4958dccf4e514e415dd0@news.povray.org...
>
> I use to do the image map stuff with megaPOV, but that code doesn't work
> with POV 3.5, at least the version I downloaded a few months ago (I
> think?).


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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