Welcome, Guest. Please login or register.

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

Posts: 161


View Profile
« on: March 30, 2009, 10:21:30 AM »

Especially the natural environment stuff (foliage, rocks, ground, water, snow etc.). I made an article about graphics for the environment stuff.

http://wiki.parpg.net/Graphics:Terrain

Thoughts, suggestions? In case you do not agree with the diagram of the ground types, I included the source file of the diagram at PAR (link found at the wiki), so people can make their own proposals.
« Last Edit: November 11, 2009, 09:50:10 PM by Gaspard » Logged
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #1 on: March 30, 2009, 05:00:37 PM »

I was looking over that page yesterday.  I don't have as much experience messing with a system that uses this transition method, so i'm trying to wrap my brain around it.

You make this statement: 
Quote
For this reason, terrain transitions will only happen between 2 ground types, while 3 terrain transitions will be limited to very special situations.

How is that enforced?  Or do you just mean that it won't look good if maps do that, because there won't be transitions?


Transitions are always the painful part of making tiles.  The automatic blender system looks like an interesting way to do things, but it will only go so far.  To make a good looking land <-> water transition for instance you'll need to add the bank and the shallow water by hand.  Other transitions will look better if the edges have hand-painted elements.

I haven't thought it all through, but it would be real nice if the automatic transition script could include a third element when necessary, the special transition between land <-> water that's not an alpha map,  but a mostly transparent graphic.

But anyway, it shouldn't take me very long to provide the graphics and transitions masks for these 18 terrains, ignoring (for now) the hand-painted transitional elements i mentioned, and assuming someone else runs the blender transitions script.  Probably around a week, depending on how much time i have free.  The diagram of terrain types looks reasonable.  I'll consider the types and arraignment more carefully as i'm actually making the tiles.

I hate the blender interface.  I cannot grok it at all, and i'm familiar with much of 3D terminology, having worked next to and with a 3D artist(s) for a few years. Thus i want to pass that job off to someone else.

So does this automatic transition generator require that textures be created as full squares?  It would be much easier to create slight protruding objects (like grass, bumps in the dirt, small rocks, etc), if the ground tiles are created in their final isometric shape.  Couldn't you make it work on isometric shapes, by changing the camera angle?, or would the edges no longer be pixel perfect?


Also, what would happen if we made tiles that looked like this?  (see attached)  If the fife engine can deal with that, it would help create a 3d effect.

EDIT:  Also we'll need to list which terrains are "on top" i.e. when two terrains are next to each other, one will be left alone, and the other will get a transition drawn over it.


* grass.jpg (18.76 KB, 65x36 - viewed 486 times.)
« Last Edit: March 30, 2009, 05:13:39 PM by eleazzaar » Logged
zenbitz
Community member

Posts: 1164



View Profile
« Reply #2 on: March 30, 2009, 08:25:20 PM »

Humph.  When you said "Environment Sprites" I thought you meant these:

http://en.wikipedia.org/wiki/Dryad

http://en.wikipedia.org/wiki/Naiads

http://en.wikipedia.org/wiki/Nereids
Logged

We are not denying them an ending...
We are denying them a DISNEY ending - Icelus
Lamoot
Community member

Posts: 161


View Profile
« Reply #3 on: April 01, 2009, 11:27:39 AM »

Quote
How is that enforced?  Or do you just mean that it won't look good if maps do that, because there won't be transitions?

I was drawing much of information and mentality from this article. It's a cool article and should explain the approach I'm aiming for well enough.

Quote
Transitions are always the painful part of making tiles.  The automatic blender system looks like an interesting way to do things, but it will only go so far.  To make a good looking land <-> water transition for instance you'll need to add the bank and the shallow water by hand.  Other transitions will look better if the edges have hand-painted elements.

Yp, for starters we can have simple transitions and they will only look proper in certain situations. Later on we can begin improving the transitions by placing more "stuff" at the transitions to make them look better.

