Forum

Optimizing Textures

Hi,

I have some general questions about textures, because Im a Noob to this and I need to fasten my performance by optimizing textures.

Mip Map Count:
-What happens if I put it to “From File”-Mode. Does it fasten or slow the system.
-Why are all amounts in “mm”. Is there any relationship to pixels?

In,short how works the videotexture node?
-Does it buffer?
-Depends it of the video framerate?

Animated texture vs Video:
I made a little module, that buffers some texture and plays it in a loop. Like an animated Gif at 5fps.
-Is this faster than video, in general? Or does it depends at resolution? Because I switched off a background video (with some video loops) and it raises the Vvvvpower by 9 fps! (360x278px, fast HuffYuv Codec)
-Or do you know an other fat Cpu-less Codec with small MBs?
-Or could I try to slow the fps of the video? Does it make sense?

Too much questions I know …
Ciao Frank

good questions. i suspect you already read through http://en.wikipedia.org/wiki/Mipmap

What happens if I put Mip Map Count to “From File”-Mode. Does it fasten or slow the system?

if you need mipmaps they can give tremendous performance boosts when rendering small textured polygons. when not needed they are slower. you can try the performance implications by setting the MipFilter pin on the Filter node to different settings. Even when not used, they will slowdown loading, and consume memory as the image needs to be scaled several times.

“From File” specifies that all mipmaps get loaded from the file. Note that the more well known graphic formats like jpg, png or bmp all do not support mipmaps - so setting to “From File” in most cases equals to the setting 1mm. Only dds files support embedded mipmaps. Loading embedded mipmaps might be faster than calculating them during load.

Why are all amounts in “mm”. Is there any relationship to pixels?

no - the number specifies the number of mip levels.

Does the videotexture buffer?

no, it will just display the current frame of the video. it uses directshow to play back the video, so in case directshow does not deliver the right frame in time, it will not be there.

Depends the videotexture of the video framerate?

setting waitforframe to 1 will make vvvv wait until the videoframe is there. this usually makes sense, but it will slow down your patch to the frame rate of the video.

Animated texture vs Video: Is this faster than video, in general?

textures get played from the graphic cards ram (or if this is fully used, from the main memory) videos get played from disk and need to be decoded before they can be shifted to the graphic card. the performance difference is at least something like a factor of 1000. so go for textures whenever possible, but you will get only short loops in memory.

Or do you know an other fat Cpu-less Codec with small MBs

some of the older quicktime codecs seem to give good results - install quicktime alternative and try them.

FAQ Codecs is supposed to be a place to collect wisdom on these topics, but it seems to be not quite used - so please report your findings there - its a wiki!

Thanks for this very good answer.

I put a little sentence in the wiki, about a (disturbing) bug with HuffYuv. Later more.

Thanks
Ciao Frank

Animated texture vs Video:
I made a little module, that buffers some texture and plays it in a loop. Like an animated Gif at 5fps.

tonfilm has been using compressed textures HowTo Prepare Textures to increase the number of images that fit into RAM. Playback performance was very impressive, of course.
perhaps you can ask him about his tfsctool and how he’s progressing…

hey, isn’t it your diploma presentation next monday??

cheers
max