|
|
So, I'm trying to take a bunch of textures and pick random ones and generate a
texture_map with those. (stolen from HOF pebbles.pov)
qtpovray gives me:
Parse Error: Must have at least one entry in map.
at File: TwistedSoaCheP.pov Line: 209 Col: 20
So I'm wondering why it doesn't register any entries.
I'm also wondering how I take the current erroneous state of the texture map and
output it to the debug stream, so I can actually see what's wrong.
#declare TexArray = array [21];
#declare Texture_Map =
texture_map {
#for (Tex, 0, 20)
[ Tex/20
//texture {
// Add the default texture
PebbleNormalAndFinish
pigment {
// Select a random pattern.
PebblePatterns[rand(RandPat)*PebblePatternCount]
color_map {
// Choose a random colour scheme.
PebbleColours[rand(RandCol)*PebbleColourCount]
}
}
// Randomize the pattern's position and rotation.
translate <rand(RandPat)*100, rand(RandPat)*100, rand(RandPat)*100>
rotate <rand(RandPat)*360, rand(RandPat)*360, rand(RandPat)*360>
]
//} // end texture
/*
// Decide randomly which of the dirt/speckle/line overlay textures we
want to use.
#declare DecalLoop = 0;
#while (DecalLoop < DecalPatternCount)
#if (rand(RandPat) < 0.2)
texture
{
PebbleNormalAndFinish
DecalPatterns[DecalLoop]
translate <rand(RandPat)*100, rand(RandPat)*100,
rand(RandPat)*100>
rotate <rand(RandPat)*360, rand(RandPat)*360, rand(RandPat)*360>
}
#end
#declare DecalLoop = DecalLoop + 1;
#end
*/
#end
}
#declare TexArray = array [21];
#declare Texture_Map =
texture_map {
#for (Tex, 0, 20)
[ Tex/20
//texture {
// Add the default texture
PebbleNormalAndFinish
pigment {
// Select a random pattern.
PebblePatterns[rand(RandPat)*PebblePatternCount]
color_map {
// Choose a random colour scheme.
PebbleColours[rand(RandCol)*PebbleColourCount]
}
}
// Randomize the pattern's position and rotation.
translate <rand(RandPat)*100, rand(RandPat)*100, rand(RandPat)*100>
rotate <rand(RandPat)*360, rand(RandPat)*360, rand(RandPat)*360>
]
//} // end texture
/*
// Decide randomly which of the dirt/speckle/line overlay textures we
want to use.
#declare DecalLoop = 0;
#while (DecalLoop < DecalPatternCount)
#if (rand(RandPat) < 0.2)
texture
{
PebbleNormalAndFinish
DecalPatterns[DecalLoop]
translate <rand(RandPat)*100, rand(RandPat)*100,
rand(RandPat)*100>
rotate <rand(RandPat)*360, rand(RandPat)*360, rand(RandPat)*360>
}
#end
#declare DecalLoop = DecalLoop + 1;
#end
*/
#end
}
It also doesn't like me trying to layer those. Maybe I can make an array of
layered textures, and populate the texture_map with those.
(I tried to make the texture map by defining textures as array entries, and then
building the texture_map that way - but same error.)
Post a reply to this message
|
|
|
|
OK, I got past the initial hurdle, and the texture_map is fine (apparently
POV-Ray didn't say that Texture_map was an invalid/undeclared identifier and
tried to use it anyway - the actual identifier is Texture_Map (capital M) )
So now I'm stuck trying to apply the commented out inner loop to make a layered
texture.
I get
Parse Error: Expected 'object or directive', texture found instead
at File: TwistedSoaCheP.pov Line: 173 Col: 14
The wiki shows:
#declare Layered_Examp =
texture {T1}
texture {T2}
texture {T3}
may be invoked as follows:
object {
My_Object
texture {
Layer_Examp
// Any pigment, normal or finish here
// modifies the bottom layer only.
}
}
{Notice also the typo error in the object texture - it should be
"Layered_Examp", not "Layer }_Examp"
So I will keep picking away at why it's not working.
Post a reply to this message
|
|