POV-Ray : Newsgroups : povray.unofficial.patches : texturing ideas : Re: texturing ideas Server Time
28 Sep 2024 16:52:00 EDT (-0400)
  Re: texturing ideas  
From: Hugo Asm
Date: 10 Mar 2004 17:19:31
Message: <404f9473@news.povray.org>
>   Can you suggest an implementation which doesn't consume
> tons of memory and is as fast to render as the current when
> those extra features are not used?

Without having much experience with C or C++ not to mention the POV-Ray
source, I have an idea:

When the scene parses, optimised code for each texture can be generated in
memory. By optimised I mean, a block of memory is set aside for each unique
material and the code necessary to produce that material is generated. This
leaves out checking if features are on/off during rendering. It does consume
a bit of extra memory, but hardly tons of it. The same memory block could
even be used for several textures with different values to them, as long as
they use only the same set of features.

By the way, I wonder how much computation time is needed for a material to
have a 'switch / case' statement. Each 'case' being a feature on/off. It
doesn't sound like a big penalty?

Regards,
Hugo


Post a reply to this message

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