Advertisement

3D - TEXTURE TO TEXTURE blending

Started by August 04, 2000 02:52 PM
0 comments, last by Memir 24 years, 4 months ago
When my brother was designing a 3D level for a racing game we''re working on. He came across a problem when he had two types of Grass Textures. One was "Greeny-Yellow" & the other was "Greeny-Green" if such a color exists hehe. Anyway to make it look seemless we decided to make a third texture which blended between the two types of textures. But the most difficult bit was making the texture blend line up across the seem. I was wondering if anyone knew of any other approaches to defeat the ''seems''? /Memir
Flash Pool - Pool/Billiards game for Facebook (developed by Memir).
Here is one suggestion. At load time, you can create the third blended texture using the first two. The general flow would be something like,

1. Load Texture A (24 bpp)
2. Load Texture B (24 bpp)
3. Load blend pattern C (8 bpp)
4. Blend A and B using the 8 bit image C as a blending value.

Then, for each pixel (s, t) in the resulting texture D.

D(s, t) = ( C(s, t) * A(s,t)) + ( (1 - C(s, t)) * B(s, t)) / 256;

This allows you 256 blending levels between the two textures and will allow you to get rid of any seams. Further, you can create multiple blending patterns between the two textures. Blending patterns require only 1/3 the disk space.

Blending patterns can also be used to blend any two textures together that you want. This technique works great for things like snow.

I hope this helped.

- Carl

This topic is closed to new replies.

Advertisement