POV-Ray : Newsgroups : povray.general : smooth_triangle works outside but not inside objects : Re: smooth_triangle works outside but not inside objects Server Time
20 Nov 2024 02:23:21 EST (-0500)
  Re: smooth_triangle works outside but not inside objects  
From: Ken
Date: 21 Nov 2001 20:46:28
Message: <3BFC594C.1A551BCD@pacbell.net>
David Mathog wrote:
> 
> SPDBV is a molecular viewing program that generates POV3 scenes.  For
> solids the .inc
> file contains a series of lines like (this will probably wrap in the
> post):

> These are not inside any object.  The .pov/.inc file will render
> correctly.  If I then enclose
> this series of smooth_triangle commands like this:

> bad.inc:2484: error: texture identifier expected but pigment found
> instead.
> (with:  Persistence of Vision(tm) Ray Tracer Version 3.1g.Linux.ccc,
> running on Alpha.)
> 
> Why does this occur?  How come a smooth_triangle in one form works
> outside an object, but not inside one???
> 
> So far I've been able to work around it by using:
> 
> #declare DRMT1=texture{pigment{ colour red 0.80 green 0.80 blue 0.80}
> finish{ RIBBON_FINISH }}
> #declare R1_shape=mesh{
> smooth_triangle
>
{<14.291,11.967,-11.578><-0.631,-0.679,0.374>,<14.482,11.811,-11.538><-0.631,-0.679,0.374>,<14.400,11.560,-12.132><-0.631,-0.679,0.374>texture{
> DRMT1 }}
> etc.
> }
> object{ R1_shape }   // Ribbon 1
> 
> but that's not a good general solution if there are a lot of textures.

Unfortunately that is the only way to individually texture individual
triangles inside a mesh object. You can try a union instead but unions
are not as efficient as meshes if you need multiple copies of the same
object. However, if you don't need multiple copies....

-- 
Ken Tyler


Post a reply to this message

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