Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Animated Volume Texture

Views: 120 | Comments: 6   


I put a lot of work into the Pixmap class because I wanted to be able to load, manipulate, and save images in DDS format with all features supported. Here I loaded a sprite sheet, copied the cells into different pixmaps, then save an array of pixmaps as a volume texture. Scrolling the W component of the UVW texture coordinate results in a smooth transition between animation frames.

With this approach, water, fire, explosions, as well as animated sprites can each be stored in a single DDS volume texture and loaded at once. The volume texture can be applied to a material for easy texture animation, in a standard file format that can be opened in many programs, and it supports compressed texture formats.

Here's a sample:

out.dds

  • Like 1

User Feedback


1 hour ago, reepblue said:

Make sure texture scrolling works too. I recall you implementing it a while back but I recall there being something off with it. It's been like 2 years so memory is a little fuzzy.

I think what I am going to do is have a separate shader family that uses the entity colors for texture scrolling on the UVW axes. So you can have per-entity texture scrolling / texture animation or per-entity colors, but not both at the same time.

Link to comment
Share on other sites
1 hour ago, Josh said:

Good idea!

Make sure texture scrolling works too. I recall you implementing it a while back but I recall there being something off with it. It's been like 2 years so memory is a little fuzzy.

Link to comment
Share on other sites


Guest
Write a comment

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...