POV-Ray : Newsgroups : povray.binaries.images : Upgrading POV-Ray's include files - a few remarks Server Time
28 Mar 2024 10:54:04 EDT (-0400)
  Upgrading POV-Ray's include files - a few remarks (Message 24 to 33 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 4 Messages >>>
From: Bald Eagle
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 6 Mar 2021 20:25:01
Message: <web.60442b016dc18ced1f9dae300@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:

> That is a GREAT idea! I'd be interested in helping with that initiative.

I guess something where we make a list (pref in a starter .pov file) and then we
can use that as a framework for group editing.

Maybe come up with a standard camera/resolution for anything that needs
rendering.
And #error directive for things that don't.
Make it one big #switch #case #break #end block.

Possibly alphabetize everything so it's easy to skim through.

And then it's just a basic functioning few lines of code for everything, and
then that can act as a basis for anyone who wants to follow up with
improvements.

(might need a companion .inc file for textures, useful macros, various other
odds and ends)

Which reminds me
In addition to my include file edits, and random number additions, I have a file
that I'm writing Graphics Gems methods in SDL, and I have my own include files
for things like matrix and array macros/formulas, and some commonly used
algorithms like sorting, etc.


> Rage on brother (i.e., Against the Machine), and amen, I feel exactly where
> you're coming from.


I do/have done construction, electrical, gas, HVAC, painting, grow food, store
food, cook, grind my own meat grain and spices, auto engine repair, small engine
repair, computer and printer repair, electronics, photography (B&W), arduino/cpp
coding, POV-Ray, archery, was an FFL, firearms instructor, I drive carts, pallet
jacks, forklifts, do organic chemistry, ....  getting into CB and ham, other
skillz...

"What do you do at work?"  Lift heavy stuff, clean, mop....
"What do you do at home?"  Derive the mixed partial second derivatives of
Bernstein polynomials..."


Does anyone hire me for any of that stuff? ...  no.  :|



Some is due to interest alone, most due to poverty/necessity.
It's TIRING, but I plan on outliving the snowflakes whose delicate constitution
can only tolerate organic soy milk.


hog, conn a ship, design a building, write a sonnet, balance accounts, build a
wall, set a bone, comfort the dying, take orders, give orders, cooperate, act
alone, solve equations, analyze a new problem, pitch manure, program a computer,
cook a tasty meal, fight efficiently, die gallantly. Specialization is for


― Robert A. Heinlein


> Now you're just killing me with your snarky regex, awk and grep - I literally
> laughed out loud! Because it's all so true...


I mean I've done all of that - most of it 20 years ago ...  but I'm a fan of
clear, concise, complete, and robust instructions.
It's easy to forget that SHT, and sometimes I write code on Monday and have no
idea how what I wrote works on Wednesday...
Not to mention the few times I only found a single example of code I wanted to
use, and am in the middle of saying to myself, "Yes! This is great...."    and
then I realize, "Oh.  Wow.  This is MY code..."   <eyeroll> because clearly the
coffee was working its magic when I wrote it, and then wasn't, when I forgot
that I had already wrote it and then searched for it....   :D


Post a reply to this message

From: Bald Eagle
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 6 Mar 2021 22:45:01
Message: <web.60444b176dc18ced1f9dae300@news.povray.org>
So, I just copied the keyword list from the wiki, added the boilerplate code,
and did the acos entry just to suggest a starting point and format.

I'm thinking I should have used strcomp...  :/


Post a reply to this message


Attachments:
Download 'keywordexamples.pov.txt' (70 KB)

From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 7 Mar 2021 02:41:50
Message: <604483be$1@news.povray.org>
Op 07/03/2021 om 02:23 schreef Bald Eagle:
> "Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> 
>> That is a GREAT idea! I'd be interested in helping with that initiative.
> 
> I guess something where we make a list (pref in a starter .pov file) and then we
> can use that as a framework for group editing.
> 
> Maybe come up with a standard camera/resolution for anything that needs
> rendering.
> And #error directive for things that don't.
> Make it one big #switch #case #break #end block.
> 
> Possibly alphabetize everything so it's easy to skim through.
> 
> And then it's just a basic functioning few lines of code for everything, and
> then that can act as a basis for anyone who wants to follow up with
> improvements.
> 
> (might need a companion .inc file for textures, useful macros, various other
> odds and ends)
> 
> Which reminds me
> In addition to my include file edits, and random number additions, I have a file
> that I'm writing Graphics Gems methods in SDL, and I have my own include files
> for things like matrix and array macros/formulas, and some commonly used
> algorithms like sorting, etc.
> 
> 
>> Rage on brother (i.e., Against the Machine), and amen, I feel exactly where
>> you're coming from.
> 
> 
> I do/have done construction, electrical, gas, HVAC, painting, grow food, store
> food, cook, grind my own meat grain and spices, auto engine repair, small engine
> repair, computer and printer repair, electronics, photography (B&W), arduino/cpp
> coding, POV-Ray, archery, was an FFL, firearms instructor, I drive carts, pallet
> jacks, forklifts, do organic chemistry, ....  getting into CB and ham, other
> skillz...
> 
> "What do you do at work?"  Lift heavy stuff, clean, mop....
> "What do you do at home?"  Derive the mixed partial second derivatives of
> Bernstein polynomials..."
> 
> 
> Does anyone hire me for any of that stuff? ...  no.  :|
> 
> 
> 
> Some is due to interest alone, most due to poverty/necessity.
> It's TIRING, but I plan on outliving the snowflakes whose delicate constitution
> can only tolerate organic soy milk.
> 

