POV-Ray : Newsgroups : povray.general : non-transparent SSS and interior texture with mesh2 : Re: non-transparent SSS and interior texture with mesh2 Server Time
3 Aug 2024 04:19:03 EDT (-0400)
  Re: non-transparent SSS and interior texture with mesh2  
From: Warp
Date: 6 May 2004 07:39:57
Message: <409a240d@news.povray.org>
anto matkovic <ant### [at] matkoviccom> wrote:
> - How to apply interior_texture to mesh2? The same settings works perfectly
> with POV solids, but with mesh2, nothing... Maybe I'm a stupid :) or I
> didn't laying hands on POV in a few last years.... My mind is probably in
> features of POV 3.1...

  There are two types of primitives (ie. surfaces) in POV-Ray: Those with
a defined interior and those without.

  Their difference is that for a primitive with a defined interior for any
point in space you can ask whether it's inside that primitive or not
(and in fact the POV-Ray SDL has such a function: inside()).

  Meshes belong to the second category: They do not have a defined interior.
You can make a mesh to guess at its own interior by specifying an
inside_vector (the name of this keyword is admittedly confusing because
it describes its goal and not what the specified vector actually does).

  Curiously, however, interior_texture uses (AFAIK) a completely different
method for finding out which side of the surface is facing outside and
which is facing inside: Using the normal vector of the surface.

  All POV-Ray primitives have a normal vector (else lighting calculations
would be impossible), naturally also meshes.

  I just tried using interior_texture with a mesh with smooth triangles and
it worked ok. The side of the triangles opposite to the direction of the
normal vectors was textured with the interior_texture.
  With flat triangles the normal vector is automatically calculated by
POV-Ray. If I'm not mistaken, the order of the vertices decides which
side of the triangle is the side of the normal vector. I tested this
as well, and interior_texture worked with flat triangles ok.

  I haven't tested with mesh2, though, but there shouldn't be any difference
(after all, it's just an alternative syntax for the same primitive).
Unless there's something odd going on with the mesh2 syntax, perhaps
you are making some mistake in your code? Could you post a short
example?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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