Texture Blending

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Nuclear Bit
Posts: 6
Joined: Sun Oct 02, 2005 12:58 am

Texture Blending

Post by Nuclear Bit »

I am a bit lost in how exactly to use the texture blending function
GU_TFX_BLEND. I am working on a ROAM implementation for rendering terrain. Adding blended textures would be awesome (like grass, rock, snow).
Is there any sample showing how to deal with this function or anyone who has input in how to set the blending values?
I suppose you need to specifiy the blending factors as vertex values somehow...
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

I can tell you right now that ROAM is NOT the right algorithm for any modern graphics hardware, it's been dead for the last 5 years :)

PSP is just like a modern gaming PC, only smaller: it has a VERY strong GPU compared to the CPU. You should therefore shift as much work as possible onto the GPU and have the CPU process as little information as possible drawing graphics.

For a terrain this means breaking it up into square chunks, caching them and sending pointers to them to the GPU and let it handle them. This can be enhanced in various ways like "mipmapping" the chunks, etc.

And you can use a technique called "texture splatting" (google it) to apply various things like snow and dirt. Keep your snow and dirt textures in VRAM, and you should have more than enough fillrate.

I haven't written a terrain engine myself for the PSP so the above is "in theory", although I'm sure most graphics programmers would agree with most of my conclusions.
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Nuclear Bit
Posts: 6
Joined: Sun Oct 02, 2005 12:58 am

Post by Nuclear Bit »

ector wrote:I can tell you right now that ROAM is NOT the right algorithm for any modern graphics hardware, it's been dead for the last 5 years :)

PSP is just like a modern gaming PC, only smaller: it has a VERY strong GPU compared to the CPU. You should therefore shift as much work as possible onto the GPU and have the CPU process as little information as possible drawing graphics.

For a terrain this means breaking it up into square chunks, caching them and sending pointers to them to the GPU and let it handle them. This can be enhanced in various ways like "mipmapping" the chunks, etc.

And you can use a technique called "texture splatting" (google it) to apply various things like snow and dirt. Keep your snow and dirt textures in VRAM, and you should have more than enough fillrate.
So this would actually mean that the GPU can handle the LOD by itself?
I was not aware of this... can you confirm this?
that would be great of course.
holger
Posts: 204
Joined: Thu Aug 18, 2005 10:57 am

Post by holger »

texture LOD seems to work similiary to the mipmapping implemented by OpenGL.
Nuclear Bit
Posts: 6
Joined: Sun Oct 02, 2005 12:58 am

Post by Nuclear Bit »

yep, seems cool,
I just found an article talking about geomipmapping and geoclipmaps,
this seems to be the way to go on nowadays hardware.

(I used to program on pocketpc devices with no hardware acceleration at all,
so I'm used to doing all the 3d calcs on the cpu. looks like I need some reorientation on 3d programming)
Post Reply