Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Texturing Landsapes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 anonymous_coward   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 April 2000 - 11:22 AM

What''s the best technique for texturing terran? The first method I thought of was to generate a large texture for the whole terrain, and then to split it up into the appropriately (read: maximally) sized pieces that the hardware can handle (256^2 for 3Dfx cards or 1024^2 or so for TNT cards). I tried to think of how one would tile texures across the whole of a terrain, but I can''t come up with any way do to that AND still have decent texture transitions AND have reasonable texture memory requirements. Any thoughts on this?

Sponsor:

#2 Phrantik   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 April 2000 - 03:07 PM

Yeh, tiling the texture IS the best way! It''s pretty simple really.. Just make sure you load the texture with the repeat parameter, as in:

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);

And then, in your render loop, break the texture up according to the position of the segment. Lets say your putting it together by stepping through an height map array terrain[x,z]. Try:

glTexCoord2f(x,z);
glVertex3f(-- first vertex data --);

glTexCoord2f(x,z+1);
glVertex3f(-- second vertex data --);

glTexCoord2f(x+1,z+1);
glVertex3f(-- third vertex data --);

glTexCoord2f(x+1,z);
glVertex3f(-- fourth vertex data --);

That prolly makes no sense, but I suck at explaining this stuff! Hope it helps.. =)


..:: Phrantik ::..

#3 anonymous_coward   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 April 2000 - 03:14 PM

I understand HOW to do it, my question was one more of theory. =)

Actually, what you said IS easy, but what about transitions between say, a sandy beach and grass? You could have a transition texture, but the whole scene would look rather bland and repetitive, meaning you''d have to cook up more textures.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS