Page 1 of 3

New look

PostPosted: 27 Jun 2011, 20:33
by Skorpio
We really need to do something about the look of the dungeons. Currently I'm testing some new materials and tiles, which are about 5 times bigger than the old ones. I think 1*1 tiles are too small unless we figure out how to stretch textures over several tiles (or maybe we could scale the creatures down?). The biggest problem is to create variation in the tile meshes to make them look more natural, since they still have to fit together. Maybe this look could be faked with parallax maps. And when the meshes are smooth shaded you can see hard edges between them, unless you merge the vertices, but I have no idea if this can be done in-game.

Here's a render with a troll to show you the dimensions. The wall tiles are merged in this picture. Oh and we also need texture splatting to get nice transitions between the different tiles.
New tiles.png

Re: New look

PostPosted: 27 Jun 2011, 21:45
by svenskmand
Looking good :) This will have a *HUGE* nice-ness effect on the graphics :)

Regarding the "merging" of tiles then I think we should either 1) make the code generate tiles randomly, and then just variate the textures on the sides, and maybe use splatting to give them more variation. Or 2) make allot of different tiles which all share the same coordinates for the corners/sides so they can be mixed together.

The first option is probably the best, but also most time-consuming codewise. The second is most time-consuming graphics-wise. So I would vote for option 1 as we would only have to write the code once, and not for every new room we want.

Re: New look

PostPosted: 28 Jun 2011, 11:01
by Danimal
That looks KILLER, with that kind of graphics we wont have anything to envy WFTO. I would say to give priority to implement that and get rid forever of the bland looks of rigth now.

Re: New look

PostPosted: 28 Jun 2011, 13:24
by oln
Danimal {l Wrote}:That looks KILLER, with that kind of graphics we wont have anything to envy WFTO. I would say to give priority to implement that and get rid forever of the bland looks of rigth now.

Agreed. Will be next on my list to look at after team colours and the AI framework.
Wish we could attract some more devs, but I guess it's hard to do without something cool to show off, which needs to be programmed, etc...

Re: New look

PostPosted: 28 Jun 2011, 22:02
by Skorpio
I've rendered a new image with some test claimed walls. We need a lot of props to fill the dungeons like these nice barrels that I found on OGA. The troll is a bit bigger in the new renders. I'm not sure about the relative size, but I think the tile size is something like 3*3.

And maybe it would be nice to add a blur effect at the edges of the screen. Then everything would look a bit like miniatures.
New tiles3.png
New tiles3B.png
New tiles_blur.png

Re: New look

PostPosted: 28 Jun 2011, 22:37
by svenskmand
Wow it really looks nice :) I do not know about the blur though. If we could get the game to look like this it would be awesome :) I really like the floor, the barrels, the tourches and the claimed walls nice work Skorpio :)

Re: New look

PostPosted: 29 Jun 2011, 02:36
by oln
Skorpio {l Wrote}:I've rendered a new image with some test claimed walls. We need a lot of props to fill the dungeons like these nice barrels that I found on OGA. The troll is a bit bigger in the new renders. I'm not sure about the relative size, but I think the tile size is something like 3*3.

Yeah, the troll is a lot smaller here than, the one in the game currently. The tiles are 1x1 size in in-game units I think.
Couldn't we start using some of these wall/tile models/textures already by simply replacing the old ones, withouth any code changes? Some changes are needed for doing the random tile stuff (I'll get to that at some point.), but even without that, these models would make the game look much better than the now.
The blur effect should be doable with a shader. (Would be similar to the glow-effects games overuse these days in terms of implementation.) Would give the game a rather unique look, which makes it stand out, and the effect is really cool as well.

Re: New look

PostPosted: 29 Jun 2011, 12:31
by svenskmand
Yes if it is easy to use these tiles, then lets do it. It will make the game look great :)

Re: New look

PostPosted: 29 Jun 2011, 19:11
by Skorpio
I need to work a bit more on the materials first, because the tiling is still too obvious. I tried to load the claimed stone floor texture in OD, but it didn't look very good. The normal and spec maps didn't seem to work, and the in-game lighting needs to be changed completely.
The new varied tiles require some more work as well.

Regarding the blur effect, this could perhaps be an optional graphics mod.

