POV-Ray : Newsgroups : povray.general : 3.5 update in p.a.f-a-q : Re: 3.5 update in p.a.f-a-q Server Time
9 Aug 2024 01:20:12 EDT (-0400)
  Re: 3.5 update in p.a.f-a-q  
From: Nathan Kopp
Date: 4 Sep 2000 16:45:17
Message: <39b409dd$1@news.povray.org>
"Rune" <run### [at] inamecom> wrote...

> Aha, ok, but wouldn't you have to make sure the color_map goes from black
to
> white?

Yes.

> And isn't this method
> slower? It's like having a pattern, and base a pigment on that pattern,
and
> then converting the pigment back into a pattern.

Possibly, but the speed difference isn't as much as you might think.  This
technique uses 11 multiplications and 6 additions to do the conversions: 8
"extra" multiplications and 4 "extra" additions to do blend the color_map
entries, plus 3 mulitplications and 2 additions to convert to grey-scale.
(This is based on blending a single-component pattern value, as opposed to a
5-component color value, using 2 multiplications and 1 addition.)

Interestingly enough, though, using this instead of reset_children will
often eliminate the need to apply some warps to the child textures, which
could mean fewer matrix transformations.

-Nathan


Post a reply to this message

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