tyFlow Forum
tyBitmap UVW sync - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: tyBitmap UVW sync (/thread-2217.html)



tyBitmap UVW sync - Adam Trowers - 02-12-2021

Hey Tyson

Thought I would put this on the forum rather than FB! 

Could I ask if this works as expected. When using the sync by UVW in tyBitmap  (I have simply put the event age into Map channel 2) at render time every single image in an image sequence is loaded into memory.

Working with 70 x 1000 frame sequences means it is impossible to use this function as it appears that every image is being loaded in at render time. I get to 60gb memory usage and have to end process etc.

I should note that I have been doing tests on just 2 x 200 frame sequences and it does seem to load all them into memory also. Hitting about 5gb memory for those.

Thanks!

Adam


RE: tyBitmap UVW sync - tyFlow - 02-12-2021

Hmm I'll look into it...


RE: tyBitmap UVW sync - tyFlow - 02-13-2021

So tyBitmap treats bitmaps the same way a normal Bitmap texmap does (because they share 99% of the same code)...in that it prepares all bitmaps ahead of rendering so that when rendering occurs the samplers are all ready. This unfortunately does involve loading all the data up front. In theory I assume it's possible to setup some kind of on-the-fly system that only loads a bitmap once its first sample is queried, but I think given the trajectory of Max to focus on OSL shaders, I'll defer adding that kind of optimization in lieu of OSL solutions which are probably better regardless (since tyBitmap/Bitmap rely on a lot of gross legacy code).

In other words...I don't see a reason why OSL couldn't query a frame based on a UVW.x frame value (the same way tyBitmap does) and such a system is likely going to be better regardless...so I'd suggest exploring that as a solution.