POV-Ray : Newsgroups : povray.binaries.images : Upgrading POV-Ray's include files - a few remarks Server Time
20 May 2024 15:35:19 EDT (-0400)
  Upgrading POV-Ray's include files - a few remarks (Message 8 to 17 of 37)  
<<< Previous 7 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 1 Mar 2021 02:34:35
Message: <603c990b$1@news.povray.org>
Op 28/02/2021 om 18:11 schreef Alain Martel:
> Le 2021-02-28 à 03:14, Thomas de Groot a écrit :
>> I am currently browsing through the include files to see if I can give 
>> a meaningful contribution to their upgrading to 3.7+ standard. Over 
>> time, some have been added to or partly upgraded, some are in am 
>> almost pristine state going back to version 3.1.
>>
>> I started small and upgraded skies.inc, using the scene files provided 
>> in scenes/textures/pigments/skies.
>>
> 
> Another thing.
> Most if not all of those are using ambient for the clouds. That need to 
> be changed to emission to work properly in a radiosity scene.
> 
> The same hold for the starry skies.
> 
> Next, the ambient component in the metallic textures need to go away.

Yes sir. One of the first actions I took in skies.inc was to change 
ambient to emission. It has also the neat advantage that it works 
correctly whether radiosity is used or not.

The stars.inc file has a very different type of problem about which I 
shall write separately. As it stands now, it is totally useless.

Otherwise, indeed, ambient needs to be dropped completely.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 1 Mar 2021 02:49:50
Message: <603c9c9e$1@news.povray.org>
Op 28/02/2021 om 16:43 schreef Kenneth:
> "Kenneth" <kdw### [at] gmailcom> wrote:
>> Just as a check, I rendered your example  SCloud_1  skysphere in v3.8xx
>> (assumed_gamma 1.0), and get identical results to your middle image. So far, so
>> good ;-)
>>
> 
> Hmm, they are not quite identical after all.
> 
> I thought I would do a side-by-side comparison of your v3.6 assumed_gamma 1.0
> version to v3.8xx (I changed the "skies.inc" pigments back to their originals.)
> 
> There's a definite difference; I assume that it comes from the many
> 'under-the-hood' changes made to POV-ray since v3.6.
> 
> So it seems to be very difficult to determine (and update) what the author's
> *original* visual intent was for these pigments.
> 
> Unless we all go back to using v3.6  :-O
> 

I have not tested it, but maybe your differences come from the fact that 
you use version 3.8 here. I did not, from the principle that version 3.7 
and/or 3.7.1 are the /last/ official versions of POV-Ray. As a start, 
the includes should comply with those versions. Version 3.8 is beta and 
may need more changes in future.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 1 Mar 2021 03:06:12
Message: <603ca074@news.povray.org>
Op 28/02/2021 om 14:52 schreef Bald Eagle:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> I am currently browsing through the include files to see if I can give a
>> meaningful contribution to their upgrading to 3.7+ standard. Over time,
>> some have been added to or partly upgraded, some are in am almost
>> pristine state going back to version 3.1.
> 
> Thanks, Thomas.
> I still have a few include files from Friedrich Lohmueller that I was working
> through to tighten up the code and try to explain what was going on.
> 
> 
>> The fundamental question is: What do we want?
> 
> Short answer: you really can't ever tell.
> You may want to somehow include all three.
> CloudySky1
> CloudySky2
> CloudySky3
> 
> Or maybe put all 3 versions in a macro with a version argument, and use #switch
> to pick which one gets used.
> 

Indeed. This was one of the options I was thinking about. However, as 
you correctly mentioned below, these files are (probably) mostly used as 
reference and learning items, and their value resides in the first place 
to their use by new users. So, I would prefer to update/-grade the files 
to 3.7.1 standards. In the process, some files will probably need more 
serious tweaking than others or be completely rewritten. A #switch kind 
of system may then be advisable indeed, as you write below (and above).

