|
|
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> I never actually used bump_maps before. Now I try to use one, but not
> seeing any effect. Can someone assist me?
Here's what I managed to do with it, changed many things so your scene file will
look different. See whole scene file text below.
I discovered something, caught me by surprise, when using a planar mapping for a
bump map the opposite side will invert the normal. Well, not too surprising if
on a plane {y,0} for example, but I didn't think about the inversion for a
spherical shape like your balloon.
That might not be so much a problem, because I easily solved that by using
opposite scale (as you will see in SDL changes). The real problem I encountered
is how the vertical portions of balloon lose bumpiness. I realize it could be
dealt with by using a non-planar mapping, or maybe warp (that I was unsuccessful
with), but the image file is not usable as such.
Someone else might be able to alter it but I didn't try more than applying
spherical and cylindrical warp {} to the planar image/bump map.
Including enhanced image file here too. It was indeed low contrast before, which
can be bad for this kind of thing. You should be able to see how the bumpiness
is shown now, mainly for upper and lower parts of balloon, yet flattens out on
the sides as I said.
Remember I changed things like lights, textures, too so you are going to need to
do whatever changes you want to this. At least I think you should see the
bumpiness anyhow.
#version 3.7;
//#include "colors.inc"
//#include "finish.inc"
//#include "textures.inc"
#declare MyRadiosity = off;
global_settings
{
#if(MyRadiosity)
radiosity
{
media on
normal on // added
pretrace_start 0.08
pretrace_end 0.02
count 123
error_bound 0.75
recursion_limit 2
}
#end
//subsurface {}
//adc_bailout 0.0039
ambient_light 0.06//rgb < 0.000, 0.000, 0.000 >
assumed_gamma 1
irid_wavelength rgb < 0.250, 0.180, 0.140 >
max_trace_level 4
number_of_waves 10
noise_generator 3
charset ascii
}
camera
{
location < 0.0, 200.0, -500.0 >
look_at < 0.0, -150.0, 0.0 >
right image_width/image_height*x
}
light_source
{
< 12500.0, 1500.0, -500.0 >,
rgb < 0.72265625, 0.8046875, 0.80859375 > // *10.0
}
plane {y,-1000 pigment {rgb <0.9,0.95,1>}}
#declare MyRadius = 200.0;
#declare MyOuterBalloonFinish = finish
{
brilliance 1.50
phong albedo 0.05
phong_size 5
specular 0.5
roughness 0.05
metallic 0.00
ambient 0.00
emission 0.00
reflection {0.050,0.15}
}
#declare MyInnerBalloonFinish = finish
{
brilliance 1.50
phong albedo 0.05
phong_size 5
specular 0.5
roughness 0.05
metallic 0.00
ambient 0.00
emission 0.00
reflection {0.050,0.15}
}
#declare PositiveBump=
normal {
bump_map {
png "spaceballoon2bumpmap" map_type 0 interpolate 2
}
bump_size 0.1
translate -0.5
rotate < 90.0, 0.0, 0.0 >
scale MyRadius*2
}
#declare NegativeBump=
normal {
bump_map {
png "spaceballoon2bumpmap" map_type 0 interpolate 2
}
bump_size 0.1
translate -0.5
rotate < 90.0, 0.0, 0.0 >
scale -MyRadius*2
}
#declare MyOuterBalloonTexture = texture
{
pigment
{
image_map { png "spaceballoon2bumpmap" gamma 1
map_type 0 interpolate 2 once transmit all 0.5}
translate -0.5
rotate < 90.0, 0.0, 0.0 >
scale MyRadius*2
}
normal { gradient y
normal_map {
[0.5 PositiveBump]
[0.5 NegativeBump]
} // end normal_map
scale <1,MyRadius*2,1>
} // end normal
finish { MyOuterBalloonFinish }
}
#declare MyInnerBalloonTexture = texture
{
pigment { color rgb < 0.7686275, 0.7607843, 0.7333333 > transmit 0.5 }
normal { gradient y
normal_map {
[0.5 PositiveBump]
[0.5 NegativeBump]
} // end normal_map
} // end normal
finish { MyInnerBalloonFinish }
}
#declare UpperBalloonShape = torus // Balloon Radius: 175 m /
//Launcher Radius: 10 m
{
95.0, 105.0
scale < 1.0, 0.5, 1.0 >
}
#declare LowerBalloonShape = difference
{
sphere { < 0.0, 0.0, 0.0 >, MyRadius }
cylinder { < 0.0, 0.0, 0.0 >, < 0.0, MyRadius+0.001, 0.0 >, MyRadius+0.001 }
scale < 1.0, 1.5, 1.0 >
}
#declare MyBalloonHullOutside = union
{
object { UpperBalloonShape }
object { LowerBalloonShape }
texture { MyOuterBalloonTexture }
}
#declare MyBalloonHull = difference
{
object { MyBalloonHullOutside }
object
{
MyBalloonHullOutside
scale 0.99999
texture { MyInnerBalloonTexture }
}
cylinder // Launcher Openings
{
< 0.0, -((MyRadius*1.5)+0.001), 0.0 >, < 0.0, (MyRadius+0.001), 0.0 >, 3.5
texture { MyInnerBalloonTexture }
}
}
#declare Launcher = difference
{
union
{
#declare MyLength = 10.0;
#declare MyHeight = 0.0;
#declare MyTop = 35.0;
cylinder { < 0.0, -((MyRadius*1.5)+30.0), 0.0 >, < 0.0, MyTop, 0.0 >, 3.5 }
box { < MyLength, -MyHeight, -0.1 >, < -MyLength, MyTop, 0.1 >
rotate <0.0, 000.0, 0.0 > }
box { < MyLength, -MyHeight, -0.1 >, < -MyLength, MyTop, 0.1 >
rotate <0.0, 045.0, 0.0 > }
box { < MyLength, -MyHeight, -0.1 >, < -MyLength, MyTop, 0.1 >
rotate <0.0, 090.0, 0.0 > }
box { < MyLength, -MyHeight, -0.1 >, < -MyLength, MyTop, 0.1 >
rotate <0.0, 135.0, 0.0 > }
box { < MyLength, -MyHeight, -0.1 >, < -MyLength, MyTop, 0.1 >
rotate <0.0, 180.0, 0.0 > }
box { < MyLength, -MyHeight, -0.1 >, < -MyLength, MyTop, 0.1 >
rotate <0.0, 225.0, 0.0 > }
box { < MyLength, -MyHeight, -0.1 >, < -MyLength, MyTop, 0.1 >
rotate <0.0, 270.0, 0.0 > }
box { < MyLength, -MyHeight, -0.1 >, < -MyLength, MyTop, 0.1 >
rotate <0.0, 315.0, 0.0 > }
}
cylinder { < 0.0, -((MyRadius*1.5)+30.001), 0.0 >,
< 0.0, MyTop+0.001, 0.0 >, 3.3 }
pigment { color rgb 1.0 }
}
#declare DoublePositionLight = union
{
union
{
cylinder { < 0.0, 0.0, 2.5 >, < 10, 0.0, 2.5 >, 0.20 }
cylinder { < 0.0, 0.0, -2.5 >, < 10, 0.0, -2.5 >, 0.20 }
pigment { color rgb < 0.05, 0.05, 0.05 > }
finish { MyOuterBalloonFinish }
}
union
{
sphere { < 10.0, 0.0, 2.5 >, 0.35 }
sphere { < 10.0, 0.0, -2.5 >, 0.35 }
pigment { color rgbf < 1.0, 0.0, 0.0, 0.5 > }
finish { emission rgb < 0.3, 0.1, 0.1 > }
}
union
{
light_source
{
< 10.25, 0.0, 2.5 >,
rgb 1//< 0.7, 0.0, 0.0 > // *10.0
fade_distance 15.0
fade_power 2
}
light_source
{
< 10.25, 0.0, -2.5 >,
rgb 1//< 0.7, 0.0, 0.0 > // *1.0
fade_distance 15.0
fade_power 2
}
}
}
#declare PositionLights = union
{
#declare MyDistance = MyRadius-0.1;
object { DoublePositionLight translate < MyDistance, 0.0, 0.0 >
rotate < 0.0, 000.0, 0.0 > }
object { DoublePositionLight translate < MyDistance, 0.0, 0.0 >
rotate < 0.0, 045.0, 0.0 > }
object { DoublePositionLight translate < MyDistance, 0.0, 0.0 >
rotate < 0.0, 090.0, 0.0 > }
object { DoublePositionLight translate < MyDistance, 0.0, 0.0 >
rotate < 0.0, 135.0, 0.0 > }
object { DoublePositionLight translate < MyDistance, 0.0, 0.0 >
rotate < 0.0, 180.0, 0.0 > }
object { DoublePositionLight translate < MyDistance, 0.0, 0.0 >
rotate < 0.0, 225.0, 0.0 > }
object { DoublePositionLight translate < MyDistance, 0.0, 0.0 >
rotate < 0.0, 270.0, 0.0 > }
object { DoublePositionLight translate < MyDistance, 0.0, 0.0 >
rotate < 0.0, 315.0, 0.0 > }
}
union
{
object { MyBalloonHull }
object { Launcher }
// object { PositionLights }
}
background { rgb < 0.02392157, 0.03490196, 0.04627451 > }
Post a reply to this message
Attachments:
Download 'spaceballoon2bumpmap.png' (3960 KB)
Preview of image 'spaceballoon2bumpmap.png'
|
|