POV-Ray : Newsgroups : povray.general : Optimizing textures : Re: Optimizing textures Server Time
7 Aug 2024 23:24:00 EDT (-0400)
  Re: Optimizing textures  
From: Geoff Wedig
Date: 2 May 2001 08:10:13
Message: <3aeff925@news.povray.org>


> Well, I'm currently testing a simple plane with a custom texture and a pigment
> map
> and a single light source.
> When the texturing function is the quickest code ( "{ return 0.0 }" ), my render
> time
> is 40s. 
> With some computations, it can go up to 43s.
> (Test without any AA, so always same number of rays)
> So the slow part is probably not the texture computation. 
> (no point in trying to optimize by 10% a code section which is only responsible
> for 10% of the time: the resulting boost would only be of 1% ! Better optimizing
> the part which is responsible of the 90%, and then only try to optimize the
> textures code.

> I would suggest you do the same kind of experiment with 
> all the standard POV textures, and then bring us your results.

Well, I have a complex texture over many objects.  The outermost layer of
texturing is a gradient.  If I add a check in the object loop for it's
placement, and if it's within the bounds of one of the gradients
sub-textures, I use that, otherwise, use the complex gradient texture.

This has given me significant speed up.  About 2-3 times faster, in fact. 
I'm sure it's the interaction between the number of objects and the
complexity of all the textures, but that sort of difference does point me
towards optimization of my textures.  It's obviously a subtle interaction
between the textures and the objects, but I'm not sure what that interaction
might be, nor how to quantify it, since it may only be the object type
(which is an isosurface, and therefore complex and time consuming in its own
right)

If I use a plain texture (single color) for the objects, I get another bit
of speed up, but it's not very much (perhaps the 10% you mentioned), so the
major thing would seem to be the layering.  I need to do some
experimentation, and get some firmer results, but it's hard.

Geoff


Post a reply to this message

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