POV-Ray : Newsgroups : povray.newusers : load texture once - render multiple images Server Time
23 Nov 2024 23:23:22 EST (-0500)
  load texture once - render multiple images (Message 1 to 10 of 10)  
From: 7dgedas
Subject: load texture once - render multiple images
Date: 20 Apr 2011 03:15:00
Message: <web.4dae87becbe7bd854267bf8e0@news.povray.org>
I am trying to render many scenes using povray. The key factor for me is speed
(server side rendering for user requests. Am I on my way with povray?).

I want to achieve this:
1) load some texture(s)
2) apply some camera transformations (transformations may depend on some
variable, differs each iteration)
3) output results to file
4) repeat 2-3 as many times as needed, avoiding 1.

The key point is to avoid loading textures, as it is relatively slow. I want to,
say, simply rotate object and save to file without loading textures each
time(theoretically no need for that at all).

I know there is animation posibility using .ini and clock variable, but how do i
avoid loading textures? :(


Post a reply to this message

From: Alain
Subject: Re: load texture once - render multiple images
Date: 20 Apr 2011 14:05:16
Message: <4daf205c@news.povray.org>

> I am trying to render many scenes using povray. The key factor for me is speed
> (server side rendering for user requests. Am I on my way with povray?).
>
> I want to achieve this:
> 1) load some texture(s)
> 2) apply some camera transformations (transformations may depend on some
> variable, differs each iteration)
> 3) output results to file
> 4) repeat 2-3 as many times as needed, avoiding 1.
>
> The key point is to avoid loading textures, as it is relatively slow. I want to,
> say, simply rotate object and save to file without loading textures each
> time(theoretically no need for that at all).
>
> I know there is animation posibility using .ini and clock variable, but how do i
> avoid loading textures? :(
>
>

You can't preload your textures for many renders. Each render start with 
a "clean slate".
There is one exception, but it can't output to a file.

What kind of textures?

For procedural textures, you can easily compile a custom My_texture.inc 
file that only contains the texture that you actualy do use and made 
available.


If the textures are images files, try to use some compressed format and 
don't use uncompressed ones like BMP, TGA or TIF/TIFF. The decompression 
takes lots less time that loading larger, uncompressed, files from disk.

To get the files size smaller, thus faster loading, try reducing the bit 
per pixel count. High colours (16 bits) or paleted colours (256 / 16 / 8 
/ 4 colours) will give smaler files than true colours.
Increase the compression ratio as much as possible.

Use tilling if possible.
Reduce the resolution of the image and use interpolation.

Try replacing image_map with procedural textures whenever possible.



Alain


Post a reply to this message

From: Christian Froeschlin
Subject: Re: load texture once - render multiple images
Date: 21 Apr 2011 04:33:36
Message: <4dafebe0$1@news.povray.org>
7dgedas wrote:

> The key point is to avoid loading textures, as it is relatively slow. I want to,
> say, simply rotate object and save to file without loading textures each
> time(theoretically no need for that at all).

This is currently not possible without modifying the source code.
If the texture is a large image file you might try storing it on a
virtual RAM disk so reloading will be fast.

Some time ago I made a little hack to the 3.7 beta sources that
allows to keep variables across frames (its mostly a matter of not
clearing the symbol table after each render), this was helpful to
make animations of large data sets. The license does not allow to
distribute modified beta versions, but I do intend to make this
available at some point after the final release of 3.7.


Post a reply to this message

From: Robert McGregor
Subject: Re: load texture once - render multiple images
Date: 21 Apr 2011 07:40:01
Message: <web.4db016f165491c5394d713cc0@news.povray.org>
"7dgedas" <nomail@nomail> wrote:
> I am trying to render many scenes using povray. The key factor for me is speed
> (server side rendering for user requests. Am I on my way with povray?).
>
> I want to achieve this:
> 1) load some texture(s)
> 2) apply some camera transformations (transformations may depend on some
> variable, differs each iteration)
> 3) output results to file
> 4) repeat 2-3 as many times as needed, avoiding 1.
>
> The key point is to avoid loading textures, as it is relatively slow. I want to,
> say, simply rotate object and save to file without loading textures each
> time(theoretically no need for that at all).
>
> I know there is animation posibility using .ini and clock variable, but how do i
> avoid loading textures? :(

I've not tried it yet myself, but if all you need to do is camera
transformations then clockless animation might do the trick for you (since it
only parses the scene file once). Read up on 3.1.2.1.6.1 Clockless Animation.

-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

From: 7dgedas
Subject: Re: load texture once - render multiple images
Date: 21 Apr 2011 08:35:01
Message: <web.4db023a565491c534267bf8e0@news.povray.org>
Thank you all for help. Clockless animation is really what i was looking for,
but it is only in version 3.7 i guess? Which is beta.
I actually misinterpreted texture load speed. It came out it should be fast
enough for me. There were another preceding operations (ImageMagick processing)
that were causing slow down.

Anyway, clockless animation is going to be quite cool feature i guess.


Post a reply to this message

From: Robert McGregor
Subject: Re: load texture once - render multiple images
Date: 21 Apr 2011 11:45:00
Message: <web.4db0502b65491c5386ff1d480@news.povray.org>
"7dgedas" <nomail@nomail> wrote:
> Thank you all for help. Clockless animation is really what i was looking for,
> but it is only in version 3.7 i guess? Which is beta.
> I actually misinterpreted texture load speed. It came out it should be fast
> enough for me. There were another preceding operations (ImageMagick processing)
> that were causing slow down.
>
> Anyway, clockless animation is going to be quite cool feature i guess.

You should download 3.7 and give it a try; it's not in beta anymore, it's
nearing RC4 and is very stable.

-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

From: Alain
Subject: Re: load texture once - render multiple images
Date: 21 Apr 2011 19:19:37
Message: <4db0bb89@news.povray.org>

> Thank you all for help. Clockless animation is really what i was looking for,
> but it is only in version 3.7 i guess? Which is beta.
> I actually misinterpreted texture load speed. It came out it should be fast
> enough for me. There were another preceding operations (ImageMagick processing)
> that were causing slow down.
>
> Anyway, clockless animation is going to be quite cool feature i guess.
>
>

Current version is 3.7 RC3. The beta stage is terminated.
It's very stable.
It fully take advantage of multiple core and CPUs.
It implement several improvements for many features.
It introduce some new ones.
In many cases, it's faster than 3.6.

clockless animation disable image file writing. This means that the 
result are only displayed on your screen, you can't view them later.
You can't render on one computer and have the result displayed on another.



Alain


Post a reply to this message

From: CAD-Andi
Subject: Re: load texture once - render multiple images
Date: 25 Apr 2011 19:15:00
Message: <web.4db5ff3d65491c53b642fbb20@news.povray.org>
>
> clockless animation disable image file writing. This means that the
> result are only displayed on your screen, you can't view them later.
> You can't render on one computer and have the result displayed on another.
>

I guess there are good reasons why clockless animation can't write the picture
to the harddisk. Can someone just give me a hint why? I really would like to
learn why something that is on my screen can't be saved to the hard disk.

It would be a GREAT and FANTASTIC thing if one could do at least pure camera
animations without re-parsing and re-loading everything again and again. This
bugs me since I first read about clockless rendering with povray. It feels like
if someone holds your favorite food right under your nose, but you are not
allowed to even get a little taste of it. Meanwhile I'm even thinking about
figuring out a bash script that runs in the background and that simply takes a
screen shot when povray spits out a message into some log file that the next
picture is ready. Before I start something ridiculous like that, I just would
like to know if povray will ever be able to save images and potentially "re-use"
chunks of geometry and images loaded in memory.

I know this has been discussed already before this, Is there a new take onto
this by now?

Andi

PS: Sorry if I sound a little frustrated, but I could really use this! I have a
basic understanding of Programming in general but am limited  to writing humble
bash scripts. I'm more of a user than a programmer and find myself absolutely at
the mercy of programmers that know really what they are doing. Povray is one of
my favorite programs. I appreciate all the effort that is put into it. THANKS!
:-)


Post a reply to this message

From: Alain
Subject: Re: load texture once - render multiple images
Date: 26 Apr 2011 13:13:47
Message: <4db6fd4b@news.povray.org>

>
>>
>> clockless animation disable image file writing. This means that the
>> result are only displayed on your screen, you can't view them later.
>> You can't render on one computer and have the result displayed on another.
>>
>
> I guess there are good reasons why clockless animation can't write the picture
> to the harddisk. Can someone just give me a hint why? I really would like to
> learn why something that is on my screen can't be saved to the hard disk.
>
> It would be a GREAT and FANTASTIC thing if one could do at least pure camera
> animations without re-parsing and re-loading everything again and again. This
> bugs me since I first read about clockless rendering with povray. It feels like
> if someone holds your favorite food right under your nose, but you are not
> allowed to even get a little taste of it. Meanwhile I'm even thinking about
> figuring out a bash script that runs in the background and that simply takes a
> screen shot when povray spits out a message into some log file that the next
> picture is ready. Before I start something ridiculous like that, I just would
> like to know if povray will ever be able to save images and potentially "re-use"
> chunks of geometry and images loaded in memory.
>
> I know this has been discussed already before this, Is there a new take onto
> this by now?
>
> Andi
>
> PS: Sorry if I sound a little frustrated, but I could really use this! I have a
> basic understanding of Programming in general but am limited  to writing humble
> bash scripts. I'm more of a user than a programmer and find myself absolutely at
> the mercy of programmers that know really what they are doing. Povray is one of
> my favorite programs. I appreciate all the effort that is put into it. THANKS!
> :-)
>
>

Some possible reasons for disabling image file writing:

A clockless animation, once started, will continue indefinitely until 
you stop it or there is some unanticipated error causing it to stop. It 
can very easily fill up any drive.

The frames are numberless, so you can't save them using unic names.

It allows to save some time by skipping the overhead of actualy saving 
the images to disk.

What you can do, is to take a screen shot of the image and save that to 
a file.


Alain


Post a reply to this message

From: clipka
Subject: Re: load texture once - render multiple images
Date: 10 May 2011 08:12:40
Message: <4dc92bb8@news.povray.org>
Am 26.04.2011 01:09, schrieb CAD-Andi:

> It would be a GREAT and FANTASTIC thing if one could do at least pure camera
> animations without re-parsing and re-loading everything again and again. This
> bugs me since I first read about clockless rendering with povray.
...
> Before I start something ridiculous like that, I just would
> like to know if povray will ever be able to save images and potentially "re-use"
> chunks of geometry and images loaded in memory.

I'm quite certain it will.

The simple reason why it doesn't yet is that there have been other, more 
pressing issues to address for the 3.7 release. By the way, that's 
probably why clockless animation is still pretty limited as well.

Christian already mentioned that he wrote a patch that would allow for 
keeping variables in memory from one frame of an animation to the next; 
I wouldn't be too surprised if that patch ended up in version 3.71.

> PS: Sorry if I sound a little frustrated, but I could really use this!

We know this would be a useful feature, and it's already on the agenda 
for future versions. Focus for 3.7, however, was to get multithreaded 
rendering to work. Aside from that, much energy went into ironing out 
some inconsistencies in existing features so we'll not have to change 
them right in the middle of the 3.7x series nor defer them for too long.


Post a reply to this message

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