Wallside texture

This weekend I spent at one of my favorite activities, which I turn to very rarely – painting textures. Here is wall side texture – at ~70% done.

I’m painting in Photoshop at x4 scale and then resize the image to actual size. Second window is helping me see overall image lighting and details (how they will look in actual size).

2016-06-05-wallside-textureThis is how texture looks mapped onto a wallside decal model:
2016-06-05-wallside-modelAnd this is in-game shot:
2016-06-05-wallside-game

You can notice how grass texture pixels appear here and there on the wall. This is deliberate, to make the wall to blend in with the surroundings. On dirt or wand there will be dirt or sand pixels respectively. I’m still uncertain about stretched pixels on wall teeth – terrain textures are mapped planar. Will see about that later (maybe I could simply disallow terrain textures on decals if the stretching is more than e.g. 300%).

Posted in Live progress, Screenshots | 5 Comments

Light texture optimizations

For today’s improvement I have added textures reuse.

kp_2016-06-01_21-05-43

All terrain decals are different models. For example road decals are 6 different models (having 0 – 4 connections to neighbors in different configurations). Each decal now has UV texture of the road. Which lead to one common texture being loaded 6 different times.

Now with textures reuse – all road decals reference one single texture.

P.S. I’m not quite happy with the road texture, it is likely to be changed before Alpha 7.

Posted in How things work, Live progress, Screenshots | 7 Comments

Working on UV mapped decals

Working on combining terrain textures and UV mapped decals:

2016-05-30 roadplan

Posted in Live progress, Screenshots | 2 Comments

Weird reflections

Been working on water shader improvements. Sky reflection in water looks weird, if there’s no sky texture:

2016-05-24 sky in water

P.S. Don’t look on FPS – it’s from my older PC with old GPU.

Posted in Live progress, Screenshots | 3 Comments

Smoothed terrain screenshots

Screenshots of smoothed terrain. Still largely WIP. I’m planning to add normals to mountains next.

2016-05-20-smooth-terrain 2016-05-20-smooth-terrain-2

Posted in Screenshots | 3 Comments

On Terrain

I have got this reply from sado1 (forum link) on previous post about terrain textures. I thought many would be interested in replies, so here goes:

It might be too early to mention that, but right now the terrain looks repetitive at places where there’s a lot of one type of it.

I’m a lousy mapmaker, we all can admit that xD. That is why Knights Province has so few maps and even fewer nice looking ones. To compensate for that I’m spending time to keep KP MapEditor up to date, with editing features that game needs. Among which are:

  • Terrain textures weight control
  • Height-brush area of effect selector (e.g. to edit mountains without changing plains)
  • one-button Skirmish setup

In KaM, we first picked a brush (for example, grass brush), painted all over the grass areas, then picked individual tiles (which looked almost the same as the main, clean grass tile, but they were slightly different) and made the grass more varied with it.

I’m planning to have several grass textures with different decorations (flowers, stones, etc.) Overall the game will likely have 30+ terrain textures. Game engine does not allow to set each individual tile, so the process is likely to be less “custom art” at choosing exact texture flower to be on some exact tile spot. However, engine allows for decals (tile decorations that stick on to tiles surface, e.g. roads are made like so) that could be used for similar purpose, if we have flowers decals mapmaker could choose where to place them to break the monotony of surface. Overall I’m aiming to keep mapmaking simple (pick terrain, paint it down) and “deep” (create beautiful pieces from variety of tools and techniques). I’m very much looking forward to community feedback on how we could make terrains better within engine possibilities!

I assume that’s not the way you’d want it to be in KP. I am not sure you want to let people use tiles at all (I think that instead, you’re opting for simple textures), but how about somehow randomizing the textures, or having 4-5 texture sub-types of most of the terrain variants? The way I see it, a sub-type would be just another brush, but just like KaM individual tiles, it could be used to subtly change the terrain appearance. I think these sub-types would definitely be needed for grass and any other frequently used types, like dirt. On a second thought, though, for the final game it would be ideal to have it for stuff like mountains as well – I’m not sure whether you’re familiar with the procedure of making good looking mountains in KaM (using individual tiles and elevating them properly to make nicely looking cracks etc.), but something similar might be needed for KP too – so, some cracked mountain textures might be nice as well.

Terrain is still composed of tiles, but in a bit different way. Now, instead of tile image they are governed by surface types on corners. Best of all this allows for any terrain to be placed next to any terrain (no more ugly seams that have to be hidden behind trees and such). Right now engine allows for number of ways and variants of making terrain appearance different, it just lacks content and active mapmakers.

By the way, a random question: will mountains cast shadows? 😛

Mountains already cast shadows in Alpha 6 and they will keep doing it in all upcoming versions (unless bugs). The sun in the game is set to about noon, so all shadows are quite short. Editing sun position within certain limits sounds like a good idea.

edit – any plans for animating the textures, for example for lava?

I plan so. My idea is to have 2-3 lava textures that over time will slowly blend into one another.

Posted in Feedback | 1 Comment

Profits from rewriting terrain render

There are a couple of positive effects of rewriting terrain render, among which much better scalability. Previously one terrain chunk (8×8 tiles) was limited to having just 4 textures. Now they are automatically split into buckets with 4 textures each. Here’s debug render with 5 textures in a chunk:

2016-05-17-terrain-buckets

Number shows how many buckets are used in a chunk (+1 extra bucket for decals, which are untextured yet)

*click on images to enlarge (or right-click – “open in new tab”, if this does not work)

And this one has much more:

Can you count how many different textures are here?

Can you count how many different textures are here?

P.S. Textures are being made by Eleni Wat.

Posted in Live progress, Sidenotes | 5 Comments

Thoughts on terrain

Once again I’m thinking about reworking terrain render. Introduction of terrain textures rendered old terrain render approach useless.

Let’s recap how it works. Till now everything gets assembles from tiles. Each tile having from 2 to 20+ polygons to show different terrain type and transitions between them:

tile03

Everything is made from colored polygons here

Now with textures and procedural transitions between them it is no longer necessary to have extra polygons. Each tile can be just 2 triangles (except for special cases described below).

textures

Textures don’t need extra polygons

And then there’s no need for complicated assembly of terrain out of a set of tiles, where each one has to be picked and transformed to fit into its place. All this can be replaced with a uniform mesh where just textures weights have to be applied.

There’s a problem though (or two). Mountains and gorges. Mountains need extra polygons to look mountainous. They need volume and interesting profile. I also want the game to have gorges like these:

2016-02-22 terraced mountains

A kind of gorges that Knights Province needs

Mountains being a smaller problem – they could be made of a separate mesh, similar to “plain” terrain. A more detailed and volume mesh that rise above “plain” mesh only when there are mountains. The problem here is the transition between 2 meshes – it could look unnatural if mountain comes out of grass for example.

terrain

Unnatural example mock up

What is good with this approach, is that is water rendering fits in nicely into this “meshes-layers” paradigm. So there’s flat terrain mesh, walkable and interactive in game (can be flattened and such). Then there’s water surface mesh (which could become editable in MapEd and could acquire some special properties alike “flow direction”). And finally mountains mesh that could be more detailed and much less regular to allow for wilder mountains shapes. So let’s say that evens out the ugly flat-mountains transition.

Gorges are a different problem. I haven’t found solution for them yet ..

Posted in How things work, Ideas | 3 Comments

Knights Province Alpha 6 gameplay on YouTube

From time to time I search for Knights Province on Google or YouTube, to see if there’s anything new about it that I don’t know. Today I have spotted another Knights Province video on YouTube (almost 1 month old). It was interesting to watch someone playing the game with little prior experience and comparing it with Settlers:

Also it was very helpful to see problems with the game (such as crowded maplist or debug keys not being disabled).

Thank you whoever did this video!

Posted in Video | 2 Comments

Performance charts

Rigged those fancy-looking performance charts today. Each section is part of the total frame render time. As you can see, example frame gets rendered under 20ms (equals to ~50fps). Most of the time is spent in rendering of terrain and houses. This will be invaluable tool to deal with rendering optimizations! 🙂

2016-04-25 stacked performance

Posted in Sidenotes, Tools | 9 Comments