For the water, we can have shallow water and deep water. Shallow water would replace the current slot (on the diagram) of the "water", while deep water would have its own slot connected only to the shallow water. The visual difference between the two would probably be that the shallow water is brigther and has smaller / calmer waves. Water animation doesn't worry me, since there is a really nice way to make that, following this tutorial.

Quote
I haven't thought it all through, but it would be real nice if the automatic transition script could include a third element when necessary, the special transition between land <-> water that's not an alpha map,  but a mostly transparent graphic.

The alpha maps are simply a sequence of images read by Blender. For each frame of animation, Blender uses the appropriate frame of the alpha map sequence. So it's actually rendering individual frames of the scene and outputing them as individual images (= sprites) and for each frame of the scene it take the corresponding alpha map from the sequence.

The alpha map takes one texture slot of the material, so other maps can be used in other slots to enhance the transition (though I have no clear idea yet what these maps would look like and what their effect would be). Another method is to use actual 3d objects (rocks, small plants, grass and such) to enhance the transitions. For each frame, we would need to make a different transition set of 3d objects though.

Quote
But anyway, it shouldn't take me very long to provide the graphics and transitions masks for these 18 terrains, ignoring (for now) the hand-painted transitional elements i mentioned, and assuming someone else runs the blender transitions script.

Ah never knew you were interested in tiles more than from the theoretical point of view. Help is definitely welcome. I think the prerequisite for the textures is that they are around 100x100 pixel big. Bigger textures will loose their detail on a 70x70 pixel tile anyway. And it's very important they are seamless and tile well and are more or less generic. I can then render the tiles (until I write the tutorial on how to use blender to render tiles and others can try their hands at it as well Smiley )

For snowy tiles, I still have to tweak the node setup to make them appear blueish. The proof of concept is there but I'll have to fine tune it a bit.

Quote
So does this automatic transition generator require that textures be created as full squares?  It would be much easier to create slight protruding objects (like grass, bumps in the dirt, small rocks, etc), if the ground tiles are created in their final isometric shape.  Couldn't you make it work on isometric shapes, by changing the camera angle?, or would the edges no longer be pixel perfect?

The simplest way is to slap a texture on a flat 3d square and render it. Voila, insta tile. The texture can then affect many things, displacement, bump, particle effect strength/colour (for the grass). For generic tiles this is imo the prefered method. For detail tiles, this can then be used as a base to make the tile more interesting. Place rocks, stones, small plants on the tiles and similar. (for example 3d stones can be put on the tile where the image texture shows painted stones). In addition, the particle effect you used for the grass can be controlled by an image texture (transition alpha map for example Smiley ) meaning the grass will get smaller as it goes into dirt and will not simply blend it.

Quote
Also, what would happen if we made tiles that looked like this?  (see attached)  If the fife engine can deal with that, it would help create a 3d effect.
There should be no problem with "tall" tiles. We did some testing a long time ago with FIFE and right now maximinus is also testing a "tall" tile to confirm there really are not problems Smiley

All in all, I have a general idea how to make tiles look good and interesting, but it's too much to digest at once and I'm taking 1 step at a time. A part of this involves exploring what are the possibilities Blender offers.
« Last Edit: April 01, 2009, 11:33:53 AM by Lamoot » Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #4 on: April 01, 2009, 02:23:12 PM »

I'll be testing tall tiles tomorrow, so expect an update say 2:00am GMT
Logged

Science is open-source religion
Lamoot
Community member

Posts: 161


View Profile
« Reply #5 on: April 01, 2009, 03:05:45 PM »

But, you are already testing them now on IRC!

Good one, but you won't fool on this first day of April Wink


Anyway:

Should we also collect ground textures in this thread, or at least inform others of the progress of the ground textures and upload them to PAR or something? I think I already have a generic  dirt texture candidate.

http://assets.parpg.net/?c=10&k=6f0cc78980 dirt01 (ok it's a bit bigger than 100x100 px)