> hog, conn a ship, design a building, write a sonnet, balance accounts, build a
> wall, set a bone, comfort the dying, take orders, give orders, cooperate, act
> alone, solve equations, analyze a new problem, pitch manure, program a computer,
> cook a tasty meal, fight efficiently, die gallantly. Specialization is for

> 
> ― Robert A. Heinlein
> 
> 
>> Now you're just killing me with your snarky regex, awk and grep - I literally
>> laughed out loud! Because it's all so true...
> 
> 
> I mean I've done all of that - most of it 20 years ago ...  but I'm a fan of
> clear, concise, complete, and robust instructions.
> It's easy to forget that SHT, and sometimes I write code on Monday and have no
> idea how what I wrote works on Wednesday...
> Not to mention the few times I only found a single example of code I wanted to
> use, and am in the middle of saying to myself, "Yes! This is great...."    and
> then I realize, "Oh.  Wow.  This is MY code..."   <eyeroll> because clearly the
> coffee was working its magic when I wrote it, and then wasn't, when I forgot
> that I had already wrote it and then searched for it....   :D
> 

I have learned by experience that writing instructions for everybody's 
use (or for a dedicated group like in a working environment) is one of 
the most challenging things to do, especially if you intend them to be 
'clear', 'consistent', 'comprehensible'. It is a humbling experience 
too, about your own limitations. More often than not I got people coming 
to me telling me that my instructions 'didn't work', 'crashed the 
system', 'were Russian to them', etc... I learned to integrate those 
reactions into comprehensive updates. :-)

Btw, I am still 'digesting' but I'll come back to the topic.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 7 Mar 2021 09:36:05
Message: <6044e4d5@news.povray.org>
I am slowly working towards an understanding about what needs to be 
done. The skies.inc was primary exploration for me; I have now examined 
more closely some texture issues.

I selected the American Granites suite which Daniel Mecklenburg Jr wrote 
for version 2.2. I corrected some inconsistencies and then built a 
#switch system (for now only the first textures: MohoganyPol and 
MohoganyFro) to allow for different renders according to the user's whim.

I think that this suite of granite textures should be included into the 
POV-Ray package by the way. I guess it was dropped or lost.

The image below shows two sets of renders: The top two rows correspond 
to the MohoganyFro set; the two bottom rows to the MohoganyPol set. The 
difference between the row couples is only that in the second one a 
layered texture is used for some extra veins in the granite.

The first column shows the granite in its basic, linear colour space, 
form as written by the author.

The second column uses a simple rewrite of rgb --> srgb, assuming that 
the original code was written for an assumed_gamma 2.2 environment.

The third column uses the transformation function by Ive from scRGB to 
sRGB. I kept this column as reference, but I would argue for the 
following column as to be definitive.

The fourth column additionally uses the colour saturation/brightness 
variation code by Clipka.

It is a bit of work, but I think that this would be an acceptable to 
update the textures available in the Include directory.


-- 
Thomas


Post a reply to this message


Attachments:
Download 'conversions.jpg' (778 KB)

Preview of image 'conversions.jpg'
conversions.jpg


 

From: Robert McGregor
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 7 Mar 2021 11:35:00
Message: <web.6044ffea6dc18ced87570eab0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> I am slowly working towards an understanding about what needs to be
> done. The skies.inc was primary exploration for me; I have now examined
> more closely some texture issues.

I like Clipka's version best. I know Christoph has championed gamma 1.0 but I'm
really a novice with the whole gamma issue (which I've seen debated endlessly
here over the years).

That said, I just read this blog post about gamma, which I found very
enlightening and thought it might be helpful to others here:

https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/


Post a reply to this message