Re: New look

PostPosted: 29 Jun 2011, 19:58
by svenskmand
When you say that the normal and spec maps are not working then you mean you need to tweak them for the game, or that the game does not render normal and spec maps at all? I thought we had the normal map problem solved as far as I can see it is working on the rockman in the latest release :S

Regarding the lighting then it is pretty buggy, weird colors appear out of nowhere now and then. I think it would be nice to have a possibility to adjust lighting and other level related stuff in the map editor.

Re: New look

PostPosted: 29 Jun 2011, 20:28
by Skorpio
It looked like they didn't work at all.

Re: New look

PostPosted: 29 Jun 2011, 21:17
by oln
The normal/spec maps should work if the material script is done right. Did you change the material script for the tiles? It has to be edited, straight from blender export won't work. Basically just use the old material you are replacing, and replace the texture name.

The reason the lighting is messed up is because the lighing parameters had to be set differently after setting up the new shader, so most materials have had their lighting values reset.
The materials had low values, and the lights had very high intensity to compensate, so when I was testing the new shader on some materials, they ended up super-bright in comparison. The lighing hasn't really been tweaked since that. I am not sure if I have made it possible to set the lighting values in the material scripts again (Did this a few months back.). I will take a look at this at some point.

Re: New look

PostPosted: 29 Jun 2011, 21:32
by Skorpio
I just changed the names in the script, nothing else.

Re: New look

PostPosted: 29 Jun 2011, 21:44
by oln
Seemed like the tiles were normal-mapped when i tested, though it's barely noticeable. You can see it better on the forge. The effect should really be more pronounced, I don't know why it's not.
Edit, seems like the light is too strong, tested with a white texture. The normal mapping is being done, but it seems like the light is too powerful for it to be very pronounced. I think the light intensities have to be reduced a bit. (Cursor light has to be edited in code.) Should be a quick fix.

Re: New look

PostPosted: 30 Jun 2011, 19:36
by Skorpio
I'm trying to create some transitions now and I'm kind of horrified by the amount of transitions needed for only two different textures. You need 30 for all the different combinations of edges and corners. Figure 4. The different material settings of the transitioned tiles are also problematic, since the values of diffuse and specular reflection differ, so the transitions will look a bit brighter or darker.

I think we also have to change the tile placing system. At the moment some tiles are rotated in-game, but that means the textures are rotated as well and don't fit to the adjacent tiles anymore. That means we would need one tile for every possible direction.

Also the claimed wall tiles make problems, because of these extrusions that you can see in the renders. If there is an inner corner some parts of these extrusions are overlapping, so I would have to create a lot of slightly modified versions of these tiles for inner corners to make them fit. Maybe it would be easier to split off the extruded parts and reassamble them in-game similar to how texture transitions work. Then the base walls could be just cubes.

Here you can see my first test transitions between claimed and dirt:
New_tiles5.png

I've also created some stairs if we want to go 3D at some point, and I smashed some barrels. :)
New_tiles7.png

Re: New look

PostPosted: 30 Jun 2011, 20:17
by oln
Skorpio {l Wrote}:
I think we also have to change the tile placing system. At the moment some tiles are rotated in-game, but that means the textures are rotated as well and don't fit to the adjacent tiles anymore. That means we would need one tile for every possible direction.

Yes, we most certainly do. By rotated tiles, are you referring to walls, or ground tiles as well? You are right about the extrusions as well. It needs to be done in a better way, not sure how though, will have to think about that.

I noticed that the models using the default shader didn't seem to be affected by the ambient light setting in any way. (They were very bright with the ambient light value turned down.) So someone will have to go through the material scripts and change everything to use the new shader. Will also have to check how to make it possible to specify the material values in the material scripts again. I think we should use a low value for the ambient light in OD, as light should mainly come from torches and similar, and we are in a cave, not outside.
Regarding the transitions, maybe a specular map could be used?

Re: New look

PostPosted: 30 Jun 2011, 21:13
by svenskmand
Skorpio {l Wrote}:I'm trying to create some transitions now and I'm kind of horrified by the amount of transitions needed for only two different textures. You need 30 for all the different combinations of edges and corners. Figure 4. The different material settings of the transitioned tiles are also problematic, since the values of diffuse and specular reflection differ, so the transitions will look a bit brighter or darker.

