simple machines forum

Please login or register.

Login with username, password and session length
 

News:

Remember to make your own backup of posts before submitting.

 
 

Author Topic: Working on shaped/animated shadow textures  (Read 1871 times)

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« on: September 13, 2023, 02:35:59 AM »

I'm trying to generate shadow textures in x2mdl. I'm planning on packing these into ico (icon) files and putting one image in each RGBA channel. To draw them I think R and A images will need to be identical on subsequent frames. I don't know if they'll be doubled in the ICO file or not, but they'd need to be unpacked that way if not.

The idea is to blend between 4 frames in the shader. Only 2 frames will be needed but the others will still be calculated since they're in the same textures. They're just color channels after all. It'll probably slow down model conversion because the blurring effect has to pull in a bunch of pixels for each pixel, and there will be one of these for each animation frame.

I hope it will be worth it. For the Viper monster a round circle really doesn't make sense.

EDITED: Note, this image is a kraken's from KF2. I got this by doing 2 passes. The first pass just blurs everything by a 4 pixel radius. (It looks like more than 4 pixels because the white pixel 4 pixels from the edge is darkened and the dark pixel 4 pixels inside the edge is also lightened.) It needs to be that big to not look aliased. Antialiasing (multisample) isn't used because a height map is generated to produce some effects like you get if you are directly underneath a light. Unfortunately it's a little strange to be directly under a light all the time, but it's a little better than the fully abstract circle I think.
« Last Edit: September 13, 2023, 02:45:12 AM by Holey Moley »
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #1 on: September 23, 2023, 09:03:58 PM »

Here's an early look at custom generated shadows. I'm thinking this is a big improvement. It's taken a lot of time to work out the details, and I'm only about 1/3rd the way through probably. I think I'll take a break and leave them as "static" images for right now.
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts