Josh Posted June 18, 2022 Share Posted June 18, 2022 This is pretty cool. I used an AI upsampler to increase the size of my seed texture 2x. Then I generated water animation frames, loaded them all as pixmaps, and saved them as a single DDS volume texture like so: auto plg = LoadPlugin("Plugins/FITextureLoader"); std::vector<shared_ptr<Pixmap> > mipchain; auto path = GetPath(PATH_DESKTOP) + "/watermaker/frames"; for (int n = 0; n < 128; ++n) { auto pm = LoadPixmap(path+"/water1_" + String(n) + ".png"); pm = pm->Convert(TEXTURE_BC5); mipchain.push_back(pm); } SaveTexture(GetPath(PATH_DESKTOP) + "/water.dds", TEXTURE_3D, mipchain, 128, SAVE_GENMIPMAPS); In order to do this, I had to study Microsoft's documentation of the DDS file format layout here: https://docs.microsoft.com/en-us/windows/win32/direct3ddds/dds-file-layout-for-volume-textures The texture can be animated automatically just by setting the material texcoords animation on the z axis, so the shader smoothly blends in between the volume texture slices to show the animation. Very simple, in a single texture. The resulting file is 36 MB, in BC5 format, with mipmaps and 128 layers: https://github.com/Leadwerks/Documentation/blob/master/Assets/Materials/Animations/water1.dds Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted June 19, 2022 Share Posted June 19, 2022 One thing I missed coming from Source was animated textures. Glad we'll have them in Ultra Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.