POV-Ray : Newsgroups : povray.general : Blend map error question Server Time
7 Aug 2024 17:29:07 EDT (-0400)
  Blend map error question (Message 1 to 8 of 8)  
From: Jim Kress
Subject: Blend map error question
Date: 22 Jun 2001 17:37:47
Message: <3b33baab@news.povray.org>
Just got the error:

Blend_Map too long

Anybody know the maximum allowed length of a blend_map?

Thanks.

Jim


Post a reply to this message

From: Jim Kress
Subject: Re: Blend map error question
Date: 22 Jun 2001 17:40:57
Message: <3b33bb69@news.povray.org>
Also, I am using megapov 0.7 so I posted this question in the unofficial
patches area, too.

Jim

"Jim Kress" <dea### [at] kressworkscom> wrote in message
news:3b33baab@news.povray.org...
> Just got the error:
>
> Blend_Map too long
>
> Anybody know the maximum allowed length of a blend_map?
>
> Thanks.
>
> Jim
>
>


Post a reply to this message

From: Ron Parker
Subject: Re: Blend map error question
Date: 22 Jun 2001 17:58:39
Message: <slrn9j7fsi.54i.ron.parker@fwi.com>
On Fri, 22 Jun 2001 17:37:45 -0400, Jim Kress wrote:
>Just got the error:
>
>Blend_Map too long
>
>Anybody know the maximum allowed length of a blend_map?

256


-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Jim Kress
Subject: Re: Blend map error question
Date: 22 Jun 2001 18:01:24
Message: <3b33c034@news.povray.org>
Thanks Ron.  Any way to make that bigger without code modification?

Jim

"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On Fri, 22 Jun 2001 17:37:45 -0400, Jim Kress wrote:
> >Just got the error:
> >
> >Blend_Map too long
> >
> >Anybody know the maximum allowed length of a blend_map?
>
> 256
>
>
> --
> #macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z
a-z)R(a
> -z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F
T)merge{
> P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission
3-T}}}#end
> Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Ron Parker
Subject: Re: Blend map error question
Date: 22 Jun 2001 18:02:25
Message: <slrn9j7g3j.54i.ron.parker@fwi.com>
On Fri, 22 Jun 2001 18:01:22 -0400, Jim Kress wrote:
>Thanks Ron.  Any way to make that bigger without code modification?

You can sometimes get away with nesting blend maps, but that can get very
ugly very quickly.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Jim Kress
Subject: Re: Blend map error question
Date: 23 Jun 2001 13:26:18
Message: <3b34d13a@news.povray.org>
Thanks Ron.  Would you please point me to an example of how to nest the
blend maps?

Jim

"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On Fri, 22 Jun 2001 18:01:22 -0400, Jim Kress wrote:
> >Thanks Ron.  Any way to make that bigger without code modification?
>
> You can sometimes get away with nesting blend maps, but that can get very
> ugly very quickly.
>
> --
> #macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z
a-z)R(a
> -z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F
T)merge{
> P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission
3-T}}}#end
> Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Ron Parker
Subject: Re: Blend map error question
Date: 25 Jun 2001 10:08:10
Message: <slrn9jeheb.27n.ron.parker@fwi.com>
On Sat, 23 Jun 2001 13:26:16 -0400, Jim Kress wrote:
>Thanks Ron.  Would you please point me to an example of how to nest the
>blend maps?

I would have sworn someone posted something about this here before, but 
none of my searches just now turned up anything useful, so here's a rather
simplistic example.  Of course you could automate this whole process, and
even put the various parts in an array to make the while-loop more manageable.
In this example, each part can consist of up to 255 entries, for a total in
the nested map of 1275 entries.  You could, of course, use up to 255 parts 
for a ridiculous number of entries.  Note that this method will slow down 
rendering, so if your scene already takes a long time to render it won't be 
practical.

#declare Part1=pigment{
  gradient x 
  color_map{
    [0 rgb 0]
    // ... lots and lots of entries ...
    [.2 red 1]
  }
} 
#declare Part2=pigment{
  gradient x 
  color_map{
    [.2 red 1]
    // ... lots and lots of entries ...
    [.4 red 1 green 1]
  }
} 
#declare Part3=pigment{
  gradient x 
  color_map{
    [.4 red 1 green 1]
    // ... lots and lots of entries ...
    [.6 green 1]
  }
} 
#declare Part4=pigment{
  gradient x 
  color_map{
    [.6 green 1]
    // ... lots and lots of entries ...
    [.8 blue 1]
  }
} 
#declare Part5=pigment{
  gradient x 
  color_map{
    [.8 blue 1]
    // ... lots and lots of entries ...
    [1 rgb 0]
  }
} 

#declare Nested=pigment{
  gradient x
  pigment_map{
    [ 0 Part1][.2 Part1]
    [.2 Part2][.4 Part2]
    [.4 Part3][.6 Part3]
    [.6 Part4][.8 Part4]
    [.8 Part5][ 1 Part5]
  }
}

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: Jim Kress
Subject: Re: Blend map error question
Date: 25 Jun 2001 23:16:02
Message: <3b37fe72$1@news.povray.org>
Thanks!  I'll give it a try.

Jim

"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On Sat, 23 Jun 2001 13:26:16 -0400, Jim Kress wrote:
> >Thanks Ron.  Would you please point me to an example of how to nest the
> >blend maps?
>
> I would have sworn someone posted something about this here before, but
> none of my searches just now turned up anything useful, so here's a rather
> simplistic example.  Of course you could automate this whole process, and
> even put the various parts in an array to make the while-loop more
manageable.
> In this example, each part can consist of up to 255 entries, for a total
in
> the nested map of 1275 entries.  You could, of course, use up to 255 parts
> for a ridiculous number of entries.  Note that this method will slow down
> rendering, so if your scene already takes a long time to render it won't
be
> practical.
>
> #declare Part1=pigment{
>   gradient x
>   color_map{
>     [0 rgb 0]
>     // ... lots and lots of entries ...
>     [.2 red 1]
>   }
> }
> #declare Part2=pigment{
>   gradient x
>   color_map{
>     [.2 red 1]
>     // ... lots and lots of entries ...
>     [.4 red 1 green 1]
>   }
> }
> #declare Part3=pigment{
>   gradient x
>   color_map{
>     [.4 red 1 green 1]
>     // ... lots and lots of entries ...
>     [.6 green 1]
>   }
> }
> #declare Part4=pigment{
>   gradient x
>   color_map{
>     [.6 green 1]
>     // ... lots and lots of entries ...
>     [.8 blue 1]
>   }
> }
> #declare Part5=pigment{
>   gradient x
>   color_map{
>     [.8 blue 1]
>     // ... lots and lots of entries ...
>     [1 rgb 0]
>   }
> }
>
> #declare Nested=pigment{
>   gradient x
>   pigment_map{
>     [ 0 Part1][.2 Part1]
>     [.2 Part2][.4 Part2]
>     [.4 Part3][.6 Part3]
>     [.6 Part4][.8 Part4]
>     [.8 Part5][ 1 Part5]
>   }
> }
>
> --
> plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip
x}rotate
> z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red
1rotate 60
> *z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb
z}text{ttf"arial.ttf"
> "RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron
Parker


Post a reply to this message

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