POV-Ray : Newsgroups : povray.general : mesh2 wants a texture but I want a material Server Time
25 Dec 2024 14:31:51 EST (-0500)
  mesh2 wants a texture but I want a material (Message 1 to 8 of 8)  
From: Andrew Rowson
Subject: mesh2 wants a texture but I want a material
Date: 14 May 2003 18:40:58
Message: <3ec2c5fa$1@news.povray.org>
Creating objects in wings3D gives a mesh2 object which has a texture
section. It seems to require a texture in this otherwise it won't render and
I have a material I want to give to the material. Is there a way to give the
mesh a material which ignores the texture defined in the mesh thing? Doing
"object{blah material{mesh_mat}}" has no effect.
Ta


Post a reply to this message

From: Txemi Jendrix
Subject: RE: mesh2 wants a texture but I want a material
Date: 14 May 2003 19:21:06
Message: <3ec2cf62$1@news.povray.org>

3ec2c5fa$1@news.povray.org...
> Creating objects in wings3D gives a mesh2 object which has a texture
> section. It seems to require a texture in this otherwise it won't render
and
> I have a material I want to give to the material. Is there a way to give
the
> mesh a material which ignores the texture defined in the mesh thing? Doing
> "object{blah material{mesh_mat}}" has no effect.
> Ta

You can only use textures with mesh2.
If you want to use a material, I presume it's because
it has an interior.
You can use interior with mesh2 simply including it:

texture { ...whatever... }
interior { ...whatever... }

Hope this helps.

Txemi Jendrix
http://www.txemijendrix.com


Post a reply to this message

From: Tim Cook
Subject: Re: mesh2 wants a texture but I want a material
Date: 14 May 2003 19:48:32
Message: <3ec2d5d0@news.povray.org>
Txemi Jendrix wrote:
> You can use interior with mesh2 simply including it:
> texture { ...whatever... }
> interior { ...whatever... }

Tried it, that don't work...
#declare LCornea_1=
   texture{
     pigment{eyepigment}
   }
   texture{
     pigment{p_map8}
     normal{p_map9}
     finish{phong 1.00 phong_size 66 reflection{0.25 metallic}}
   }
   interior{
     ior 1.5
   }

Gives a Parse Error: Expected 'object or directive', interior found 
instead.  Remove the interior{} and it works.

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Gilles Tran
Subject: Re: mesh2 wants a texture but I want a material
Date: 14 May 2003 19:51:44
Message: <3ec2d690@news.povray.org>

3ec2d5d0@news.povray.org...

> Gives a Parse Error: Expected 'object or directive', interior found
> instead.  Remove the interior{} and it works.

You need to add the interior statement at the end.

#declare MyMesh=mesh2{...}

object{MyMesh interior{...}}

G.


--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Helen
Subject: Re: mesh2 wants a texture but I want a material
Date: 14 May 2003 20:13:19
Message: <Xns937C20C721288helentrhotmailcom@204.213.191.226>
The way it worked for me with wings3D is:

#declare some_object = mesh2 {
vertex_vectors {....}
normal_vectors {....}
texture_list {	2,//the number of textures
    	texture { one_texture }
    	texture { texture_that_needs_interior }
}
face_indices {....}
normal_indices {....}
interior {some_Interior}
}

Helen


"Andrew Rowson" <pov### [at] growsecom> wrote in
news:3ec2c5fa$1@news.povray.org: 

> Creating objects in wings3D gives a mesh2 object which has a texture
> section. It seems to require a texture in this otherwise it won't
> render and I have a material I want to give to the material. Is there
> a way to give the mesh a material which ignores the texture defined in
> the mesh thing? Doing "object{blah material{mesh_mat}}" has no effect.
> Ta
> 
>


Post a reply to this message

From: Christopher James Huff
Subject: Re: mesh2 wants a texture but I want a material
Date: 15 May 2003 10:32:16
Message: <cjameshuff-FC9482.10324115052003@netplex.aussie.org>
In article <3ec2d5d0@news.povray.org>, Tim Cook <z99### [at] bellsouthnet> 
wrote:

> Gives a Parse Error: Expected 'object or directive', interior found 
> instead.  Remove the interior{} and it works.

Of course it does. You use the syntax for a layered texture declaration, 
but put an interior statement at the end. You need to put the interior 
in the object itself.
The reason that you can't specify a per-triangle material is that the 
material has an interior, and having different triangles of the same 
mesh with different interiors does not make sense.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Slime
Subject: Re: mesh2 wants a texture but I want a material
Date: 17 May 2003 13:16:39
Message: <3ec66e77@news.povray.org>
The documentation says that materials are nothing more than "container
objects" for textures and interiors (so that both can be contained in one
object). That seems to imply that materials are allowed anywhere that
textures and interiors are allowed.

So, if materials aren't allowed in meshes, that might be a bug. (?)

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Christopher James Huff
Subject: Re: mesh2 wants a texture but I want a material
Date: 18 May 2003 21:50:24
Message: <cjameshuff-9B2AFA.20510418052003@netplex.aussie.org>
In article <3ec66e77@news.povray.org>, "Slime" <slm### [at] slimelandcom> 
wrote:

> The documentation says that materials are nothing more than "container
> objects" for textures and interiors (so that both can be contained in one
> object). That seems to imply that materials are allowed anywhere that
> textures and interiors are allowed.
> 
> So, if materials aren't allowed in meshes, that might be a bug. (?)

You can't put interiors in mesh triangles either. It's not a bug.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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