alternative terrain approach

Posted By: ulf

alternative terrain approach - 04/06/06 09:03

hey, i would like to discuss an alternative terrain approach like seen in demonica. http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/640695/an/0/page/0#640695

templar the developer said:

Quote:


- the terrain consists of several aligned uv mapped models

- what you see on the ground is really in the texture - no shaders, no dynamic shadows (except for the characters), no rendering to texture





i have thought a bit about it and i would like to discuss how you could implent a terrain like this.

basically i think you have to make the "several aligned models" with a modeller. you can make tiles in my opinion. at least for things like a town the tiles have to be the same size powers of 2. each tile has to fit to the next and so on. this way you can make roads on flat terrain. you would need a special size for each tile and a seemless texture so you dont see the transitions.
you would have to position each gap directly close to the next.

i dont know yet how you could achieve correct collision behaviour, i mean is it possible to work like on terrain? so let the player walk on top of a model and walk up if the model has a hill? this might sound a bit noobish but i really havent used models as ground yet! and here is where i dont get further with this solution? i thought models use a bounding box wich is squared. and if you use polygon collision you lose a lot of performance and get bugs?

there are only advantages with this approach i think. namely you can even have things like caves in your terrain. you can have shadows on the texture to save rendering power. you can use unlimited terrain textures not only 3 like with normal terrain+shader. models render faster in a6 compared to a big terrain.

the only disadvantages i could think of where the improved work for the terrain tiles. and maybe the higher texture consumption.

well please contribute to this idea, how could you improve it and so on?

thanks in advance!
Posted By: TWO

Re: alternative terrain approach - 04/06/06 13:09

No bugs ulf at the last update the collision-system was updated, now it´s working nearly perfect. And it is fast too, if chars use aabb and the groundmodel polygonal collision.

To the Textures... all models are stored on the client, so... hachgott, hab kein bock mehr: Wie einige Tests gezeigt ham machen größere Texturen bei der Perfomance nicht viel aus, allerdings sollte eine größe von 1024x1024 nicht überschritten werden. Die optimale texturengröße bei älteren karten ist 256x256, bei neueren 512x512.

Da die Modelle für den Boden schon aufm Client liegen ist die Maploading Zeit auch nicht höher, eher sogar noch kürzer!

Xpresso
Posted By: Damocles

Re: alternative terrain approach - 04/06/06 18:28

The Terrain in Daeomica looks realy nice,
especially the way multitexturing, and lights work together.

Im sticking to the good old terrain though, since it gives a lot of advntages.
Namely that the shadow of animated Models works nice on it.
With Models as terrain, one would need stencil shadows, which is much
too slow.

Here is a way to make a normal Terrain look nice with some
shadows baked on it:


It would also work with lightsources that could be baked on it.

The main problem is, that this way it does not have a multitexture terrain.
I would need a new shader to mix baked shadows, and multitexture.

Models are a good way to go, but require much more effort, to implement right.
Posted By: ulf

Re: alternative terrain approach - 04/06/06 19:16

i agree that normal terrain is okay and looks good in most cases but how do you make a road or stuff like paths as seen in demonica with normal terrain? its almost impossible if you dont have the right tools for it.

how many textures can a multitextured terrain support? 3 + 1 detail if iam not wrong? you are always bound to those. i really, really liked how many details there where on the ground in demonica.

how would you add those with normal terrain? how would you make them fit to your terrain texture?
Posted By: Damocles

Re: alternative terrain approach - 04/06/06 19:49

The question in not, how to make a terrain as good, as in Daemonica that used
Models,
The questions is, what looks good, it not too much of work (fits project plan)
and renderes in the required speed.

Using Models gives next to the advantages also big drawbacks,
like the consumption of texturespace and the Massive Modelling work,
and not to forget the need for c_move and c_trace, plus
the problems with entity-shadows.
Posted By: ulf

Re: alternative terrain approach - 04/06/06 20:18

i know what you mean. but especially shadows i regard not sooo important, they are nice to have but i dont look at them anyways when playing a game.

may i ask you how you bake the shadows into your terrain? does this consume one texture from the multitexturing shader?
Posted By: Damocles

Re: alternative terrain approach - 04/06/06 20:32

Also ich schreib mal auf Deutsch:

das Terrain hier ist is ein ganz normales Terrain mit Detailmap und
einer großen Textur mit den Schattendaten.
Es is einfach grau mit dunkelgrauen Stellen, wo die Schatten sind.
Die Detailtextur wird so aufgehellt oder abgedunkelt.

