POV-Ray : Newsgroups : povray.advanced-users : light output image difference between v3.7 and v3.8 : light output image difference between v3.7 and v3.8 Server Time
25 Apr 2024 01:03:55 EDT (-0400)
  light output image difference between v3.7 and v3.8  
From: Warren
Date: 16 Oct 2018 14:35:01
Message: <web.5bc62f08b2463bce20df21d60@news.povray.org>
Hi/Hello

I have a system that build textures for a video game under Ubuntu v18.04 . All
the textures are made with povray and some bash scripts help me to run povray in
command line and then sort the generated textures in directories after a command
line tool : 'image magic' (with mogrify and/or convert binaries) applies some
modification to the images generated with povray.

Bash >> run povray for image A >> apply some modification to the image A with
image magick (if needed only) >> then it runs bash again (bourne again shell
'again' == "bash again" (joke inside :-) ) ) to move the texture(s) in a
destination folder where all textures are sorted by their kind in sub
directories (building or enemy ship or grass tile texture, etc..). I use mainly
orthographic camera because of the tiles textures system for games.

When I had povray in stable version 3.7 everything went perfectly I had the
texture I wanted (after some tries of image magick that I had never used before
, it took some time to be perfect. But since I setup povray 3.8 (I will put the
output of 'povray --version' below for details), some texture differs from
precedent renders. For example I generate some buildings , and for the need of
my game I will render the building itself and then its shadow with the same
scene, but for the 'shadow' rendering I will use the 'no_image' keyword and a
statement of a gray plane to cast the shadow. So I have a picture of the
building's shadow with (initially) two grays, a dark one for the shadow and a
lighter one that was exposed to the light source (I set the source light as far
as needed to not have several grays for one part (shadow part / to light exposed
plane part). And then after that I use image magick with commands that set the
colour to (RedGreenBlueAlpha hexadecimal) #00000093 for the shadow and #XXXXXXff
(which is completely transparent due to ff alpha channel.(I picked the colour of
the shadow only once then everything is run automatically I don't need to come
back to it).

The problem is that the resulting shadow surroundings contains some
irregularities like some mid transparent black pixels that I had not before.
Before the shadow texture was cropped with image magick and it kept only the
image shadow, now the texture image is a little bigger because of the mid
transparent black pixels. And after some analyze of the just rendered (but not
modified shadow texture that povray made), I saw with the color picker (in GIMP)
with the broadly speaking following options : 'don't select only clicked
adjacent pixels but all image pixels' and 'color selected threshold = 0' I see
that there are a lot of scattered pixels selected outside of the shadow telling
me that the light exposed plane is not uniform , and that doesn't look like a
wave of gradient grays that you'd normally expect if the light source was nearer
(angle between light and plane).

Here are the commands used with image magick to convert shadow (note the operand
before opaque that is not the same : + or - ):

//If color not equal to #cacacaff set color to #00000093 (this is the shadow)
mogrify -alpha set -channel RGBA -fill '#00000093' +opaque '#cacacaff'
bld_23_shadow.png >> ../../../../../errors_$1.txt 2>&1

//If color equal to #cacacaff change it to #cacacaff which is fully transparent
mogrify -alpha set -channel RGBA -fill '#cacaca00' -opaque '#cacacaff'
bld_23_shadow.png >> ../../../../../errors_$1.txt 2>&1

//Crop the image
mogrify -trim +repage bld_23_shadow.png >> ../../../../../errors_$1.txt 2>&1

All error messages are outputed to a file: errors_*.txt, I didn't see any errors
in it all was fine.

I used both 3.7 and 3.8 for the version statement and forced the default value
of ambient to 0.1 when I used 3.8 version but nothing changed.

Here is the output of 'povray --version':

POV-Ray 3.8.0-alpha.9861167.unofficial

This is an unofficial version compiled by:
 Antoine FAURE <www.ant01.fr>
 The POV-Ray Team is not responsible for supporting this version.

Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Built-in features:
  I/O restrictions:          enabled
  X Window display:          enabled (using SDL)
  Supported image formats:   gif tga iff ppm pgm hdr png jpeg tiff openexr
  Unsupported image formats: -

Compilation settings:
  Build architecture:  x86_64-pc-linux-gnu
  Built/Optimized for: x86_64-pc-linux-gnu (using -march=native)
  Compiler vendor:     gnu
  Compiler version:    g++-8 8
  Compiler flags:      -pipe -Wno-multichar -Wno-write-strings
-fno-enforce-eh-specs -Wno-non-template-friend -s -O3 -ffast-math -march=native
-pthread


Post a reply to this message

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