Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Texturing Terrain - Stretching  (Read 184 times)
Qbasic8
Customers
Community Member
*****
Posts: 62

Nothing Is Funner Then DirectX Coding.


WWW
« on: October 04, 2008, 09:41:24 PM »

Hello everybody. It's been awhile but I'm back. Anyhow... I have a Terrain 16x16 (Just testing..) it is Average. I have a texture of grass on it. My problem is this. In the game the terrain is dynamic. People can cast spells to manipulate the land height. But in doing so, raising the terrain too much causes the texture to stretch and look like crap. What are some idea's too work around this? It's a BIG game so I need something that is not going to kill FPS as well. Any idea's?
Logged

Populous - Tribal Conquest. 25% completed.
Insomnia
Community Member
*
Posts: 23


WWW
« Reply #1 on: October 05, 2008, 05:11:18 AM »

In the Tv3D example projects on this website you can download a tutorial how to paint textures on certain areas of a terrain, like with a pen. This is not exactly what you're looking for, but with a derivation of this painting method you can maybe solve your problem.
Logged

Lenn
Customers
Community Member
*****
Posts: 454

Ivan Miskelic


« Reply #2 on: October 05, 2008, 05:38:58 AM »

You can calculate if a newly modified terrain has changed in slope too much, and if it's too steep, remap it by mapping a texture on the stretched out heights with compressed UVs (range -1 to 2 instead of 0 to 1 per tile for example). You should look into per-chunk texturing. That way, you can even blend the same texture into two splatting layers and have smooth transitions between the stretched, and unstretched texture (flat and sloped land) by dynamicaly creating the alpha map (along with terrain changes) which will decide how each splatting layer is shown. You can have 1 base + 3 additional layers per chunk with good speed (PS1) or even more but it will slow down (usage of PS2).

The only thing is - you'd have to code all of this yourself. Wink
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks