POV-Ray : Newsgroups : povray.general : Optimizing textures Server Time
8 Aug 2024 01:23:28 EDT (-0400)
  Optimizing textures (Message 1 to 3 of 3)  
From: Geoff Wedig
Subject: Optimizing textures
Date: 1 May 2001 12:29:36
Message: <3aeee470@news.povray.org>
Has anyone done any work on optimizing textures?  Ie, is, for example, a
pigment_map or a texture_map faster?  Are layered textures better than a
texture map?

Since many textures can be accomplished in a variety of ways, it'd be good
to know which ones are faster than others.  I'm currently fighting a really
slow render, and I could really use something like this.

Geoff


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: Optimizing textures
Date: 2 May 2001 04:07:10
Message: <3AEFC083.90AF8AC@atosorigin.com>
Geoff Wedig wrote:
> 
> Has anyone done any work on optimizing textures?  Ie, is, for example, a
> pigment_map or a texture_map faster?  Are layered textures better than a
> texture map?
> 
> Since many textures can be accomplished in a variety of ways, it'd be good
> to know which ones are faster than others.  I'm currently fighting a really
> slow render, and I could really use something like this.
> 
> Geoff

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.


Post a reply to this message

From: Geoff Wedig
Subject: Re: Optimizing textures
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.