POV-Ray : Newsgroups : povray.general : New feature idea -- Comments invited : New feature idea -- Comments invited Server Time
12 Aug 2024 13:14:20 EDT (-0400)
  New feature idea -- Comments invited  
From: John VanSickle
Date: 7 Feb 1999 14:10:29
Message: <36BDE61D.E07EAEDB@erols.com>
This deals with the mesh, specifically, an idea for a new kind of
triangle to go into the mesh, one that maintains its appearance
when animated.

Let's say that you have a mesh of a lizard, to which a texture with
a crackle pattern is applied.  This can look excellent, depending
on how good you are with textures.  However, if the mesh is animated,
for example by moving the legs of the lizard, the pattern does not
move with the lizard, but says put in 3d space, while the triangles
that form the mesh move.  The result is a shifting pattern on the
lizard's skin that is unrealistic.

There is one work-around, and that is to declare a texture for
each and every triangle.  This is not terribly difficult, and can
be easily automated in .INC files, but the memory requirements are
enormous.

Another solution, which would have to be implemented in the renderer,
involves having an extra set of points for each triangle, which defines
a source triangle for texturing.  The syntax would look like this:

stretch_triangle {
  RealPointA,TexturePointA,NormalA,
  RealPointB,TexturePointB,NormalB,
  RealPointC,TexturePointC,NormalC
  texture { DeclaredTexture }
}

It would have the appearance of a triangle that was originally declared
at (TexturePointA,TexturePointB,TexturePointC) with a static texture
and then transformed to appear at (RealPointA,RealPointB,RealPointC).

Implementation seems simple (real programmers, please comment!):  After
the surface-ray intersection test, transform the point to convert from
a point on (RA,RB,RC) to the corresponding point on triangle (TPA,TPB,TPC).
The specifics of the texture at that point are used to determine
color and shading for the original point of intersection.

If I estimate things correctly, the only additional memory requirements
would be for the inversion matrix, which can be truncated to 12 variables,
since the fourth column is invariably (0,0,0,1).  The double-precision
values take eight bytes, therefore the inverse matrix requires 96 bytes;
this does not seem unreasonable for the benefit to be gained.  The
present alternative--building a new texture for each triangle--appears to
consume at least twice that much memory.

If it's feasible, this would greatly extend the mesh feature, and allow
for effects like the stretching of skin, the waving of a flag, etc, to be
easily modeled.

So, what do you all think?

Regards,
John


Post a reply to this message

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