POV-Ray : Newsgroups : povray.beta-test : Mesh2 and surface properties. Server Time
30 Jul 2024 14:16:56 EDT (-0400)
  Mesh2 and surface properties. (Message 1 to 8 of 8)  
From: Batronyx
Subject: Mesh2 and surface properties.
Date: 7 Nov 2001 00:22:39
Message: <3be8c51f@news.povray.org>
I can find no apparent way to get an interior_texture{} applied to a mesh in
mesh2{} format. Given the descriptions of mesh2{} and texture{} in the docs,
this isn't completely unexpected. Is this a bug? No. It seems to work as
designed and described. However, I suggest mentioning mesh2{} as an exception to
the "backside" rule in the description of interior_texture{}, just for the sake
of clarity. I haven't tested, but double_illuminate and any other surface
properties (can't think of any more at the moment :) ) might also need this
consideration.

Batronyx ^"^


Post a reply to this message

From: ingo
Subject: Re: Mesh2 and surface properties.
Date: 7 Nov 2001 05:13:36
Message: <Xns915272340FDF8seed7@povray.org>
in news:3be8c51f@news.povray.org Batronyx wrote:

> I can find no apparent way to get an interior_texture{} applied to
> a mesh in mesh2{} format.

No problem, see scene below. The material container isn't realy needed.

There is one minor "problem" though. The texture_list does not accept 
interior_texture. Nor does it accept materials, so it is not possible 
to use texture + interior_texture there.

---%<------%<---
#version 3.5;
global_settings {assumed_gamma 1.0}
light_source {<500,500,-500> rgb 1}
camera {location  <0.5, 0.5, 1.5> look_at<0.5, 0.5, 0>}
#declare T1= texture{pigment{wood scale 0.3}}
mesh2 {
   vertex_vectors {
      9, 
      <0,0,0>,<0.5,0,0>,<0.5,0.5,0>,
      <1,0,0>,<1,0.5,0>,<1,1,0>, 
      <0.5,1,0>,<0,1,0>,<0,0.5,0>   
   }

   uv_vectors {
      9
     <-0.5,-0.5>,<0,-0.5>,<0,0>,
     <0.5,-0.5>,<0.5,0>,<0.5,0.5>,
     <0,0.5>,<-0.5,0.5>,<-0.5,0>, 
   }
   
   texture_list {
      3,
      texture{pigment{wood scale 0.3}}
      texture{pigment{rgb 1}}
      texture{pigment{marble scale 0.2}}
   }
   
   face_indices {
      8, 
      <0,1,2>,0,1,2 <1,3,2>/*,0*/
      <3,4,2>,0,1,2 <4,5,2>/*,0*/
      <5,6,2>/*,0,1,2*/ <6,7,2>/*,0*/
      <7,8,2>/*,0,1,2*/ <8,0,2>/*,0*/
   }
   uv_indices {
      8, 
      <0,1,2>, <0,1,2>,
      <0,1,2>, <0,1,2>,
      <0,1,2>, <0,1,2>,
      <0,1,2>, <0,1,2>,
   }
   
   //uv_mapping

   material {
      texture{
         pigment{rgb <1,0,0>}
      }
      interior_texture{
         pigment{rgb 1}
      }
   }
}
---%<------%<---


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: ingo
Subject: Re: Mesh2 and surface properties.
Date: 7 Nov 2001 05:29:56
Message: <Xns915274F9BA2C6seed7@povray.org>
in news:Xns### [at] povrayorg ingo wrote:

> There is one minor "problem" though. The texture_list does not
> accept interior_texture. Nor does it accept materials, so it is not
> possible to use texture + interior_texture there.

... and adding inverse to the mesh doesn't flip the textures as it does 
on a sphere. Not that I expected it to do so, but it would be very nice 
if inverse flipped the normals on a mesh.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From:
Subject: Re: Mesh2 and surface properties.
Date: 7 Nov 2001 05:42:27
Message: <vq3iut0k520rrj0akmubpinhkg8ji89r4v@4ax.com>
On 7 Nov 2001 05:29:56 -0500, ingo <ing### [at] homenl> wrote:
> in news:Xns### [at] povrayorg ingo wrote:
>
> > There is one minor "problem" though. The texture_list does not
> > accept interior_texture. Nor does it accept materials, so it is not
> > possible to use texture + interior_texture there.
>
> ... and adding inverse to the mesh doesn't flip the textures as it does 
> on a sphere. Not that I expected it to do so, but it would be very nice 
> if inverse flipped the normals on a mesh.

from 6.5.9.4  "The appearance of the object is not changed, just the way that
POV-Ray perceives it." ;-)

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Warp
Subject: Re: Mesh2 and surface properties.
Date: 7 Nov 2001 06:54:31
Message: <3be920f7@news.povray.org>
Batronyx <bat### [at] alliancecablenet> wrote:
: I can find no apparent way to get an interior_texture{} applied to a mesh in
: mesh2{} format.

  Logically this shouldn't be even possible because meshes have no interior.
You just can't say which side of the triangles is the inner side and which
one is the outer side.
  If POV-Ray *does* allow interior_texture in meshes, that's a bit illogical
in my opinion.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Christoph Hormann
Subject: Re: Mesh2 and surface properties.
Date: 7 Nov 2001 11:33:27
Message: <3BE9624E.88F69FA9@gmx.de>
Warp wrote:
> 
>   Logically this shouldn't be even possible because meshes have no interior.
> You just can't say which side of the triangles is the inner side and which
> one is the outer side.
>   If POV-Ray *does* allow interior_texture in meshes, that's a bit illogical
> in my opinion.
> 

It allowes interior_texture on patches, for meshes you would have to
define the 'inside' with either the normal vector (in smooth meshes) or
with the order in which the vertices are given.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Batronyx
Subject: Re: Mesh2 and surface properties.
Date: 8 Nov 2001 22:27:12
Message: <3beb4d10@news.povray.org>
"ingo" <ing### [at] homenl> wrote in message
news:Xns### [at] povrayorg...
> in news:3be8c51f@news.povray.org Batronyx wrote:
>
> > I can find no apparent way to get an interior_texture{} applied to
> > a mesh in mesh2{} format.
>
> No problem, see scene below. The material container isn't realy needed.
>
> There is one minor "problem" though. The texture_list does not accept
> interior_texture. Nor does it accept materials, so it is not possible
> to use texture + interior_texture there.


Oh. I hadn't considered the case of uv_mapping. I had only tried wrestling with
the "one minor 'problem'", which might still be worthy of note in the docs :)

Batronyx ^"^


Post a reply to this message

From: Batronyx
Subject: Re: Mesh2 and surface properties.
Date: 8 Nov 2001 22:41:18
Message: <3beb505e@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3be920f7@news.povray.org...
> Batronyx <bat### [at] alliancecablenet> wrote:
> : I can find no apparent way to get an interior_texture{} applied to a mesh in
> : mesh2{} format.
>
>   Logically this shouldn't be even possible because meshes have no interior.
> You just can't say which side of the triangles is the inner side and which
> one is the outer side.
>   If POV-Ray *does* allow interior_texture in meshes, that's a bit illogical
> in my opinion.
>

I agree somewhat; applying the word 'interior' to a triangle is technically, a
complete misnomer. However, we *can* say which is the inside and which is the
outside, as a matter of convenience, even if it is technically incorrect. We
just all agree to understand what we *really* mean in this particular context:
front and back ( as determined by the direction of the surface normal) Again,
strictly as a matter of convenience.

Batronyx ^"^


Post a reply to this message

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