Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (RealSerious3D, rvl, tomaslolo), 685 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Terrain like in C&C Generals #72202
04/25/06 13:47
04/25/06 13:47
Joined: May 2004
Posts: 164
Germany
D
DARKLORD Offline OP
Member
DARKLORD  Offline OP
Member
D

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] #72203
04/25/06 14:09
04/25/06 14:09
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
If you know how the final terrain is textured just split it in many terrains, that's all. Conitec could increase the amount of textures a material can use, but rendering a lot of textures on one terrain would slow down the game a lot.


Follow me on twitter
Re: Terrain like in C&C Generals [Re: mk_1] #72204
04/25/06 14:51
04/25/06 14:51
Joined: May 2004
Posts: 164
Germany
D
DARKLORD Offline OP
Member
DARKLORD  Offline OP
Member
D

Joined: May 2004
Posts: 164
Germany
I cant belive that tehy have done it this way, because you would need a seperate file for everey little "terrain square". After that you have to deform your square to make a terrain grid with hills and that stuff. That would be possible I think but I've heard that you can only use 1024 different models, so max terrain size would be 32x32 without other models. In addition it will be very fps intensive.

Ps I've a small image from the C&C terrain for thoose of you who haven't played this game yet (it's funny, I can recommend it )



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
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

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 Offline
Expert
Rhuarc  Offline
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


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
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 Offline
Expert
Dima  Offline
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 Offline
Senior Expert
PHeMoX  Offline
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


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
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
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

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 Offline
Expert
Dima  Offline
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
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

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?
Page 1 of 3 1 2 3

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | 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