Monday, April 18, 2011

Torch flame



I was trying to get the animated torch flame thing to work, and came across a problem! The javascript file Seth emailed me animates textures by tiling and offsetting, which will make the texture slightly (or incredibly) blurry when it gets resized into position, despite the resolution of the texture.

I took the original low-res torch animation (which had each flame tile at like 64x64 resolution), resized it to be 8 times as big, and added a noisy texture over it to fake detail in a really cheap way. There is a still frame of the enlarged flame on torch 4. The original texture is on torch 3.

The enlarged texture on torch 1 is the same one on torch 4, just animated. As you can see its ridiculously blurry, and might as well be 64 pixels tall. This is because torch 1 has a texture thats 24 tiles long and 1 tile high, and the tiling script ends up blurring it when it has to scale the texture down to animate it.

The enlarged texture on torch 3 has been tiled so its 6 tiles wide and 4 tiles tall, so its in a more square shape instead of one long rectangle. This makes it look like its supposed to, but I'm pretty sure you're still losing resolution (just not as much).

ANYWAY it was totally lame solving that problem. I'm going to need to align the texture I have on torch 3 because each row isn't aligned. But knowing is half the battle and that's the important part. I guess.


In the image above, from left to right:
1) 24 tiles wide, 1 tile tall (New texture, 8192x512)
2) 6 tiles wide, 4 tiles tall (New texture, 2048x2048)
3) 24 tiles wide, 1 tile tall (original low-res 1024x64 texture)
4) still frame (a single flame is 512 pixels tall)

addendum: why is it that every time I touch Unity I encounter ~dumb stuff~??? first it was the lighting, then it was the backface culling (aaaa) and now this


And here is the torch texture:


and here is a skull texture:

1 comment:

  1. Your wood isn't reading like wood. You need bigger, more pronounced wood grains.

    Use examples from real life as well as other hand-painted woods.

    Random person from Polycount:

    http://i811.photobucket.com/albums/zz39/mheyman/woodWIP.jpg

    Tina Wang (an LCAD graduate who now works at Blizzard):

    http://onomatotina.com/

    Tina has excellent hand-painted stuff. Use this as inspiration.

    I urge you to use references when hand-painting textures. Use references from real life and from other artists.

    I know you might not have time to fully render a hand-painted texture, but I know you can push yourself a little bit further right now. ;)

    ReplyDelete