Das erstellen ist eigendlich recht einfach,
es gibt eine "Sonne", die kleine tracestralen aussendet,
und dort wo das Terrain getroffen wird, wird es heller.

Ist das rendering abgeschlossen speichere ich die erzeugte Schattentextur
und lade sie als ganz normalen Skin.

Mit dem Multitexturing geht das nicht so einfach, da bräuchte man
einen neuen shader, der auch die Schattierung mit in den Prozess mit einbezieht,
aber das muss einer der shaderexperten schreiben, ich kann sowas nicht.
Posted By: ulf

Re: alternative terrain approach - 04/07/06 08:44

das problem ist ja, dass du damit quasi eine textur des terrainshaders "verschwendest".

das video von freeworld hat mich auf folgende idee gebracht: angenommen du hast dein terrain fertig, hast ordentlich viel bäume drin und die sind schon platziert. dann könntest du ja eigentlich eine textur mit deinem baker oder irgendwas anderem für diesen baum erstellen.

öffnest das terrain im med, gehst an die stelle wo der baum ist und kopierst die polygone wo der schattenwurf hinkommt.

dann machst du ein neues modell mit diesen polygonen, setzt ne .tga textur mit nur dem schatten also ohne untergrundtextur und speicherst das als extra .mdl

nun kannst du diesen schatten im wed dahin platzieren wo er ins game soll. das problem ist natürlich, dass du das für jeden einzelnen baum extra machen müsstest. aber im nachhinein hättest du schatten auf dem terrain ohne eine textur des shaders zu verschwenden.

was so auf alle fälle möglich sein sollte sind details auf der karte oder andere r untergrund. z.b. wenn man nur 5% eines terrains mit einer bestimmten textur versehen möchte könnte man das mit der methode tun. das problem bleibt natürlich die texturierung. müsste man mal testen.
Posted By: Damocles

Re: alternative terrain approach - 04/07/06 08:51

Na, ob das praktikabel ist für ein Level mit 300 Objekten?

Ausserdem hast Du somit keinen Schatten, das das Terrain auf sich selber werfen kann.
Sowie clippingfehler, die auftreten, wenn der Schatten zu dicht am Terrain liegt.

Man könnte auch einfach das Terrain mit der Schattentextur über das normale Terain legen
(ein paar quants höher)
So das das Schattenterrain transparent ist, wo licht ist, und weniger, wo Schatten ist.
Posted By: ulf

Re: alternative terrain approach - 04/07/06 09:29

ja das wäre natürlich auch ne möglichkeit da könntest du sogar auf 6 unterschiedliche texturen kommen wenn du 2 shader benutzt, wenn ich mich nicht irre?

bloss geht das nicht massiv auf die fps?
Posted By: Damocles

Re: alternative terrain approach - 04/07/06 09:46

Es sind dann 2 Terrains,
das hangt vor allem ab, wie hoch die Auflösung ist,

aber mit Schattenmodellen hast du 300 zusätzliche Modelle.

Das Hauptproblem ist eher die sortierung von Transparenten objekten
vor dem Terrain.
Mit dieser Methode kann es sein, das transparente Objekte von dem Terrain überdeckt werden.

Das beste wäre wenn einer der shaderexperten einen
multitexturing shader, mit Helligkeit-skin schreiben könnte.
Posted By: ulf

Re: alternative terrain approach - 04/07/06 09:53

das wäre natürlich auch nützlich ich nehme an das durch die limitierungen maximal ein shader mit 2 texturen + 1 schattentextur + 1 detailmap möglich wäre...
Posted By: Templar

Re: alternative terrain approach - 04/08/06 13:16

Hi guys,

I just wanted to say one thing - the terrains (and when I say "terrains", I mean "models" ) in Daemonica are not multitextured. At our time (when the major part of Daemonica was being created) there was no fully working and reliable multitexturing technique available.

The current A6 version is I think (I haven't used the latest versions) much better then was when Daemonica was being developed (which is quite logical ) and if we were to make it again, we would probably do it in a slightly different way - there is so much new! ( compressed textures (oh God how we did miss them...), faster and reliable c_ instructions, chunked terrains, multitexturing shaders ...)

btw @Damocles - your terrain does indeed look very nice!

T.
© 2024 lite-C Forums