It eludes me how he counts 256 transitions between two types of terrain. You only need 4 corners and 4 sides, this is 8, and then multiply that by 2 to get them in the reverse order. That is a total of 16 transitions for 2 types of terrain, which he also says at some point, still why 256 at first?. For n types of terrain you need n*(n-1)*16 transitions, as you need every possible pairs with two different types of terrain. But yes a quadratic number of transitions is pretty much. How many terrain types do we have? Then he mentions the precedence of terrain types, that will of course reduce this number to n*16 transitions which should be manageable.

What extrusion do you talk about? I cannot see flaws in your picture, what is wrong?

The claimed/dirt transition is really nice :D Also good idea with the stairs. We talked about having different levels on the map, back in the days, and I think it would be nice.

The problem with diffuse and specular reflection difference could be solved by instead of using fixed tiles, then make the floor textures as billboards (is that the correct term) that are floating just above the ground, this is used in many games, and it will allow you to use different lighting values as each billboard have different material scripts.

Re: New look

PostPosted: 30 Jun 2011, 21:22
by oln
I not sure if billboards is the correct term, but I think I know what you mean. I was thinking about the same thing. Looks like ogre supports this. Then the floor could be a big square, (Possibly generated with holes where there is lava etc.) instead of an individual model for each tile. (Which might also help performance-wise.
Then it might also be possible to use some blending for the textures which would make it easier to make transitions.

Re: New look

PostPosted: 30 Jun 2011, 21:36
by svenskmand
I was actually still thinking we should use tiles, just that the texture should be a billboard on the tile, and then corner and edge tiles should use opacity. Then the precedence is also easy to implement by just putting those billboards higher than the others on the tiles.

How would you do it with one single large billboard? The texture would be huge and consume allot of space.

Re: New look

PostPosted: 30 Jun 2011, 21:50
by oln
I still meant using "tile-billboards", but the model underneath can be a large square instead of one square for each tile, and you put billboards on top.

Re: New look

PostPosted: 30 Jun 2011, 21:58
by Skorpio
I'm not sure why he mentioned 256 transitions, but the 32 (or 30? why are the first 2 empty?) in figure 4 are still a lot for only one set.

Billboards are quads or triangles that always face the camera and are used to fake distant objects like trees. The fires in OD should be billboards, or we could use particles or a combination of both. I think you mean something like texture splatting, but with texture splatting we would still need a lot of alpha maps for all possible transitions.

Re: New look

PostPosted: 30 Jun 2011, 22:02
by charlie
Texture splatting should greatly reduce the number of transitions required, no?

Re: New look

PostPosted: 30 Jun 2011, 22:19
by Skorpio
I was planning to use texture splatting anyway, but I think I still need a full set of transitions/alpha maps. And then I'm not sure if all these transitions have to be exported as single tiles or if these materials can be somehow assigned to the different tiles in-game.

Hmm, I can't find the billboard page on the OGRE wiki anymore. Someone has to turn the fires into billboards.

Re: New look

PostPosted: 30 Jun 2011, 22:26
by svenskmand
The textures I talk about should just be parallel to the floor of the tiles and only be visible from the top. They should be position just a little bit above the tile, and this ordering will also define the precedence for the terrains. But you still only need to do 12 (I was wrong with 16 before) different transitions for each tile type, i.e. 4 edges and 4 corners, that points outwards and 4 corners that points inwards, you do not need 4 edges that point inwards/outwards as you can just use the other edges. So then you need to to 12*n transitions in total for n different types of terrain.

Then using texture splatting will give even more variation, which is always nice :)

Re: New look

PostPosted: 01 Jul 2011, 20:51
by Skorpio
Yes, I could just combine the 4 different edges and corners, but I'd still need 30 different materials/tiles for all possible combinations. That also means some transition materials would need to have 3 or 4 alpha maps assigned at the same time + the diffuse, normal, and spec maps of the 2 blended materials. I wonder how big the performance hit will be. Maybe I'm thinking in the wrong direction and there's an easier way to create transitions. That's why I mention the problem here before I start to work on them.
Anyway, I need to focus on the wall tiles now, because they're causing enough trouble already.