Welcome, Guest. Please login or register.

Pages: 1 [2] 3
Print
Author Topic: Discussion - Environment Sprites  (Read 25155 times)
maximinus
Community member

Posts: 694



View Profile Email
« Reply #15 on: April 03, 2009, 02:00:07 PM »

I don't get the extra layers idea. We should be able to do tile transitions on one layer.

Here is how I imagine it:

We are about to draw the image of terrain point X, which is surrounded by 8 other tiles
123
4X5
678

We go through all adjacent tiles (1-8), and check if their terrain type is the same as X. If some tiles are different, we look for a transition image.

Imagine that the terrain type of X is Grass, 5 is Snow, and 8 is Rocks. What we do is:
1. Get the image of a regular Grass tile
2. Get the transitional image of Snow, where just the middle of right wall is snowed, and draw it over the regular Grass (remember that the transitional images are mostly transparent)
3. Get the transitional image of Rocks (where the rocks are just in the bottom right corner), and draw it over the Grass + Snow image
4. Draw the resulting image of Grass + Snow + Rocks to the screen (or even better, save it into some kind of cache, which can be reused)

With the above approach I don't think that we need to present the different terrain types as separate FIFE layers.

I'm suggesting that we do this before we even start our program! So we'd really only need the one base layer.
Logged

Science is open-source religion
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #16 on: April 03, 2009, 05:30:02 PM »

Terrain Tile Variants

So you have n amounts of tileable grass tiles (in our example 3). The engine then randomly fills an area called grass with these tileable grass tiles. For the user things are nicely grouped and simplified so you don't need to place individual tiles by hand (unless you really want to).

Yeah, that's the idea, except you couldn't place them individually even if you wanted to (at least if it was implemented as i think it should be).  The terrain type palette would be too cluttered if we included all the "variants".  Any tile graphic distinctive enough that  a user would want to place it by hand shouldn't be a variant, but a separately defied detail tile.

How does this then work with transitions? Does each of the variants gets its own set of transitions (so the transitions are also randomized)? Or is there a single set of grass transitions acting as the boundary and all of the "full" grass tiles are then contained inside this field.

You don't need multiple sets of transitions.  Since all variants of a type transitions seamlessly with each other they will transitions seamlessly with a single set of transitions (no matter which type of transition we are talking about).  Though it would be nice to allow variants of transitions also, since it can be hard to hide the obvious repetition of some transitions.
« Last Edit: April 03, 2009, 05:32:00 PM by eleazzaar » Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #17 on: April 03, 2009, 05:39:42 PM »

Perhaps I'm too simple, but all this talk of graphic systems without any graphics to back it up is hard to understand  Huh

How's about somebody comes back with some tiles (Wink) to drive home their point.









And, oh yeh, we could do with some gfx tiles as well  Grin
Logged

Science is open-source religion
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #18 on: April 03, 2009, 06:54:02 PM »

Perhaps I'm too simple, but all this talk of graphic systems without any graphics to back it up is hard to understand  Huh

How's about somebody comes back with some tiles (Wink) to drive home their point.

How will a bunch of loose graphics in a folder make anything more clear, unless you already have the different systems solidly in your head?  For it to be a useful explanatory system, we would need to code, editor, and maps to go with it.

IMHO this sort of thing is more efficient to talk through first.

EDIT:  I'm not trying to make it sound like these things are easy to understand.  It took me a while to wrap my brain around these different terrain transition systems the first time i encountered them. We may need diagrams, examples etc. to make everything clear.


However the real method described in the article is indeed much more powerful and flexible.

I agree the article's system is more powerful and flexible, previously i had assumed that FIFE couldn't handle it, otherwise i would have previously stated my preference for it.

Though, be aware that this system can only go so far.  You can do probably 95+% of the transitions perfectly well with a single generic transparent transition per terrain type.  But sometimes to make things look good you'll want a special transition that is used only between specific terrain tiles.  Water tiles are the best example.  You'll want different transitions between land and water than would appear between various water tiles, or than would appear between various land tiles.



The terrain tiles are then each on its own layer and we simply define the order of these layers.

"Layer" here is i think a loaded word.  I understand what you mean, but i think tie and perhaps max are using it in a more technical sense.  Weather or not what lamoot is talking about is a "layer" to the engine, the idea is there is a specific order that the terrain tiles and transitions are drawn in which determines what overlaps what.

Ideally the system would be smart enough not to draw transitions that get totally covered up by a full terrain tile.


