Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need help with texturing terrain

Author
Message
Checker
20
Years of Service
User Offline
Joined: 23rd Feb 2004
Location:
Posted: 24th Feb 2004 02:33
I’m using DBPro. I would like to stretch a texture over an entire terrain object. The documentation says that the texture will be tiled and this is exactly what happens, but I don’t want it tiled. The texture is approximately the same size as the terrain heightmap. Can someone point me to something in the documentation or an example that will help me. Thanks.
GCEclipse
22
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: United Kingdom
Posted: 25th Feb 2004 00:42
Its certainly possible but use a matrix instead of Terrain object. I've attached a source code I wrote where a heightmap and landscape texture are loaded and created as a matrix.

Take a look at the screenshot thats about the best I could get with matrixes. Hope the source code helps you and others.

http://www.eclipsedevelopment.co.uk/Landscape.zip

and an image of it:



Seraf
20
Years of Service
User Offline
Joined: 22nd Feb 2004
Location:
Posted: 25th Feb 2004 06:39 Edited at: 25th Feb 2004 06:44
Wow that looks so cool ^^ I'm still a noob with DB lol, I'm amazed at that.


--

How come that doesn't work?

--
Checker
20
Years of Service
User Offline
Joined: 23rd Feb 2004
Location:
Posted: 25th Feb 2004 07:49
It took a little while to get access to the file but it was well worth it! Great example! Many thanks!
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 25th Feb 2004 21:53
this is good, Matrix you say?
I didnt think that sort of textureing was possible on a matrix..

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
GCEclipse
22
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: United Kingdom
Posted: 26th Feb 2004 11:19
My code shows you how. Download from the link above. Shows you how to do a nice sky as well.

I think I also kind of did them in functions for portability, so I think the code would be fairly easily transferable to your own projects.

diablo fan
20
Years of Service
User Offline
Joined: 7th Jan 2004
Location: michigan usa
Posted: 29th Feb 2004 11:03
i got the code but my water is black and my sky is blue. i dont have time to debug it now.i just thought it was strange.

please dont make fun of my spelling,or sentence structure.Id rather study math or programming

Login to post a reply

Server time is: 2024-11-26 07:41:46
Your offset time is: 2024-11-26 07:41:46