POV-Ray : Newsgroups : povray.general : Images and memory usage? : Re: Images and memory usage? Server Time
1 Aug 2024 14:35:23 EDT (-0400)
  Re: Images and memory usage?  
From: Tom York
Date: 11 Sep 2005 01:05:01
Message: <web.4323b7d388fc5405e0d101b60@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   Actually I'm not sure if it's possible at all.
>
>   You could try, however, to see what happens if you #declare your pigment
> as an identifier and then use it in a pigment function. I haven't actually
> tried if POV-Ray copies the image data for the pigment function or not.
>   It it doesn't then you can use the declared pigment as the pigment of
> your object and the function as a pattern in your normal block (with
> something like normal { function { TheImage(x,y,z).gray } ... }).

Thanks, Warp! That method does fix the memory use issue! I'm left with a
question about using pigment functions in normals; it seems to me that they
produce an image which is similar, but not identical to the case where a
pigment is used directly in a normal. For instance, if you use something
like

normal {
  cells
  scale 0.4
}

in a texture, the resulting normal seems "more concentrated"* than if you
use
cells in a function and then use the function in the normal block, say:

#declare Nfunc = function { pigment { cells scale 0.4 } }

normal { function { Nfunc(x,y,z).gray } }

Using bump_size to reduce the normal strength just makes the pattern
fainter, not closer to the ordinary pattern-in-normal version. It seems to
happen with pigments based on external images, or on the cells,
cylindrical, or onion patterns (I haven't tested others).

*I will post an example in p.b.i.


Post a reply to this message

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