From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 7 Mar 2021 11:46:03
Message: <6045034b$1@news.povray.org>
Op 7-3-2021 om 17:32 schreef Robert McGregor:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> I am slowly working towards an understanding about what needs to be
>> done. The skies.inc was primary exploration for me; I have now examined
>> more closely some texture issues.
> 
> I like Clipka's version best. I know Christoph has championed gamma 1.0 but I'm
> really a novice with the whole gamma issue (which I've seen debated endlessly
> here over the years).
> 
> That said, I just read this blog post about gamma, which I found very
> enlightening and thought it might be helpful to others here:
> 
> https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/
> 

I agree, in particular because it is closest to the "original", although 
we have no idea how the textures looked under version 2.2.

The whole switch idea gives a broader choice of textures to the user. 
After all, somebody may prefer a different aspect. And he/she can always 
start tinkering too.

-- 
Thomas


Post a reply to this message

From: Cousin Ricky
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 8 Mar 2021 13:04:07
Message: <60466717$1@news.povray.org>
On 2021-03-07 12:32 PM (-4), Robert McGregor wrote:
> 
> That said, I just read this blog post about gamma, which I found very
> enlightening and thought it might be helpful to others here:
> 
> https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/

Et tu, Photoshop?

Does anyone know whether GIMP and ImageMagick do it correctly?  The 
article doesn't mention these two, but I use them for resizing, and I've 
wondered about this issue.

I'm confident that POV-Ray 3.7 does it correctly, but who wants to write 
a scene file just to resize?  (I often end up doing that for simple 
editing anyway, because it's easier than deciphering the GIMP 
documentation.)

POV-Ray 3.6.2 and earlier read image files incorrectly, although this 
can be fixed with a pigment function, which is what I did before 3.7 was 
developed.  (Thanks Jaime or Ive, whoever posted the function.)  The 
article might also explain why anti-aliased text in POV-Ray 3.5 looks 
heavier than in 3.6 and later.


Post a reply to this message

From: Bald Eagle
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 8 Mar 2021 13:25:01
Message: <web.60466b916dc18ced1f9dae300@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:

> POV-Ray 3.6.2 and earlier read image files incorrectly, although this
> can be fixed with a pigment function, which is what I did before 3.7 was
> developed.  (Thanks Jaime or Ive, whoever posted the function.)  The
> article might also explain why anti-aliased text in POV-Ray 3.5 looks
> heavier than in 3.6 and later.

Friedrich Lohmueller?

http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky8.htm


Post a reply to this message

From: Cousin Ricky
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 8 Mar 2021 13:56:55
Message: <60467377$1@news.povray.org>
On 2021-03-08 2:23 PM (-4), Bald Eagle wrote:
> Cousin Ricky <ric### [at] yahoocom> wrote:
> 
>> POV-Ray 3.6.2 and earlier read image files incorrectly, although this
>> can be fixed with a pigment function, which is what I did before 3.7 was
>> developed.  (Thanks Jaime or Ive, whoever posted the function.)  The
>> article might also explain why anti-aliased text in POV-Ray 3.5 looks
>> heavier than in 3.6 and later.
> 
> Friedrich Lohmueller?
> 
> http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky8.htm

No, the function I have uses sRGB non-linearity instead of a power 

original post, but this code is adapted from one of my old scene files.

-----------[BEGIN CODE EXCERPT]-----------
#declare p_Map = pigment
{ image_map { jpeg "myimage.jpg" interpolate 2 }
}

#declare fn_Map = function { pigment { p_Map } }

#declare fn_Adjust = function (x) //from IEC 61966-2-1:1999
{ select (x - 0.04045, x / 12.92, pow ((x + 0.055) / 1.055, 2.4))
}

#declare p_Adjusted = pigment
{ average pigment_map
   { [ function { fn_Adjust (fn_Map (x, y, z).red) }
       color_map { [0 rgb 0] [1 red 3] }
     ]
     [ function { fn_Adjust (fn_Map (x, y, z).green) }
       color_map { [0 rgb 0] [1 green 3] }
     ]
     [ function { fn_Adjust (fn_Map (x, y, z).blue) }
       color_map { [0 rgb 0] [1 blue 3] }
     ]
   }
}
-----------[BEGIN CODE EXCERPT]-----------


Post a reply to this message

From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 9 Mar 2021 02:10:07
Message: <60471f4f@news.povray.org>
Op 08/03/2021 om 19:04 schreef Cousin Ricky:
> On 2021-03-07 12:32 PM (-4), Robert McGregor wrote:
>>
>> That said, I just read this blog post about gamma, which I found very
>> enlightening and thought it might be helpful to others here:
>>
>> https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/ 
>>
> 
> Et tu, Photoshop?
> 

> article doesn't mention these two, but I use them for resizing, and I've 
> wondered about this issue.


I don't know, but I preferably use Ive's IC for resizing.


-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 4 Messages >>>

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