> 
> Very long version:
> 

And I appreciate your effort. I am not going to comment in detail just 
now, but keep this in the background as reference.

> 
> I try to keep in mind that these files are accessed for usage, reference, and
> learning.
> So, the way I (try to) approach my stuff, is a chaotic mix of the following:
> 
> 1. The simplest bare-bones example whose text can be used in the copy-paste
> mechanism of the Insert Menu.
> Because Whether I'm tired or forgetful, or whatever - I approach this part from
> a New User perspective, and just want to plug in some working code from the GUI.
> 
> The only "extra" here, is that for something like a macro, I like to write a
> working line of code or two to illustrate its actual usage in a scene.
> 
> 2. Since these might be used as a reference to how certain features work, or as
> the basis for the development of new SDL, or just as a historical record of
> POV-Ray development, I like to get rid of "magic numbers", give things
> meaningful identifiers, and perhaps restructure the formulas and code a bit so
> that it's neat, clean, and easy to follow.
> Author, date, version number, revision comments, etc.
> This might comprise a completely separate "meta-version" of the code, which has
> #debug statements enabled by #if_def (Verbose), etc.
> 
> One thing I've toyed with but haven't really fleshed out and used extensively,
> if to come up with a naming scheme for almost everything, so that 400 lines into
> some complicated scene code, I can get a clue about what's going on, and jump a
> few steps ahead in the debugging process.
> f_Identifier - function
> v_Identifier - vector quantity
> s_Identifier - scalar quantity
> C_Identifier - color
> P_Identifier - Pigment
> T_Identifier - Texture
> L_Identifier - a loop variable: #for (L_Identifier, 0, 10)
> 
> If Verbose is defined (boolean), I may send some comments to the debug stream
> showing that a macro has indeed been invoked, and has exited.  That's just
> because a scene with a large number of nested things can get pretty crazy,
> trying to figure out where things went wrong.  Looking at the debug stream, I
> can count the number of opening and closing statements and see where things went
> off the rails.
> 
> For complicated formulas, or ones that probably won't have obvious meaning, a
> few comments on what it does, how it's composed, what the assumed inputs and
> outputs are, and perhaps a reference to the origin of the formula can go a long
> way.
> // based on code / formula for [whatever] - POV-Ray, Graphics Gems, ShaderToy,
> website URL, math textbook, etc.
> // Takes 2 vectors and uses the point-slope formula for a line to....
> // divide both sides by x and cancel out [term] ....
> 
> 
> On rare occasion, just for kicks, I've sent the stepwise solution to the worked
> problem to the debug stream.
> 
> Along those lines, you might not worry so much about which fish to give the
> end-user, and instead include a texture-generating macro that teaches someone
> how a nice sky texture gets generated from first principles.
> Links to the wiki for various features ought to help people quickly grasp what's
> going on and possibly avoid the rehashing of the usual "how do I...", and even
> if they do ask, anyone can just post a quick and simple "Just look at
> m_ExampleMacro () in skies.inc - it _shows_ you how to do _everything_ ...
> 
> If you use "Step" as a macro argument, then you could progressively step through
> the code line-by-line by doing something like
> #if (Step > 0)
> #declare P_SkyBasis = pigment {bozo};
> #end
> #if (Step > 1)
> #declare P_StretchedSky = pigment {P_SkyBasis scale <10, 1, 50>}
> #end
> 
> etc.
> Every increment to step executes ALL of the previous steps.
> Of course, you could use clock as well...
> 


-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 1 Mar 2021 04:44:59
Message: <603cb79b@news.povray.org>
Op 01/03/2021 om 08:49 schreef Thomas de Groot:
> Op 28/02/2021 om 16:43 schreef Kenneth:
>> "Kenneth" <kdw### [at] gmailcom> wrote:

>>> (assumed_gamma 1.0), and get identical results to your middle image. 
>>> So far, so
>>> good ;-)
>>>
>>
>> Hmm, they are not quite identical after all.
>>
>> I thought I would do a side-by-side comparison of your v3.6 
>> assumed_gamma 1.0
>> version to v3.8xx (I changed the "skies.inc" pigments back to their 
>> originals.)
>>
>> There's a definite difference; I assume that it comes from the many
>> 'under-the-hood' changes made to POV-ray since v3.6.
>>
>> So it seems to be very difficult to determine (and update) what the 
>> author's
>> *original* visual intent was for these pigments.
>>

>>
> 
> I have not tested it, but maybe your differences come from the fact that 
> you use version 3.8 here. I did not, from the principle that version 3.7 
> and/or 3.7.1 are the /last/ official versions of POV-Ray. As a start, 
> the includes should comply with those versions. Version 3.8 is beta and 
> may need more changes in future.
> 

I tested and, no, you must have used some wrong settings somewhere. 
versions 3.7 or 3.8 render identically.

-- 
Thomas


Post a reply to this message

From: Kenneth
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 1 Mar 2021 07:15:01
Message: <web.603cd9966dc18cedd98418910@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> >
> > I have not tested it, but maybe your differences come from the fact that
> > you use version 3.8 here. I did not, from the principle that version 3.7
> > and/or 3.7.1 are the /last/ official versions of POV-Ray. As a start,
> > the includes should comply with those versions. Version 3.8 is beta and
> > may need more changes in future.
> >
>
> I tested and, no, you must have used some wrong settings somewhere.
> versions 3.7 or 3.8 render identically.
>
You are absolutely correct; I made a mistake, a really dumb one: In my simple
v3.8xx scene file for testing the skysphere and the rgb-vs-SRGB colors, I
mistakenly wrote #version 2.8 instead of 3.8! (I have no idea what "version 2.8"
does to colors-- if there ever WAS such a version.) My render was definitely
screwed up; sorry for the confusion.

Now, my v3.8 SRGB-color version looks just like your v3.7 version.

I also ran my scene in v3.7 to double-check any color/gamma differences
between that and v3.8xx; they look identical, as you say.

The other interesting behavior I noticed (maybe it's expected) is that the older
#version directive of 3.5 in "skies.inc" can be changed to 3.7, with absolutely
no change in the renders (when run in either v3.7.0 or 3.8xx). I did some
'difference' comparisons in Photoshop to check this.


Post a reply to this message

From: Kenneth
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 1 Mar 2021 08:25:04
Message: <web.603ce9f26dc18cedd98418910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
> >
> > I would suggest simply changing the specified colors to srgb
> > versions-- no fancy conversions-- and see what it looks like at assumed_gamma
> > 1.0.
> >
>
> I decided to try that myself, for the S_Cloud1 skysphere...

This is what the comparison was supposed to look like, between
v3.6 at assumed_gamma 2.2
and
v3.7.0 (or 3.8, same effect) at assumed gamma 1.0

There is a slight difference, perhaps in contrast. It is difficult to figure out
exactly what causes this; but it might be like comparing 'apples to oranges',
considering the many changes that have been made to POV-ray since v3.6.


Post a reply to this message


Attachments:
Download 'skies_scene_comparison.jpg' (114 KB)

Preview of image 'skies_scene_comparison.jpg'
skies_scene_comparison.jpg


 

From: Mr
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 1 Mar 2021 08:45:08
Message: <web.603cef406dc18ced6adeaecb0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
>[...]
Thanks a lot or your undertaking,
First note that looking at images through small previews on the web interface of
theses newsgroups is always error prone and one would naturally go to the more
contrasted. But opening full screen and really looking at pictures,
I clearly prefer the third version because a) it's the most realistic would one
consider the season to be winter (paler) rather than summer, and b)that does not
show procedural cloud color map edges so contrasted as was so frequently done in
the nineties, it's crucial now that POV moves away from what people think are
its limitations to show what it really can do.

If not already done, could more "modern" macros such as lightsys or
CousinRicky's metal work or the ones you mentionned be integrated to those
official libraries at last or is there some show stopper ?


Post a reply to this message

From: Thomas de Groot
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 2 Mar 2021 02:52:43
Message: <603deecb@news.povray.org>
Op 01/03/2021 om 14:42 schreef Mr:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> [...]
> Thanks a lot or your undertaking,
> First note that looking at images through small previews on the web interface of
> theses newsgroups is always error prone and one would naturally go to the more
> contrasted. But opening full screen and really looking at pictures,
> I clearly prefer the third version because a) it's the most realistic would one
> consider the season to be winter (paler) rather than summer, and b)that does not
> show procedural cloud color map edges so contrasted as was so frequently done in
> the nineties, it's crucial now that POV moves away from what people think are
> its limitations to show what it really can do.
> 
> If not already done, could more "modern" macros such as lightsys or
> CousinRicky's metal work or the ones you mentionned be integrated to those
> official libraries at last or is there some show stopper ?
> 

Aha! This again, addresses imo the fundamental question, also mentioned 
by BaldEagle, if we should not take leave of (some) of the "backward 
compatibility" rule. These cloud scenes were great a couple of decades 
ago but hardly anyone nowadays would use them without serious changes; 
even newbies would probably not find them acceptable given the 
development in the field of cgi.

So, I think that POV-Ray's include files should reflect these changes 
and, as Bald Eagle wrote too, provide a switching system to show, where 
possible or available, the evolution of the concept. In the case of 
clouds, that would mean these simple, version 3.1 and 3.5 cloud scenes, 
and the version 3.7+ alternatives.

In other cases, upgrading will be much more straightforward imo. 
Metallic or wood textures e.g. But there too, new additions might be or 
should be seriously considered. After all, over the years, we have 
acquired a huge amount of creative power condensation and deposition! :-)

-- 
Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 2 Mar 2021 17:00:01
Message: <web.603eb5306dc18ced1f9dae300@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> Aha! This again, addresses imo the fundamental question, also mentioned
> by BaldEagle, if we should not take leave of (some) of the "backward
> compatibility" rule. These cloud scenes were great a couple of decades
> ago but hardly anyone nowadays would use them without serious changes;
> even newbies would probably not find them acceptable given the
> development in the field of cgi.

I think, at this point, if we are going to move forward toward "4.0", then WE
must move _forward_ TO 4.0.

I have been writing some macros for use in (new) include files as well, and I
think it would be good to periodically collect and summarize ALL of the broadly
useful macros and formulas that we have - to see where we are, and so people can
review, fiddle, critique, error and performance check, etc.

> ...over the years, we have
> acquired a huge amount of creative power condensation and deposition! :-)

Going through a lot of what we have, I would say that if we're in the process of
updating and changing things, we should make a clean break, and even start
renaming some of the macros as well.

For instance, in the recent example of clarifying and modifying Point_At_Trans,
I have always thought that the name was terrible, due to vagueness.  Point
_what_ at _what_?  I think that maybe it should be renamed to something that
more clearly and concisely describes what it actually does.  "Tilt Y to new
position" "Rotate Y vector" or something like that.  Because that's what we're
going to have to remember when we type it into the scene.
It's easy enough to have the old macro name just call the macro with the new
name.

#macro OldName (Argument)
     //#warning "macro OldName has been deprecated, consider using NewName"
     #macro NewName (Argument)
#end

It's always difficult for me to know where to strike a balance with comments,
but in general, as Bill Pokorny pointed out, comments in macros and loops need
to be parsed - character by character - and so perhaps comments should reside
exclusively outside of the macros, perhaps in a nice, boxed header section, or
at least use a // 1   // 2   // 3 short notation to refer to line-specific
comments in the header.

