POV-Ray : Newsgroups : povray.general : Rendering meshes with unique color per face : Re: Rendering meshes with unique color per face Server Time
2 Nov 2024 13:19:17 EDT (-0400)
  Re: Rendering meshes with unique color per face  
From: Francois LE COAT
Date: 2 Mar 2004 06:54:28
Message: <404475f4@news.povray.org>
Hi,

Marc Ellenrieder wrote:
> Maybe PovRay is not the right tool for this kind of task.

Let's have a look at this ...

Regards,


http://eureka.lutece.net

================================================================

// a simple cube

#declare model = mesh2 {

vertex_vectors {
    8
    < +2972.72000 , -2972.71900 , -2972.72000 >
    < +2972.72000 , +2972.72000 , -2972.72000 >
    < -2972.72000 , +2972.71900 , -2972.72000 >
    < -2972.71900 , -2972.72100 , -2972.72000 >
    < +2972.72100 , -2972.71800 , +2972.72000 >
    < -2972.71900 , -2972.72000 , +2972.72000 >
    < -2972.72100 , +2972.71900 , +2972.72000 >
    < +2972.71800 , +2972.72100 , +2972.72000 >
     }
texture_list {
    12
    texture{pigment{rgb <0,0,0.1>}}
    texture{pigment{rgb <0,0,0.2>}}
    texture{pigment{rgb <0,0,0.3>}}
    texture{pigment{rgb <0,0,0.4>}}
    texture{pigment{rgb <0,0,0.5>}}
    texture{pigment{rgb <0,0,0.6>}}
    texture{pigment{rgb <0,0,0.7>}}
    texture{pigment{rgb <0,0,0.8>}}
    texture{pigment{rgb <0,0,0.9>}}
    texture{pigment{rgb <0,0,0.8>}}
    texture{pigment{rgb <0,0,0.7>}}
    texture{pigment{rgb <0,0,0.6>}}
     }
face_indices {
    12
    <   0 ,   1 ,   2 >,0
    <   2 ,   3 ,   0 >,1
    <   4 ,   5 ,   6 >,2
    <   6 ,   7 ,   4 >,3
    <   0 ,   4 ,   7 >,4
    <   7 ,   1 ,   0 >,5
    <   1 ,   7 ,   6 >,6
    <   6 ,   2 ,   1 >,7
    <   2 ,   6 ,   5 >,8
    <   5 ,   3 ,   2 >,9
    <   4 ,   0 ,   3 >,10
    <   3 ,   5 ,   4 >,11
     }
}
camera {
         perspective
         location  < -5352.586, -50926.453, +5382.069 >
         direction < +0.104, +0.989, -0.105 >
         up        < +0.011, +0.103, +0.989 >
         sky       < +0.011, +0.103, +0.989 >
         right     < +0.989, -0.104, +0.000 >
         angle     7.772
         look_at <0,0,0>
        }

background { color rgb <1, 1, 1> }

global_settings { assumed_gamma 0.7 ambient_light rgb <1, 1, 1> }

light_source { <-20, 400000, -20> color rgb <1,1,1> }

// Show the model

object {
model
finish { ambient 1.0 diffuse 0.0 }
}


Post a reply to this message

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