Here is a HC terrain flyby, low res animation (MPEG compression):
http://diehard.ath.cx/~ftp/fanstuff/hc-flyby.avi
It would obviously look nicer with a decent texture.
If you open any Tres level in TresEd, then turn on "Show terrain objects", and select all of the base objects you will notice the grid layout. Why not a single object for the entire level, given that terrain looks more or less the same everywhere (exceptions being dirt, sand, rocky areas, and other "special" terrain objects)? The answer seems to be related to performance.
When developing the HC terrain I imported a base terrain object and examined its scale factor: 64. The entire HC level can be covered with only a 5x5 base object grid. But the fact is, it's possible to resize a single base object so that it covers almost the entire terrain in this level. Here I rescaled it to 256 (fourfold).
As you can see above I attempted to change its texture to something "nicer", that is:
The result was deceiving. Pixels in the bitmap texture became large squares in Trespasser, resulting in a patchy terrain:
This prompted me to explore the way texture is mapped to terrain objects in Trespasser. It turned out the texture of an original terrain base object is like a motif repeated multiple times to fill out the entire object, while my new texture was stretched to cover my single terrain object. I thought that all I needed to do was break my bitmap into a number of sectors equal to the number of base terrain objects and use the individual sectors as textures for these objects. But, as you know, the maximum size of a bitmap in Trespasser is 256x256 pixels. Given the size of the patches you can see in the screenshots above I calculated that, for the size of the HC level, I needed a grid of 128x128 base terrain objects. Unfortunately, that slowed down the game too much; even with a 64x64 grid the slowdown is significant when compared to a 5x5 grid. Well, that's too bad, so have a final look at this green shore from across the lake:
But wait, why not use a single base object, with the original Tres texture and mapping mode? Wouldn't that increase performance? I tried that too, and the answer is, here again, no. Possibly, the engine fine-renders terrain objects nearest Anne; if there is only one but it's too big (scale factor is too large) then CPU cycles may be wasted on applying the texture all across that object.
It appears the original Trespasser developer team have found the best trade-off: a reasonable number of base terrain objects for each level, with a simple, repeated bitmap texture, and extra terrain objects for special effects at various locations; there may be little, if anything, we can improve on terrain design/texture mapping at this point.
Tutorial: HC Terrain (2/3)
Moderators: scallenger, JPDS Team
Tutorial: HC Terrain (2/3)
Last edited by Troodon on Wed Apr 09, 2003 5:47 am, edited 7 times in total.
- Rebel
- -=TresCom Developer=-
- Posts: 6137
- Joined: Sun Nov 10, 2002 10:26 pm
- Location: That country nobody likes (you know the one)
- Contact:
Good job on the terrain, Troodon.
Castaway Final Release Link: https://www.mediafire.com/file/ro5qzl88 ... l.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
- Dapper Dan
- -=TresCom Elder=-
- Posts: 2010
- Joined: Tue Nov 12, 2002 7:43 am
- Location: South Carolina
- Contact: