POV-Ray : Newsgroups : povray.general : Combining meshes and isosurfaces Server Time
2 Nov 2024 15:25:54 EDT (-0400)
  Combining meshes and isosurfaces (Message 1 to 8 of 8)  
From: Lukas Winter
Subject: Combining meshes and isosurfaces
Date: 3 Apr 2010 06:00:54
Message: <4bb711d6@news.povray.org>
Hi there,

Isosurfaces and meshes are the two objects that currently offer the most 
advanced modelling techniques in POV-Ray. Meshes are easily modified 
using free and commercial modelling programs and great to model organic 
structures. However they require lots of triangles and excellent 
materials to look good in close-ups. Otherwise they often look too smooth 
(especially because POV doesn't support deplacement maps). With 
isosurfaces it is easy to create small semirandom detail using POV's 
inbuilt functions like noise but keeping control of the overall shape is 
difficult. Wouldn't it be nice to be able to combine the strengths of 
isosurfaces and meshes into one kind of object?

The object type I imagine would do the following:
In meshes there's "zero"-dimensional vertices, one-dimensional edges and 
zwo-dimensional faces. Let's add three-dimensional structures as well, 
I'll call them strata. They are just 3D-cells whose boundaries are faces. 
Of course we can assign texture-coordinates (called uv-coordinates in 
POV, but that term is a bit misleading) to vertices and interpolate them 
not just on faces but also inside strata. I called the term uv-
coordinates misleading because we can have any number of texture 
coordinates, not just two (u and v) but any number.
Now let's put an isosurface into each stratum. Each may - but needn't - 
have the same function and threshold. We feed texture coordinates (which 
may now be three-dimensional and named for example u, v and w) instead of 
x, y and z to the function, which makes the isosurfaces "stick" to the 
mesh even if the vertices are moved around.

With this object type we could control the overall shape using the mesh 
but the small details using isosurface functions. We could model rust on 
surfaces, that's really three-dimensional. Create landscapes with certain 
features at a large scale but let noise-like functions handle the rocky 
ground.

Of course there are certain problems to overcome. At the moment I'm 
trying to find these problems before I start messing with the POV-Ray 
source.
- Memory consumption could be a problem. A mesh that's not just a thin 
shell but has depth needs about 7 times as many triangles. Solution: Buy 
more RAM ;)
- Speed will never be better than that of meshes or isosurfaces. In fact 
the times needed to calculate an intersection will add up! Fortunately 
isosurface functions may become simpler because they needn't model the 
object's shape but only the details of the surface. Solution: Buy a new 
CPU ;)
- Perhaps we'll need to look into more complex interpolation schemes for 
texture coordinates than just linear interpolation. There may be non-
linear transformations involved!?
- There are be no graphical editors for this kind of object so we're 
still stuck with trial and error.

I'd be glad to hear what problems and chances you see with this idea!


Post a reply to this message

From: Le Forgeron
Subject: Re: Combining meshes and isosurfaces
Date: 3 Apr 2010 06:46:58
Message: <4bb71ca2$1@news.povray.org>
why a mesh at all, excepted for the modeling software ?

Just a collection (union ?) of isosurface

What about the fractal object instead ?


Post a reply to this message

From: Lukas Winter
Subject: Re: Combining meshes and isosurfaces
Date: 3 Apr 2010 06:55:15
Message: <4bb71e93$1@news.povray.org>
Am Sat, 03 Apr 2010 12:46:56 +0200 schrieb Le_Forgeron:

> why a mesh at all, excepted for the modeling software ?
> 
> Just a collection (union ?) of isosurface
> 
Yeah, that would be possible for a mock-up. The memory consumption would 
be even higher but I guess the needed non-linear transformations could be 
done by modifying the isosurfaces' functions and the strata boundaries 
using clipped_by. Rendering would be insanely slow but yes, definitely 
doable.

> What about the fractal object instead ?

The fractal object is entirely different from my proposal.


Post a reply to this message

