POV-Ray : Newsgroups : povray.programming : calculation for pixel normal value and color value in source code Server Time: 17 Jun 2019 07:15:04 GMT
   calculation for pixel normal value and color value in source code (Message 1 to 6 of 6)  
From: Yunying
Subject: calculation for pixel normal value and color value in source code
Date: 9 Feb 2010 13:05:01
Message: <web.4b715ce7d5392ef2526dee060@news.povray.org>
Hi, I am a begineer for Pov-Ray. I am doing a school project which requires me
to use pov-ray to generate a picture which each pixel value actually represent
its normal value.

  My supervisor told me I can just replace the color value(R,G,B)of each pixel
by that pixel's normal value(x,y,z).(P.S. I have tried to use this method to
edit the tutorial example in 'Introduction to POV-Ray'(SDL Tutorial: A
raytracer, p.g. 176. and could get the normal_value picture I want).

  However, the tutorial I tried is only suitable for generating spheres, if I
want to generate a more complex picture, I don't know how to do. Do I need to
edit the source code? or anybody can tell me where I can find
the source code which calculate each pixel's color and its normal value? then I
can directly use the normal value to replace the color value. If you can, please
tell me the variable name used to represent these two variables? Please please
help!!! it's very important to me.

  Thank you very much!


Post a reply to this message

From: Warp
Subject: Re: calculation for pixel normal value and color value in source code
Date: 9 Feb 2010 15:41:21
Message: <4b718221@news.povray.org>
You might be able to do that without having to modify the source code.

  Define three pigments, each using a slope_map oriented towards each of
the main axes, and each using one of the RGB components as its color map
(ie. the first would be from black to red, the second from black to green,
and so on). Then use the average of these pigments as your overall pigment
of the object.

-- 
                                                          - Warp


Post a reply to this message

From: Yunying
Subject: Re: calculation for pixel normal value and color value in source code
Date: 11 Feb 2010 10:45:01
Message: <web.4b73ded1730e10ad25acb1ab0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> You might be able to do that without having to modify the source code.
>
>   Define three pigments, each using a slope_map oriented towards each of
> the main axes, and each using one of the RGB components as its color map
> (ie. the first would be from black to red, the second from black to green,
> and so on). Then use the average of these pigments as your overall pigment
> of the object.
>
> --
>                                                           - Warp

Thanks so much for your reply. But I cannot understand very well how to define
the pigments by using the method you suggested? I am so sorry, I really very
fresh for using pov-ray, so far what I know is only about those basic knowledge
about pov-ray. So if you can, can you show me a simple code example about how to
do this by using your above suggestion? Thank you very much.

  Besides this, I want to ask another question. If I use this method, the result
I get will be the normal value of each pixel, right? so it means the final
picture the pov-ray generate will be a normal value (for each pixel) picture
instead of a general picture, right?

  Does it means I have to modify each picture's pigment value, for example, if I
download some pov-ray models, Do I need to edit every pigment value of all the
model programs? Is there a way which I only need to edit one part of the
code(e.g. source code), so I do not need to edit every model code.

&#12288; Please give me some guide about it, can? Thank you so much about it.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: calculation for pixel normal value and color value in source code
Date: 11 Feb 2010 11:19:28
Message: <4b73e7c0$1@news.povray.org>
On 09.02.10 14:02, Yunying wrote:
>    Hi, I am a begineer for Pov-Ray. I am doing a school project which requires me
> to use pov-ray to generate a picture which each pixel value actually represent
> its normal value.

This is the wrong group for this question.  This group is for discussion of
the POV-Ray source code, not general questions of using POV-Ray.  Questions
about using POV-Ray should be asked/made in either povray.general or
povray.newusers.

I would recommend povray.newusers for your question.

Please do not multi-post. If you post the same message to multiple groups, 
your messages will be deleted.

     Thorsten, POV-Team


Post a reply to this message

From: scott
Subject: Re: calculation for pixel normal value and color value in source code
Date: 11 Feb 2010 11:59:39
Message: <4b73f12b$1@news.povray.org>
>  Hi, I am a begineer for Pov-Ray. I am doing a school project which 
> requires me
> to use pov-ray to generate a picture which each pixel value actually 
> represent
> its normal value.

Should be possible with MegaPOV (an extension for POV), without having to 
edit any source:

http://megapov.inetart.net/manual-1.2.1/global_settings.html#post_processing


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: calculation for pixel normal value and color value in source code
Date: 13 Feb 2010 21:32:24
Message: <4b771a68@news.povray.org>
Thorsten Froehlich wrote:
> On 09.02.10 14:02, Yunying wrote:
>>    Hi, I am a begineer for Pov-Ray. I am doing a school project which
>>    requires me
>> to use pov-ray to generate a picture which each pixel value actually
>> represent its normal value.
> 
> This is the wrong group for this question.  This group is for discussion
> of
> the POV-Ray source code, not general questions of using POV-Ray.

As I understood it, he wanted to modify POV-Ray's rendering code to get what 
he wanted.

> Please do not multi-post. If you post the same message to multiple groups,
> your messages will be deleted.

Agreed with that though.


Post a reply to this message

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