Jump to content
  • Advertisement
Sign in to follow this  
emmai

terrain multitexturing question...

This topic is 4856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

my terrain is 4 texture-layers(3 alphamaps between them for the weight),and one lightmap per patch.and I'm now render it like this: pass1:render the texture1 pass2:render the texture2(blend previous via alphamap1) pass3:render the texture3(blend previous via alphamap2) pass4:render the texture4(blend previous via alphamap3) pass5:blend the lightmap to the previous. the terrain looks well,but it takes 5 passes,and I want to get the same result via 3 passes like this(my card support 4 tex-units): pass1:render texture1 & texture2,and alphamap1 for the weight pass2:previous - alphamap2 - texture3 - alphamap3 - texture4 pass3:blend lightmap with previous but I can only do the pass1 well,and I don't know how to do pass2. can you help me? I'd searched this forum,but I havn't found the solution. best regards. EDIT: textures are all R8G8B8 format alphamaps are all 8bit grayscale,only alpha channel in them. lightmap is the same as alphamaps. I don't wanna use Shaders. thanks,trienco. [Edited by - emmai on December 2, 2005 3:37:26 AM]

Share this post


Link to post
Share on other sites
Advertisement
Are shaders an option? With 5 units you could blend all 4 textures in a single pass, but with the lightmap you would already need 6. Two passes then.

Unless your alphamap is doing something fancy that needs more than 1 channel, keep in mind each channel can have the weight for one texture.
1st pass: blend texture1,2 with alpha channel r,g modulate with lightmap
2nd pass: blend texture3,4 with alpha channel b,a modulate with lightmap

In theory, if there is an add blend mode that's what you would use for the 2nd pass.

Now, if you could get away with a base texture in color and use greyscale detail textures then blending all four textures would be a single dot product (each would be stored in one channel of a single texture).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!