I wonder how does then elevation fit into all of this, ramps, real cliffs and such (see other threads for zenbitz's plans to have real height, not just faked one).

I don't think zenbitz has ever gone into much detail about elevation (if so i totally missed it).  It's hard to predict how an unknown system of elevation might effect this.  No doubt it will make things more complicated, and require more types of graphics, but i don't think it will effect the basic function of transparent transitions.


Quote
You really think that is the simplest way? Wink  Maybe that's the method that would work best for you, but even if i was a 3D artist, i think i would mostly use 2D tools for most of these. I daresay i can paint grass just as fast as you can rig a particle system.

To each his own. Grass perhaps, how about 31x10 frames of animated water Smiley

Animating water i happily leave for 3D to take care of.  That effect is really good at showing movement, without making it look like the water is moving in a particular direction.  Which is good since you don't want water that looks like it is flowing is a ridiculous direction, and you don't want to animate water going in all possible directions.

But you forget, with transparent transitions, we don't need to animate each transition.  We simply layer a ground-to-water transition over the full tile of animated water.
« Last Edit: April 03, 2009, 07:37:11 PM by eleazzaar » Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #19 on: April 04, 2009, 02:28:54 AM »

Perhaps I'm too simple, but all this talk of graphic systems without any graphics to back it up is hard to understand  Huh

How's about somebody comes back with some tiles (Wink) to drive home their point.

How will a bunch of loose graphics in a folder make anything more clear, unless you already have the different systems solidly in your head?  For it to be a useful explanatory system, we would need to code, editor, and maps to go with it.

IMHO this sort of thing is more efficient to talk through first.

I'm wasn't trying to be flippant, but it's easier for me to grep (sorry, understand...) when I actually see some gfx, or a mock-up, or something. I'm a programmer, and so it's probably my mindset; everybody thinks in different ways.
Thats why I'm waiting until all the discussion has been had, then I'll help implementing it. The most important thing I can really add to the discussion is that it may actually be more effective to do any rendering of tiles in layers before we get to the fife engine.

On the other hand, I would like to see some gfx tiles up here as well!  Wink
Logged

Science is open-source religion
Lamoot
Community member

Posts: 161


View Profile
« Reply #20 on: April 04, 2009, 10:49:11 AM »

Visual examples would be very welcome. I have a general idea of how this approach works, but not what exactly is happening on one tile in a given situation. Also it would be very useful for our programmers.

Could you make a wiki article about this eleazzaar? With some visual examples explaining the concept? I know it can take time and effort, but I feel it's really important we all have a clear idea of what we're aiming for with this approach.
Logged
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #21 on: April 04, 2009, 05:48:55 PM »

OK, i'll do that.  Example graphics and diagrams.


this article lamoot linked to has all the basics.

But there are a few elaborations needed to allow graphics quality beyond the stylized look that works for console-anime-rpg style games, but doesn't work for us, which hopefully won't be too confusing.
Logged
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #22 on: April 05, 2009, 12:21:48 AM »

OK, this doesn't explain everything, but it's a start.

http://wiki.parpg.net/User:Eleazzaar/terrain

Please let me know about ambiguities and potential problems.
Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #23 on: April 05, 2009, 02:05:03 PM »

Eleazzaar, that article is right on the money!

Even the tile sizes are correct and everything. I will go away and produce a mock-up over the next day, you got me excited!
Logged

Science is open-source religion
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #24 on: April 05, 2009, 05:00:11 PM »

Cool. Smiley

I guess that means i should make a full set of transitions for a couple terrains.
Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #25 on: April 06, 2009, 03:06:48 AM »

Here they are rendered in-game:



Getting that with the transition tiles is a bit more work, just give me some time  Cool
Logged

Science is open-source religion
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #26 on: April 06, 2009, 03:44:42 AM »

Hey, we ought to use Lamoot's untextured guy,


He doesn't animate or anything, but at least he's the right size.  Lamoot can you render one with a transparent background?
Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #27 on: April 06, 2009, 09:23:30 AM »

Like this?



  Grin
Logged

Science is open-source religion
maximinus
Community member

Posts: 694



View Profile Email
« Reply #28 on: April 07, 2009, 03:56:40 PM »

Cool. Smiley

I guess that means i should make a full set of transitions for a couple terrains.

I really could do with one complete set of transition tiles so I start to develop the code to make this all work  Tongue
Logged

Science is open-source religion
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #29 on: April 07, 2009, 06:22:46 PM »

I don't know if i'll have much time to make art today.

I did make a grid graphic to overlay on the terrain. (see attached)  It will work against both dark and light terrain.

I don't know if this is something you want to think about at this point in the process or not, but there are going to be a ton of little graphics for terrain.  We need e a naming convention that could identify which transition a particular PNG is for, and if its a variant.

Ideally the engine could sort out which is which and use them properly without, needing to identify each .PNG with .XML.


* grid.png (0.69 KB, 70x36 - viewed 373 times.)
Logged
Pages: 1 [2] 3
Print
Jump to: