|
|
clipka <ano### [at] anonymousorg> wrote:
> What command-line / INI settings are you using?
>
> Also, a minimalistic sample scene or at least output images (ideally the
> results of both a v3.7 and v3.8 render of exactly the same scene) would
> come in handy.
Hi,
Here is the bash script file (notify the $1 symbol is the width of a logical
tile square in the game that I carry in each bash script as first parameter, so
here I render a 256*128 image if $1 == 64. If not $1 is shipped at the top of
the bash arborescence files povray doesn't render at all. As you will see I do
not use any 'ini' file here):
#!/bin/bash
# First parameter : size of a unit square in the 'Mercenaries' game in pixels
(like 64 for example)
echo " generate 'cylindrical container' (ideal for bonuses) textures to
sprites/buildings/new directory at $(date +%Hh:%Mmin:%Ssec)" >>
....../../../../../errors_$1.txt 2>&1
#
let "img_width = $1 * 2"
let "img_height = $1"
#
povray +IcylindricalBonusContainer.pov +Obld_23_contBonus.png +W${img_width}
+H${img_height} +a0.3 +UA Declare=RendShadow=0 +GFbonusContRenderImg.povlog
#
let "img_widthShadow = $1 * 4"
let "img_heightShadow = $1 * 2"
#
povray +IcylindricalBonusContainer.pov +Obld_23_shadow.png +W${img_widthShadow}
+H${img_heightShadow} +a0.3 +UA Declare=RendShadow=1
+GFbonusContRenderShadow.povlog
#
mogrify -alpha set -channel RGBA -fill '#00000093' +opaque '#cacacaff'
bld_23_shadow.png >> ../../../../../errors_$1.txt 2>&1
mogrify -alpha set -channel RGBA -fill '#cacaca00' -opaque '#cacacaff'
bld_23_shadow.png >> ../../../../../errors_$1.txt 2>&1
mogrify -trim +repage bld_23_shadow.png >> ../../../../../errors_$1.txt 2>&1
#
#Here, there should be 'mv' command to move the generated files.
Below is a simplified scene of the image:
#include "../../../../includes/povrayVersion.inc"
global_settings{assumed_gamma 1.0}
camera{
orthographic
location <0,20,0>
look_at 0
direction -y
sky z
#if( RendShadow )
up 2*z
right 4*x
#else
up z
right 2*x
#end
}
light_source{<10,20,10>*100000 color srgb 1}
union{
object{CylindreExt texture{tDanger} translate -0.9*x}
object{CylindreExt texture{tDanger} translate 0.9*x}
object{CylindreCentre texture{tMetal} }
#if( RendShadow )
no_image
#end
}
#if( RendShadow )
plane{y, 0 pigment{color srgb 1 } }
#end
The included 'povrayVersion.inc' file contains only the following (nothing was
deleted) I tried both 3.7 and 3.8 versions but that gave the same not wanted
results:
//For all the tiles '*.pov' files, in order to quick change the povray version
used for generate the textures
//This file is included in all pov files
#version 3.8;
#default{ finish{ ambient 0.1 } }
Povray 3.8 output a warning message that tells , it found a directive (#include)
before a '#version' directive and that it could do something wrong for default
values, I don't know if it has something to do with the unexpected images.
That system allows me to easily change the #version directive by
modifying only that file (there are others techniques like a common ini file the
same way but 'included' in bash files or the following technique (if you ever
are aware of ubuntu command line):
find -type f -name "*.pov" -exec sed 's%#version 3.7%#version 3.8%g' -i {} \;
>> find all pov file and execute sed command that replace etc ...
And finally the two files: the one just after the povray render and the one
after the image magick modifications:
http://www.ant01.fr/filesAnt01/debug/justPovrayRendered.png
http://www.ant01.fr/filesAnt01/debug/shadowImgAfterMogrify.png
PS: I said in the first post I used the color picker with the threshold and an
other option, but actually, that's the 'magick wand'.
Post a reply to this message
|
|