Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,654 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
terrain rendering #368860
04/28/11 23:18
04/28/11 23:18
Joined: Feb 2010
Posts: 68
mireazma Offline OP
Junior Member
mireazma  Offline OP
Junior Member

Joined: Feb 2010
Posts: 68
Hi there again.
Currently I'm looking for ways to optimize rendering and/or enhance the visual richness at the same time.
So I was thinking of these:

1. Can a terrain be rendered with more than 3 textures? (even by custom shaders). I feel the need for extra detail.

2. Can a terrain have a normal map?

3. Can a terrain benefit of parallax?

4. Can someone please enlighten me about the light map of a (large) terrain - is it one large texture? If so, how doesn't it cripple the performance (memory)?
I'm asking this also because I have an interest in using large textures for different purposes.


ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.
Re: terrain rendering [Re: mireazma] #368866
04/29/11 00:07
04/29/11 00:07
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
1. Yes
2. Yes
3. Yes
4. Yes. Although it might use another UV set. I don't see how memory is a problem for performance. As long as you don't exceeds the users VRAM there is no drawback in using more memory.


Always learn from history, to be sure you make the same mistakes again...
Re: terrain rendering [Re: Uhrwerk] #368913
04/29/11 12:43
04/29/11 12:43
Joined: Feb 2010
Posts: 68
mireazma Offline OP
Junior Member
mireazma  Offline OP
Junior Member

Joined: Feb 2010
Posts: 68
Thanks Uhrwerk. But come on, would you care to tell me more - where to look for the first 3?
Not sure 100% for 4 (more like 85 laugh ) but
A. lo mem = textures swapping more often
B. VRAM is slower even than system memory, albeit video mem.
C. I guess rendering time increases with texture size.
I'd be happy to be wrong.
I thought of using large transparent sprites to somehow simulate volumetric light (stop laughing). I suck at shaders.


ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.
Re: terrain rendering [Re: mireazma] #368915
04/29/11 13:06
04/29/11 13:06
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: mireazma
[...] come on, would you care to tell me more - where to look for the first 3?

You didn't asked where to get those smile tell us more about your specifications and you might get fruitful answers, directions and maybe, even maybe links wink

Quote:
Not sure 100% [...] but
A. lo mem = textures swapping more often
B. VRAM is slower even than system memory, albeit video mem.
C. I guess rendering time increases with texture size.


If you want to have a multitexturing shader, you have to sample for each pixel N colors for N mixed textures plus one or more texture samples for the blendmap, plus one sample for a lightmap, if you use one. If you use normalmaps, things might get complicated and you need two samples for each texture (1 texture and 1 normalmap fetch).

If you want one single texture fetch for color + normal, you could use a two-channel colorspace encoding scheme like RG color space (Technicolor, see Wikipedia) and only X and Y component of the normal, while you decode the color and the missing Z-component of the normal in the fragment shader.

Other than texture samples, one drawback is also the amount of data you push through your GPU card. The bigger the textures, the more data is going back and forth, and, yeah, that could reduce performance as well.

BUT, this depends only on your specifications.

Tell us.

Last edited by HeelX; 04/29/11 13:07.
Re: terrain rendering [Re: HeelX] #368929
04/29/11 16:44
04/29/11 16:44
Joined: Feb 2010
Posts: 68
mireazma Offline OP
Junior Member
mireazma  Offline OP
Junior Member

Joined: Feb 2010
Posts: 68
Thanks for answering.
I've read the manual (most of it) like half a year - a year ago. I followed the tutorials but I couldn't find anything about terrain normal mapping. I *guess* NM and parallax for terrain entities are not native to 3DGS which wouldn't be a problem if I could find anywhere custom shaders to d/l. Still it would have been best if I didn't need to add/write extra shaders.
About specs, I don't understand what you mean, I simply want to make a RTS and find a good balance of speed/no of textures per terrain, to use. I want small objects to be normal mapped and parallaxed instead of entities.


ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.
Re: terrain rendering [Re: mireazma] #368954
04/29/11 21:12
04/29/11 21:12
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Here is a terrain multitexture shader with 3 textures + normal maps, and a lightmap, and sun + 2 dynamic lights, and fog support:

link



Re: terrain rendering [Re: HeelX] #369032
04/30/11 20:19
04/30/11 20:19
Joined: Feb 2010
Posts: 68
mireazma Offline OP
Junior Member
mireazma  Offline OP
Junior Member

Joined: Feb 2010
Posts: 68
Wow. That is a glass of water to a dying thirsty man! I'll reply there.


ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1