//########################################
// This is my macro that does cool stuff #
// 1. actually it does literally nothing #
//########################################
// Author                                #
// Revised by                            #
// Version                               #
// Dependencies: math.inc, stuff2.inc    #
//########################################
#macro CoolStuff ()
     #if (true)
          #break // note 1
     #else
     #end
#end
//########################################

Since over the course of time, various include files have been improved,
updated, and have had errors corrected, I would like to see a semantic
versioning system somehow implemented.  Otherwise we're talking about one
filename, rather than a specific version of the file.  Just like we have POV-Ray
3.5, 3.6, 3.7, 3.8...
How do we accomplish that, yet keep the same simple naming scheme?
Maybe skies.inc has a single functional line: #include "skies_2_1_1.inc"
Sure, we can have a revision history, with #include "skies_1_1_1.inc" commented
out above that.

Perhaps, if there is a need for extensive documentation, it would be wise to
supplement the official docs with a .txt file with the same parent filename.
So, skies,inc would have a skies.txt file that tags along in the include
directory, and can be as verbose as the situation warrants.

Things like eval_pigment(), now(), trace() and the orthographic camera are
things that I have to re-learn to use Every Single Time.
There are also things about the orthographic camera that I still don't really
understand.


Everyone has their own programming style, and naming conventions, and toleration
for "clutter" or absence of guiding commentary.

So while there will be a certain level of unavoidable preference clashes, I
think that now is a good time to set the tone for how things will be structured,
and maybe even the content and placement of macros in the include files might
get rearranged, if it makes more sense to do so.

I mean we have shapes, and shapes1 and shapes2 and maybe even a shapes3
and there are necessary dependencies in some of those shape files that aren't
explicitly indicated or automatically included.

stones metals granites golds, ....
textures.inc ---- textures of WHAT?

It's a lot to slog through, but I think that hammering out a single include file
that illustrates a lot of the ideology and format we might want would be a great
way to guide work on successive efforts.


Post a reply to this message

From: Mr
Subject: Re: Upgrading POV-Ray's include files - a few remarks
Date: 3 Mar 2021 05:10:00
Message: <web.603f5c526dc18ced6adeaecb0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:

> updating and changing things, we should make a clean break, and even start
> renaming some of the macros as well.
> [...]I think that now is a good time to set the tone for how things will be
structured,[...]
> It's a lot to slog through, but I think that hammering out a single include file
that illustrates a lot of the ideolo
gy and format we might want would be a great way to guide work on successive efforts.

Very true that more explicit names are required.
And +1 vote for a proof of concept macro set, so pragmatic use will better
reorient reflection. Something that I believe would weight in the positive
changes balance is that some acclaimed macro developers could start to value
their work as more being part of POV-Ray core or at least potentially, that's
why I asked about some specific macros such as Lightsys (but correct me if
POV-Ray trunk already features a better alternative that I'm not aware of): that
example is a collective work and one that appears to be time standing-ly
recognized, respected, and used actually much more than most of the "official"
macros delivered with POV-Ray package. In the same way when I look at what
asset/sample is available for any kind of metal presets, If I browse through the
standard includes and compare them with CousinRicky's I will definitely consider
the standard one outdated legacy for its result (maybe it just needs better
default settings but still), yet on the other hand, having to go to through some
"download>unzip>skim-through-newsgroups-for-doc" procedures for CR's macro makes
one (probably mistakingly) believe that this macro has been judged sub-standard
by the main team, so using it seems more risky /costly / not worthy /whatever...

All this makes it appear like POV is somewhat limited to phong spheres would you
choose to get more "seriously" into it.

Of course I do not pretend to speak for macro authors, but as a user, so one
could argue that these authors might not want their macros included ? Then the
question behind would rather be, after many decades, maybe it's time some
alternatives were made to  be actually delivered along with pov as part of the
package. (dropping off less used ones if file size is the matter)

Am I missing something or does this naive opinion actually make sense?


Post a reply to this message

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

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