|
Terrain like in C&C Generals
#72202
04/25/06 13:47
04/25/06 13:47
|
Joined: May 2004
Posts: 164 Germany
DARKLORD
OP
Member
|
OP
Member
Joined: May 2004
Posts: 164
Germany
|
Maybe it's a stupid question, and maybe its also the wrong forum (not sure) , but perhaps somewone can tell me how they did the terrain in C&C generals. Theire it's possible to blend many, many textures on one terrain (with great fps). I think they used shader so I belive it's ok to ask here. In the forum I saw shaders for blending maybe 5 textures or so but in Generals you can blend hundrets of textures together. So maybe one of you guys out their knows how they did it. Mfg
|
|
|
Re: Terrain like in C&C Generals
[Re: DARKLORD]
#72205
04/25/06 18:56
04/25/06 18:56
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
Good question, indeed. I was always wondering how the professionals were doing it. They also have a well-working solution for blending textures smoothly, as it seems. But because you can blend hundreds of textures on one terrain, I don't think they use a shader. That'd probably be too slow. If anybody knows what might be going on there, please tell us! I'm especially interested in having the textures blend smoothly - the Generals Engine seems to do some kind of alpha blending there... Any help is appreciated
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: Terrain like in C&C Generals
[Re: Thomas_Nitschke]
#72206
04/29/06 21:34
04/29/06 21:34
|
Joined: Mar 2001
Posts: 3,298 Beverly, Massachusetts
Rhuarc
Expert
|
Expert
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
|
With a ps1.1 pixelshader, it's possible to blend up to 4 textures per terrain in a single pass (using vertex colors/alpha to blend instead of a blendmap is always better in performance, memory, and ease of use... thanks for not giving us those, Conitec ). Doing several passes allows 4 more per pass. If I were designing such a shader, and planning on a wide range of system support for shaders; I would design it with a base of 4 textures (rgba*1 from vertex colors) that would cover the bare minumum and still look good; from there I would do another pass for additional textures using an alpha and 3 textures (rgb*a from vertex colors); and if needed; a last pass with detail mapping overtop for closeups. This would all function on ps1.1, then go forward and create a shader for ps2.0 that combines all of this into 1 or 2 passes. So on, so forth. Having direct access to customize your vertex formats, d3d renderstates, and more access to the shader architecture makes a huge difference. This could be done in a DLL for 3DGS, using another format (mdl does not have vertex colors). You could also do it using a blendmap, which takes another texture slot, and another texture read. You can make the blendmap at the same resolution as vertices in the terrain, use point mip/mag/minmapping, and shift 0.5f textels left and up to mimic vertex coloring exactly. Using another cycle in your shader for the sake of something that should not require such is pretty painful though... Ah, the fun I'd have with conitecs engine if we got source code . Give me a week, and the engine would look nothing the same. -Rhuarc
|
|
|
Re: Terrain like in C&C Generals
[Re: Rhuarc]
#72207
04/29/06 22:31
04/29/06 22:31
|
Joined: Nov 2002
Posts: 2,148 Germany
Dima
Expert
|
Expert
Joined: Nov 2002
Posts: 2,148
Germany
|
I think in world builder of C&C generals you create a new terrain, and you paint on the skin of this terrain. So you can paint so many things you want there. After that, you save the "map" with the terrain you did, with the specific skin you did!
I'm not afraid of competition cos I'm know that I'm best
|
|
|
Re: Terrain like in C&C Generals
[Re: Thomas_Nitschke]
#72208
05/03/06 00:58
05/03/06 00:58
|
Joined: Sep 2002
Posts: 8,177 Netherlands
PHeMoX
Senior Expert
|
Senior Expert
Joined: Sep 2002
Posts: 8,177
Netherlands
|
Quote:
Good question, indeed. I was always wondering how the professionals were doing it. They also have a well-working solution for blending textures smoothly, as it seems. But because you can blend hundreds of textures on one terrain, I don't think they use a shader. That'd probably be too slow. If anybody knows what might be going on there, please tell us! I'm especially interested in having the textures blend smoothly - the Generals Engine seems to do some kind of alpha blending there... Any help is appreciated
Infact they use a trick for that. They only use a couple of textures to blend, only in the editor they mix what you need and turn parts of it into new textures. So they don't blend hundreds of textures at all, just a few. I take it they use some sort of 'blend the textures on the fly' method in the editor and freeze it and save those textures into new textures.
Cheers
|
|
|
Re: Terrain like in C&C Generals
[Re: PHeMoX]
#72209
05/05/06 13:02
05/05/06 13:02
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
Yep, this is what I thought as well. The same goes for the multitexturing; I don't think this is all done during runtime but is rather precalculated by the editor. The question is: How does the editor do it? I want to be able to blend textures, too!
Last edited by The Matrix; 05/05/06 13:03.
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: Terrain like in C&C Generals
[Re: Thomas_Nitschke]
#72210
05/05/06 13:04
05/05/06 13:04
|
Joined: Nov 2002
Posts: 2,148 Germany
Dima
Expert
|
Expert
Joined: Nov 2002
Posts: 2,148
Germany
|
MK1 wrote a programm where you can draw on the skin
I'm not afraid of competition cos I'm know that I'm best
|
|
|
Re: Terrain like in C&C Generals
[Re: Dima]
#72211
05/05/06 13:22
05/05/06 13:22
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
Maybe he could dig that one out of his harddrive's depths? Then we could probably further improve it or something...
Last edited by The Matrix; 05/06/06 11:30.
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
|