POV-Ray : Newsgroups : povray.general : Rendering meshes with unique color per face Server Time
3 Aug 2024 16:26:36 EDT (-0400)
  Rendering meshes with unique color per face (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Marc Ellenrieder
Subject: Re: Rendering meshes with unique color per face
Date: 2 Mar 2004 02:13:21
Message: <40443410@news.povray.org>


> You should modify the "finish" rendering of your object so that faces
> will not be shaded. Just put an "ambient" light to 1.0, and a "diffuse"
> light to 0.0 in the "finish" section of your object properties. This
> will give to the faces of your object a plain color, without any
> interference with the light sources ...
> 
> Please tell me if it works ...

Thank you for your suggestions. I tried that and additionally set
Display_Gamma=1.0 on the command line. The result was indeed a different
color per face.
But,.... the color (the blue value in this case), did not correspond to the
face number :-( The cube has 12 faces in total and I didn't get color
values from 1 to 12. Even moving the color values to a more visible
interval did not help. PovRay still seems to do some shading. Maybe PovRay
is not the right tool for this kind of task.

-- 
---------------------------------------------------------------
TrackerChamp            
(Tra### [at] gmxnet)  

PGP/GPG fingerprint:       8674 6B05 3844 DB4A 65AB  A40B 23A1 A148 37F6
436D


Post a reply to this message

From: Francois LE COAT
Subject: Re: Rendering meshes with unique color per face
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

From: Warp
Subject: Re: Rendering meshes with unique color per face
Date: 2 Mar 2004 07:10:11
Message: <404479a3@news.povray.org>
Francois LE COAT <lec### [at] atariorg> wrote:
> global_settings { assumed_gamma 0.7 ambient_light rgb <1, 1, 1> }

  Are you sure you don't want to use assumed_gamma 1 instead?

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Francois LE COAT
Subject: Re: Rendering meshes with unique color per face
Date: 2 Mar 2004 07:48:07
Message: <40448287@news.povray.org>
Hi,

Warp wrote:
>>global_settings { assumed_gamma 0.7 ambient_light rgb <1, 1, 1> }
> 
>   Are you sure you don't want to use assumed_gamma 1 instead?

Well, as you like ...

The big problem with Marc's script is that there was no light
source ... Then, all the faces of his cube had a color close
to dark black. That way, there was no possibility do distinguish
between faces colors. I only modified a few things so that
features can be visible. With a gamma of 0.7, it's even more
visible ...

... So, as you like, no problem.
Marc could tell us if it's better or not ...

Regards,


http://eureka.lutece.net


Post a reply to this message

From: Christopher James Huff
Subject: Re: Rendering meshes with unique color per face
Date: 3 Mar 2004 11:37:48
Message: <cjameshuff-595009.11384903032004@news.povray.org>
In article <40448287@news.povray.org>,
 Francois LE COAT <lec### [at] atariorg> wrote:

> The big problem with Marc's script is that there was no light
> source ... Then, all the faces of his cube had a color close
> to dark black. That way, there was no possibility do distinguish
> between faces colors. I only modified a few things so that
> features can be visible. With a gamma of 0.7, it's even more
> visible ...

Um...if you want the colors in the image to be the colors specified, you 
need to use an ambient of 1, diffuse of 0, no light sources, and no 
gamma correction.

-- 
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: Warp
Subject: Re: Rendering meshes with unique color per face
Date: 3 Mar 2004 14:51:48
Message: <40463754@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> and no gamma correction.

  AFAIK that's what "assumed_gamma 1" does. The default is something else,
which means gamma correction is done to all colors specified in the
scene file.

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


Post a reply to this message

From: Christopher James Huff
Subject: Re: Rendering meshes with unique color per face
Date: 3 Mar 2004 16:50:08
Message: <cjameshuff-57784A.16510903032004@news.povray.org>
In article <40463754@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

> Christopher James Huff <cja### [at] earthlinknet> wrote:
> > and no gamma correction.
> 
>   AFAIK that's what "assumed_gamma 1" does. The default is something else,
> which means gamma correction is done to all colors specified in the
> scene file.

No. "assumed_gamma 1" uses the Display_Gamma value, which should be the 
gamma of whatever device you are going to display the image on, and 
defaults to 1.8 on Macs and 2.2 on PCs. The default (with no 
assumed_gamma specified) is to do no gamma correction at all. You could 
also set both assumed_gamma and Display_Gamma to 1, but that's more work 
than necessary.

-- 
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: Warp
Subject: Re: Rendering meshes with unique color per face
Date: 4 Mar 2004 05:53:16
Message: <40470a9c@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> No. "assumed_gamma 1" uses the Display_Gamma value, which should be the 
> gamma of whatever device you are going to display the image on, and 
> defaults to 1.8 on Macs and 2.2 on PCs. The default (with no 
> assumed_gamma specified) is to do no gamma correction at all. You could 
> also set both assumed_gamma and Display_Gamma to 1, but that's more work 
> than necessary.

  In my experience the default assumed_gamma changes the input colors
(eg. the ones in an image map). By specifying assumed_gamma 1 you get
POV-Ray to show the same colors as you get by viewing the image map
with an image viewer (which does not perform any kind of gamma correction).
The default assumed_gamma makes the image map to look way too light.

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


Post a reply to this message

From: Christopher James Huff
Subject: Re: Rendering meshes with unique color per face
Date: 4 Mar 2004 08:04:13
Message: <cjameshuff-7D158F.08051304032004@news.povray.org>
In article <40470a9c@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   In my experience the default assumed_gamma changes the input colors
> (eg. the ones in an image map). By specifying assumed_gamma 1 you get
> POV-Ray to show the same colors as you get by viewing the image map
> with an image viewer (which does not perform any kind of gamma correction).
> The default assumed_gamma makes the image map to look way too light.

This shouldn't happen. Without assumed_gamma specified, no gamma 
correction should be done. It is documented as working this way in both 
the manual and the source code. opts.GammaFactor is initialized to 
something other than 1, but that shouldn't matter as long as the 
GAMMA_CORRECT flag in opts.Options isn't set.

-- 
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: Warp
Subject: Re: Rendering meshes with unique color per face
Date: 4 Mar 2004 11:03:43
Message: <4047535f@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> This shouldn't happen.

  Indeed, I can't reproduce the effect anymore.
  I wonder why is that. I suppose there hasn't been any change regarding
to this from 3.5->3.6... Strange.

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


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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