User:Jholsenback

From POV-Wiki
Revision as of 20:02, 1 April 2010 by Jholsenback (talk | contribs) (cleanup)
Jump to navigation Jump to search

Organization

Basically, I've been using this area as a scratch pad of sorts. As I complete things, and clean-up I'll probably just add a link here for reference.

Scratch Pad

Change Log Extracts

These are change-log extracts that might be useful with helping to update the documentation. For now they are just in reverse chronological order until I can arrange them in a more useful manner.

Beta 35
  • Radiosity maximum_reuse parameter now governs the maximum effective radius of a sample more directly.
  • Added "out-of-the-box" transparency support for GIF files.
  • Added support for PNG sRGB chunks.

Note: Non-legacy scene default gamma handling for image input files has changed significantly from previous betas, affecting all file formats except OpenEXR, Radiance HDR and (with minor differences) most flavors of PNG; there will be NO corresponding warnings. See below for more detail.

Input image files not carrying unambiguous gamma information will now be assumed to match a common gamma setting, and gamma-adjusted accordingly; this common input file gamma setting can be specified in the scene file using the following syntax:

global_settings {
  file_gamma GAMMA
  }

where GAMMA is either a numeric expression specifying the approximate display gamma for which input files are assumed to be gamma pre-corrected, or the keyword srgb indicating that input files are assumed to match the sRGB standard. (In the latter case, gamma adjustment is applied according to the sRGB standard, instead of approximating with a gamma 2.2 power-law function.) The default setting is sRGB.

Regardless of this global setting, gamma correction is not applied if the image input file is obviously used as a mere data container, such as when immediately used in a height field.

Default gamma handling rules for any image input file can be overridden by specifying file_gamma GAMMA immediately after the file name, e.g.:

image_map {
  jpeg "foobar.jpg" file_gamma 1.8
  interpolate 2
  }

This also applies to contexts where gamma adjustment is not normally applied, e.g. file formats that are defined to be encoded linearly, or files used in height fields, to simplify handling of files not conforming to standards.

Note: Gamma handling for PNG input files has changed as follows in legacy #version 3.6 scenes:

  1. In the absence of an assumed_gamma statement, non-indexed PNG files with a gAMA chunk (i.e. virtually all PNG files) will appear far brighter than with POV-Ray 3.6
  2. In the presence of an assumed_gamma 1.0 statement, indexed PNG files (uncommon) will appear darker than with POV-Ray 3.6
  3. In the presence of an assumed_gamma 2.2 statement, PNG files with a gAMA lower than 2.2 (uncommon) will appear darker than with POV-Ray 3.6
  4. PNG files with an sRGB chunk but no gAMA chunk may appear significantly different than with POV-Ray 3.6
  5. PNG files may generally appear slightly different than with POV-Ray 3.6

A warning will be printed in these cases, except for the latter.

Beta 34
  • Added support for diffuse backside illumination:

To model thin, diffusely-translucent objects (e.g. paper, curtains, leaves etc.), an optional 2nd float parameter has been added to the diffuse finish statement to control the effect of illumination from the back of the surface. The default value is 0.0, i.e. no diffuse backside illumination. For realistic results, the sum of both parameters should be between 0.0 and 1.0, and the 2nd parameter should be the smaller of the two.

Note: This feature is currently experimental and may be subject to change. In particular, the syntax as well as interoperation with double_illuminate, multi-layered textures or conserve_energy are still under investigation.

A new sample scene, "advanced/diffuse_back.pov", has been provided to illustrate this new feature.

  • New option added speed up radiosity pretrace:

As some computations don't contribute to the generation of radiosity samples, they can safely be skipped during radiosity pretrace to gain some speed if the pretrace's other role as a coarse preview is not required.

The following .ini file/command line options control whether pretrace performs all computations so it can double-feature as a coarse preview ("vain pretrace"):

Radiosity_Vain_Pretrace=bool	turns vain pretrace on/off
+RVP				turns vain pretrace on (default)
-RVP				turns vain pretrace off

Note: with vain pretrace off, preview will look remarkably odd during the radiosity pretrace phase; this is normal, and no reason to be alarmed.

At the moment, turning vain pretrace off will affect only classic lighting computations (diffuse lighting, higlights and iridescence); other features expendable during pretrace may follow in future versions.

  • Windows console version now sends stream output to stderr by default.
Beta 33
  • Added no_radiosity keyword, as known from MegaPOV:

Specifying no_radiosity in an object block makes that object invisible to radiosity rays, in the same way as no_image, no_reflection and no_shadow make an object invisible to primary, reflected and shadow test rays, respectively.

  • Revival of Radiosity Load/Save + various other radiosity code changes:

The following .ini / command line parameters are recognized:

Radiosity_File_Name=<name>"	or "+RF<name>"	to set the cache file name;
Radiosity_From_File=<on/off>"	or "+RFI"	to enable reading the radiosity file at startup
Radiosity_To_File=<on/off>"	or "+RFO"	to enable writing new samples to the radiosity file

Note: The parameter names are preliminary, and may still be subject to change; there is a potential conflict between the shorthand forms)

If both +RFI and +RFO are specified, new samples gathered are appended; otherwise, +RFO causes the file to be overwritten if it exists.

New samples gathered are written whenever an SMP block is completed. Tests indicate that this is almost neutral regarding performance, compared to operation with radiosity file output disabled.

  • New radiosity "high reproducibility" mode:

When specifying High_Reproducibility or +HR on the command line, POV-Ray will spend extra effort to make sure renders are deterministic despite SMP (currently, radiosity is the only code to use this flag; in HR mode, radiosity pretrace starts out with fewer threads, and some extra rules are imposed on sample re-use that may cause surplus samples to be gathered).

Beta 32
  • Added ARRAYS_WriteDF3 macro to arrays.inc for writing an array to a df3 file.
  • Added binary #write capability

It is now possible to write 8, 16 and 32-bit words to an external file. These words may be arranged in either little or big-endian fashion.

Placing one of the following keywords in the argument list of a #write statement causes the values up to the next comma to be written in binary format, using 2's complement integer representation, rounded to the nearest integer in the representable range:

  uint8              - unsigned byte (0..255)
  sint8              - signed byte (-128..127)
  uint16be, uint16le - unsigned 16-bit word (0..65535)
  sint16be, sint16le - signed 16-bit word (-32768..32767)
  sint32be, sint32le - signed 32-bit word (-2^31..2^31-1)

As of now, unsigned 32-bit words are not supported.

Keywords ending in "be" will cause the values to be written most significant byte first ("big endian", aka network byte order) while those ending in "le" will instead write the least significant byte first ("little endian", Intel format).

Note: See the sample macro ARRAYS_WriteDF3 in arrays.inc to see how this feature may be used.

Beta 31
  • Adds experimental support for subsurface light transport (aka subsurface scattering).

Currently, SSLT is activated for a particular object by adding the following statement to its finish.

Be Aware: this is very likely to change!

  subsurface { COLOR, COLOR }

Specifying the (reduced) scattering coefficients (sigma'[s]) and absorption coefficients (sigma[a]), respectively, in units of 1/mm, for each of the three basic colors. The object's IOR will also affect the results.

The algorithm is designed to give realistic results at a scale of 10 mm per POV-Ray unit by default; for other scales, place the following statement in the global_settings section:

  mm_per_unit NUMBER

To tune the algorithm for quality or performance, the number of samples for the diffuse scattering and single-scattering approximation, respectively, can be specified by placing the following statement in the global_settings section:

  subsurface { samples NUMBER, NUMBER }

See the sample SSLT scene in scenes/subsurface/subsurface.pov for more information

Warning: SSLT is still in alpha stage.

Beta 29
  • Added ability to declare an identifier as deprecated.

Note: This addition is already in progress. See the example below.

Beta 27
  • Added support for specifying grayscale output via INI file or command-line.

This is intended to replace the use of hf_gray_16 in global_settings. If encountered, hf_gray_16 has no effect on the output type and will additionally generate a warning message (as before).

Currently only PNG file support is provided with grayscale output; others will be added over time.

Grayscale output may be specified via Grayscale_Output=true as an INI option, or +Fxg (for output type 'x') as a command-line option. For example, +Fng for PNG grayscale output.

Caveat: grayscale output implies the maximum bit-depth the format supports for PNG this is 16. it is not valid to specify bits per color channel with 'g' (e.g. +Fng16 is not allowed, and nor for that matter is +Fn16g). If bits per channel is provided via an INI option, it is ignored.

Beta 26
Beta 25
  • Linux: add auto setting of thread count and rework --benchmark.

The number of threads is now set as the number of detected CPUs, or 4 otherwise. The built-in benchmark now accepts +L<path> command-line options and does no longer read any INI file but the provided one.

Beta 24
  • Added multiple-thread support to photon shooting code.

To take advantage of this at the moment, your scene will need multiple light sources.

  • Added experimental support for full area light diffuse and specular illumination.

By default this is off and thus area lights will work as previously, but the new feature can be turned on by specifying the new area_illumination keyword (followed by an optional on/off keyword) in the light source definition. The settings which determine the quality of the lighting are the Size_1 and Size_2 parameters of the area light (similarly to how they determine the quality of the shadows).

  • Added experimental support for reading the pixel resolution of an image map.

This is done by giving an image map pigment identifier to max_extent(), which will then return the resolution of the image map as the x and y values of the returned vector.

  • Added a new list pattern type: cubic.

It takes six texture elements and maps each one to each of the six pyramids centered at each half-axis (thus effectively mapping each texture element to each side of a origin-centered cube).

  • Added a new warp type: cubic.

It takes no parameters, and maps an area in the x-y plane between <0,0> and <1,1> around the origin in the same way as uv-mapping an origin-centered cube-shaped box would. Naturally the warp works with any object whereas the uv-mapping only works for the box object.

See the documentation of box uv-mapping for details.

Beta 23
  • Added comparison (=, !=, <, <=, >, >=) support for strings.
Beta 22
  • Added Control-A support in windows version commandline input box (select all).
  • Changed render window keypress code

Changed windows version render window keypress code to hand focus to main window for any key, not just escape.

Beta 20
  • Added 'alternate render file' feature to povwin IDE. See comments below.
  • Added extensions .MCR and .MAC

To the list of files povwin considers include files (i.e. which are filtered as such in the various file dialogs and assigned the POV file type for the editor syntax highlighting).

  • Added .INI file type to povwin editor syntax highlighting.
  • Added window menu to povwin IDE. Entries are MRU-sorted.
Windows Editor Changes

This beta introduces two notable changes to the POVWIN IDE.

Firstly, it now has a Window menu, which is located where the GUIEXT menu used to be (the latter has moved to within the Options menu).

While technically a Window menu is not necessary, as all open files are visible in tabs, the addition of this menu provides two advantages:

  1. We can provide the option of showing all tabs on a single line, with a scroller to view non-visible ones. This has not yet been added but will be at a later point.
  2. The MRU arrangement of the window menu makes it trivial to toggle between files without taking your eyes off the text or using the mouse. The most recently view window (i.e. the current one) will always be entry 1 in the list. The second most recently viewed (i.e. the last window viewed before switching to the current one) will always be entry 2 in the list, and so forth. Given that entries 1 through 10 in the list are given the menu mnemonics 1 through 0 respectively, it is therefore clear that to toggle between the current and previous files all you need to do is hit Alt-W then 2. To go to the third oldest, Alt-W then 3, and so forth.

    Currently, the MRU list is not saved on exit. This will be added. We may also add keyboard accelerators (e.g. ALT-2, ALT-3 etc) as a shortcut for Alt-W 2, etc.

Secondly, there is now an 'alternate render file' feature. This is intended to make things easier when editing macro or include files. While it is possible to use SDL to detect whether a macro/include file is being rendered directly and to pull in supporting code, that approach is not very flexible.

The alternate render file feature allows a render to be started on an include file, and instead of the include file being rendered directly (as would have happened previously), the source file that most recently included that file in a render will be rendered instead.

Note: by 'source file', we mean either a .POV or .INI file.

For this feature to work, you need to have rendered a file which includes the target file during the current editing session (the association between include files and source files is not persisted when POVWIN exits). Additionally you need to have requested to render a source file which does not have the .POV or .INI extension. When you request the render, a message box will appear asking you what to do. You can choose to render the alternate file this time only, to render the alternate file each time you render this one, or to render this one each time (i.e. disable the alternate file option).

In all cases, the choice you give only persists for the current editing session; it is not restored when you re-launch POVWIN. this is by design.

  • Added preliminary Linux support for these two features
  • CPU timer; might return incorrect results depending on the platform.
  • signal catching (e.g. when aborting a render by hitting Ctrl+C).
  • Added these POVWIN features
  • 'file modified' indicator to filename shown in POVWIN main window caption.
  • notification for when auto-reload results in files being auto-saved.
  • Added support for --benchmark on unix

works together with +wt and print built-in features with --version

Beta 17
  • Unix default file gamma changed from from 1.0 to 2.2.
  • Added RTR (real-time raytracing), clockless animation, and video capture support (windows only).
Real-Time Raytracing

POV-Ray now has some highly experimental support for a real-time raytracing loop. This is basically a mode where a single pre-parsed scene is rendered multiple times with no re-parsing inbetween frames. The camera is moved according to camera definitions provided in the main scene file. Additionally, on windows, a live video stream (e.g. from a webcam) may be mapped into the image in exactly the same way that a normal image map may be.

Please refer to the full documentation on these features.

Beta 16
  • Added support for 'pause when done' in linux build.
  • Changed alpha handling when version is set to 3.7 (see below).
  • Changed WorkThreads INI option to Work_Threads for consistency.
  • Changed bounding method command-line option from +b2 to +bm2 for the same reason.
  • Added ability to close edit tab in windows version:

by middle-clicking on it. (NB this means on the tab itself, not the contents of the tab). Also, Ctrl-W now defaults to closing the current editor file.

  • Added /EDITDLLPATH command-line parameter:

which overrides the default edit DLL locations for the windows version.

  • Added SEH and minidump generation to windows code:

After an unhandled exception POVWIN will now offer the option of creating a minidump (brief or full) for submission to the team to assist in tracking down crashes.

Photon Changes

We are re-working some areas of the photon support, and as such photons will not work as well as in the previous beta.

Alpha Changes

Some changes have been made to the way alpha is handled when +UA is activated.

Firstly, in previous versions, specifying a background with the background keyword would by default supply a background with transmit set to 1.0 (i.e. fully transparent provided that +ua is being used). This is no longer the case.

While the default background is transparent, any background specified in a scene file (unless 3.6 or earlier compatibility is being used) will now be opaque unless transmit is explicitly given. (In other words, use rgbft<> rather than rgb<> in the background statement if you want the old behaviour).

Secondly, the way that objects are blended with the background has changed.

Previously the color of the background was not taken into account when calculating effects of transmission through translucent objects when +ua is in effect (i.e. where the background could otherwise have been seen through the object). Now, however, the background color is taken into account, even if it is not otherwise visible. (In other words, blending is performed in the same way regardless of the presence of background transparency).

Note: that this change is not affected by the #version directive, so it may change the appearance of scenes written for version 3.6 and earlier. We will monitor feedback on this from beta testers to evaluate the impact of this.

Beta 15
  • Added ability to specify thread count from Windows version render menu (unsaved setting)
Beta 14
  • Added radiosity on/off flag for objects
  • Added WorkThreads INI option and WT command-line option
  • Added File_Gamma INI option
  • Added gamma correction to file output
Beta 12

Keyword Addition Example

This outlines the steps to add a new keyword to the documentation. In this case deprecated

Note: save this until all keyword additions have been identified because it's an alphabetic list in html table form.

  • document any other place(s) that it's used
  • add a table of contents entry

Links

  • The source and notes on the LaTeX markup used in the documentation.