From: clipka
Subject: Re: Combining meshes and isosurfaces
Date: 5 Apr 2010 06:26:20
Message: <4bb9bacc@news.povray.org>
Am 03.04.2010 12:00, schrieb Lukas Winter:

> Of course there are certain problems to overcome. At the moment I'm
> trying to find these problems before I start messing with the POV-Ray
> source.
> - Memory consumption could be a problem. A mesh that's not just a thin
> shell but has depth needs about 7 times as many triangles. Solution: Buy
> more RAM ;)

You'd probably end up with less memory consumption for same level of 
detail though, so I'd not consider that a real issue.

> - Speed will never be better than that of meshes or isosurfaces. In fact
> the times needed to calculate an intersection will add up! Fortunately
> isosurface functions may become simpler because they needn't model the
> object's shape but only the details of the surface. Solution: Buy a new
> CPU ;)

I guess that it will rather speed up rendering, at least as compared to 
isosurfaces, as there containing "3D-mesh" would serve as a bounding 
structure for the isosurface.

> - There are be no graphical editors for this kind of object so we're
> still stuck with trial and error.

I guess that'll be the main obstacle, and I honestly don't think it can 
be overcome within reasonable time.

I'd rather prefer work to be invested into some "fake displacement 
mapping" (I'm thinking of a certain kind of "deluxe bump mapping", which 
wouldn't improve the outline of a mesh object, but aside from that would 
give pretty much the same results as displacement mapping for the 
surface structure otherwise), or maybe a feature to generate a much 
higher-resolution mesh from a basic mesh and a displacement map. I think 
implementation of such features would be within reasonable reach, and 
easy enough to use without the need for unconventional external tools.


Post a reply to this message

From: Mr
Subject: Re: Combining meshes and isosurfaces
Date: 11 Apr 2010 05:25:01
Message: <web.4bc194b1597a7efd1408b2c10@news.povray.org>
From user point of view all the ideas mentioned are great!
Maybe for displacement the faces could be turned into heightfields instead?

The PTex software developped by Disney and released as open source works on a
per face basis for texturing without the need for UV type unwrapping
http://www.disneyanimation.com/library/ptex/


Post a reply to this message

From: Mr
Subject: Re: Combining meshes and isosurfaces
Date: 11 Apr 2010 05:45:01
Message: <web.4bc1991f597a7efd1408b2c10@news.povray.org>
"Mr" <nomail@nomail> wrote:
>
> The PTex software developped by Disney and released as open source works on a
> per face basis for texturing without the need for UV type unwrapping

 Actually, this address is the one where you can download the source:
http://ptex.us/download.html


Post a reply to this message

From: clipka
Subject: Re: Combining meshes and isosurfaces
Date: 11 Apr 2010 07:23:28
Message: <4bc1b130$1@news.povray.org>
Am 11.04.2010 11:23, schrieb Mr:

> The PTex software developped by Disney and released as open source works on a
> per face basis for texturing without the need for UV type unwrapping
> http://www.disneyanimation.com/library/ptex/

While that looks like a powerful approach, there seem to be major 
drawbacks that virtually forbid inclusion in POV-Ray in the near future:

- The approach is specifically targeted at Catmull-Clark subdivision 
surfaces, so there's probably not much benefit for classic meshes.

- To benefit from the approach, both textures and meshes would need 
special software to create, in order to provide the extra information; 
until such software is available at prices affordable by the average 
hobbyist, the feature would benefit only a small minority of users.

In other words, presently it is pretty unlikely to be worth the 
programming effort.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Combining meshes and isosurfaces
Date: 11 Apr 2010 09:35:58
Message: <4bc1d03e$1@news.povray.org>
clipka wrote:

> I'd rather prefer work to be invested into some "fake displacement 
> mapping" (I'm thinking of a certain kind of "deluxe bump mapping",

interpreting normal patterns a displacement map would certainly be
nice and it could be applied to objects other than meshes. The delta
already defined for normals could be used to build a local mesh at the
intersection point where an object was hit, to be used for local shadow
calculations and displacement of the intersection point.


Post a reply to this message

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