POV-Ray : Newsgroups : povray.newusers : conversion : Re: conversion Server Time
1 Jun 2023 02:25:35 EDT (-0400)
  Re: conversion  
From: Alain Martel
Date: 4 Aug 2022 07:15:21
Message: <62ebaa49$1@news.povray.org>
Le 2022-08-03 à 12:50, David Kraics a écrit :
> How do I convert from the 255 scale rgb numbers to decimal numbers used by
> POV-Ray? Apparently dividing the number by 255 doesn't work.

Normally, 0..255 scale rgb values are in the sRGB space.
To use them, you need to do this :
1) In the global_settings block, set assumed_gamma 1
2) In your pigment, use srgb instead of just rgb.

When you use rgb, POV-Ray use linear range.
When you use srgb, POV-Ray use the sRGB tranfert formula to convert the 
non-linear ranges of the sRGB colour space into the linear range of the 
rgb colour space.

The format is :

pigment{ srgb sRGB_Colour/255 }

Post a reply to this message

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