(and the example tile is smaller, didn't pay attention to the size, just to show hoe it looks in practice)


* dirt1_single.png (3.27 KB, 200x200 - viewed 486 times.)

* dirt1.png (75.26 KB, 200x200 - viewed 530 times.)
Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #6 on: April 01, 2009, 03:35:29 PM »

But, you are already testing them now on IRC!

Good one, but you won't fool on this first day of April Wink

I saw you on IRC and felt guilty  Wink
Logged

Science is open-source religion
eleazzaar
Community member

Posts: 255


attempting lucidity


View Profile
« Reply #7 on: April 03, 2009, 02:17:10 AM »

Quote
How is that enforced?  Or do you just mean that it won't look good if maps do that, because there won't be transitions?

I was drawing much of information and mentality from this article. It's a cool article and should explain the approach I'm aiming for well enough.

No, that doesn't answer the question.  The system in the linked article is different, from what's been outlined for PARPG. The article describes using transparent overlays for transitions.  You can stack as many transparent overlays on a tile as you need to make the transitions to all surrounding tiles.  In the example you can see several tiles that contain 3 transitions from adjacent tiles.

Here you say that, "terrain transitions will only happen between 2 ground types, while 3 terrain transitions will be limited to very special situations."  The article doesn't address that kind of limitation, because their system doesn't have it.

I don't have much experience with tiles in the kind of system you describe for PARPG, but it seems rather restrictive, though i realize some games are made that way.  Which brings me back to the original question:

How is "terrain transitions will only happen between 2 ground types" enforced?


Quote
But anyway, it shouldn't take me very long to provide the graphics and transitions masks for these 18 terrains, ignoring (for now) the hand-painted transitional elements i mentioned, and assuming someone else runs the blender transitions script.

Ah never knew you were interested in tiles more than from the theoretical point of view. Help is definitely welcome.

I'm a 2D artist.  Most of the art in PARPG will be beyond my purview, but i've made a lot of terrain tiles, i think it's fun, and i can help get this part of PARPG jump-started.


Quote
So does this automatic transition generator require that textures be created as full squares?  It would be much easier to create slight protruding objects (like grass, bumps in the dirt, small rocks, etc), if the ground tiles are created in their final isometric shape.  Couldn't you make it work on isometric shapes, by changing the camera angle?, or would the edges no longer be pixel perfect?

The simplest way is to slap a texture on a flat 3d square and render it. Voila, insta tile. The texture can then affect many things, displacement, bump, particle effect strength/colour (for the grass). For generic tiles this is imo the prefered method. For detail tiles, this can then be used as a base to make the tile more interesting. Place rocks, stones, small plants on the tiles and similar. (for example 3d stones can be put on the tile where the image texture shows painted stones). In addition, the particle effect you used for the grass can be controlled by an image texture (transition alpha map for example Smiley ) meaning the grass will get smaller as it goes into dirt and will not simply blend it.

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.

I do see an advantage in using particles for snow, since we could probably back a snow version of any 3D object by applying snow particles to it.



Quote
Also, what would happen if we made tiles that looked like this?  (see attached)  If the fife engine can deal with that, it would help create a 3d effect.
There should be no problem with "tall" tiles. We did some testing a long time ago with FIFE and right now maximinus is also testing a "tall" tile to confirm there really are not problems Smiley

Actually now that i think about it a bit more there may not be much point in making "tall" tiles, since either the tall part will usually be covered up by an adjacent overlapping transition, or will be made redundant by a northward transition from that tile.  The only time when it will be useful is when the adjacent tile is something square and man-made without a transition.  I don't think that's going to happen a lot with a "tall" tile like grass.



Terrain Tile Variants

I think i've alluded to this concept briefly.  I've found it very useful in other projects (especially Wesnoth) to make terrain look good.  This is a different concept that "Detail terrain tile", and complementary with it, working towards the same end.  Hopefully FIFE supports it, or could easily be made to support it.

Terrain tile variants are more generic than detail terrains.  They are the sort of thing that can be repeated a bunch of times without drawing too much attention.  Attached is a moderately quick example.  The image was made by randomly mixing 3 seamless grass tiles.  You get a much greater effect of randomness than if you used 1 larger tile.

The map-making app should handle this for the map-maker.  I.E. the user defines an area as "grass1", and the app, fills it with a random arraignment of the 3 grass variants tiles.  If the user wants to do something special, he can place a detail tile by hand, which in this case might be something like a patch of flowers, etc.

Ideally the map-format wouldn't even know or care how many variants there were of a tile.  To the map, the whole area (with the exception of Detail tiles) is just "grass1".  That way maps can age well.  In other words.  A map created when there were no variants for grass, would display however many variants existed at the time the map is opened.  Thus as new variants are created, the unchanged map files start looking better and better in the actual game.


* grass.jpg (72.75 KB, 256x192 - viewed 521 times.)
* grass-tiles.zip (23.57 KB - downloaded 243 times.)
Logged
tie
Community member

Posts: 77


View Profile Email
« Reply #8 on: April 03, 2009, 08:21:58 AM »

As eleazzaar, I'm kinda confused about the terrain transition rules. Why would we limit the number of possible transitions? The idea of the outlined article is to be able to have any kind of transition without too much extra work.

We basically need about 30 transition images for each terrain type (check figure 3 and 4 at http://www.gamedev.net/reference/articles/article934.asp). The larger part of the transition images would be transparent, so it should't be too hard to generate them.

Once we have these images for the different terrain types, we can generate any transition, and we no longer need predefined terrain relations.
Logged
Lamoot
Community member

Posts: 161


View Profile
« Reply #9 on: April 03, 2009, 10:41:06 AM »

The reason is in my misunderstanding of the article and picking the simplest method where all tiles are on the same layer and there are no tiles being drawn on top of other tiles. Using this method there can only be 2 transitions between 2 ground types and still retain sanity. Here a transitional tile sprite is not ground type + transparency, but ground type + ground type.

However the real method described in the article is indeed much more powerful and flexible. The terrain tiles are then each on its own layer and we simply define the order of these layers. 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). Also how heavy are the layers,  can FIFE handle so many them (n amount of ground types)?

I don't understand how did the diagram make sense to anyone then. Wouldn't all of the ground types then be ordered linearly and we wouldn't have the need for crazy structures?

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

I'm definitely more in favour of the more flexible method, will save many a headache.
Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #10 on: April 03, 2009, 10:45:23 AM »

One thing that may be *very* useful to know in this debate is that you can use a rendered background image as the base layer (and just stick objects on top of it). This is a lot faster than fife having to blit all the different tiles every frame.

At the moment I'm thinking about having a layer layout like this, (each layer gets drawn OVER the one below):

* Ground objects & NPC's
* Building internals^
* Building externals^
* Base ground image (one large image)
* Blocking layer for pathfinder (not drawn)

^We either show the externals (if inside a building), or the internals (and no base ground image) if inside the building. To the player, it would look like the roof had been removed and the rest of the map had gone black.
Logged

Science is open-source religion
Lamoot
Community member

Posts: 161


View Profile
« Reply #11 on: April 03, 2009, 10:50:09 AM »

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).

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.
Logged
maximinus
Community member

Posts: 694



View Profile Email
« Reply #12 on: April 03, 2009, 11:08:10 AM »

However the real method described in the article is indeed much more powerful and flexible. The terrain tiles are then each on its own layer and we simply define the order of these layers. 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). Also how heavy are the layers,  can FIFE handle so many them (n amount of ground types)?

If we choose to pre-process the base map images, we'll have a faster engine AND you can have as many layers as you like  Smiley. But this will of course take up more memory for the images  Sad
Logged

Science is open-source religion
tie
Community member

Posts: 77


View Profile Email
« Reply #13 on: April 03, 2009, 12:01:02 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.
Logged
tie
Community member

Posts: 77


View Profile Email
« Reply #14 on: April 03, 2009, 12:04:52 PM »

So you have n amounts of tileable grass tiles (in our example 3).
....
Does each of the variants gets its own set of transitions (so the transitions are also randomized)?

Yep, I believe we will need separate sets of transition images for each distinct terrain tile.
Logged
Pages: [1] 2 3
Print
Jump to: