Page 13 of 13

Re: Structure Improvement

Posted: 11 May 2020, 19:36
by Colditz
Looked at the current AR release with my saved games today, and hell you did a really superior job on this. I like the freedom of art you took with tracks and wheels propulsion. (but I have my suggestions for other things...)

Anyway, I really like to participate again if my time is enough, but you may have to explain a few things you do for the work flow (which texture files, sizes, player colors, polycount limits, mesh smoothing etc).

I also saw that you are using specular maps, but not very efficient. Especially the flat base textures for the main buildings could need you a good rework.

I also thought today about a different approach for the base textures (Desert, Urban and Snow). Instead of using 3 different textures, we could define one base texture with alpha channel and blend in the ground texture beneath.

Re: Structure Improvement

Posted: 12 May 2020, 03:45
by MaNGusT
Unfortunately we lack of coders familiar with graphic engines. As you can see it took enough time to implement support for tangent-space normal mapping for units. Almost a year has past but this code is still in a stage "we want to release 3.4.0 but don't know when". When it'll be released, next step will be, I hope, adding tangent-space normal mapping for terrain.


Colditz wrote: 11 May 2020, 19:36Anyway, I really like to participate again if my time is enough, but you may have to explain a few things you do for the work flow (which texture files, sizes, player colors, polycount limits, mesh smoothing etc).
1) 2048x2048 textures for all stuff that I do, which later could be downscaled depending on scale of a model: 2k for big structures, 1k for big defensive structures and features, 512 for units, small defensive structures etc.
2) add teamcolor texture for buildings that didn't have teamcolor before due to limits of engine. (e.g., look at the new command center.)
3) polycount limits are simple at current stage: <=300 tris per part of a unit, so tank consist of ~1000 tris (2x300 propulsion + 300 body + 300 weapon).
Buildings are unique, 1000-2000 tris for a factory, I think. Jorzi knows better about it.
4) Smooth groups are supported.
5) Mirrored(and overlapped) uvw coords are supported.

workflow:
1) export model to obj with smooth groups and triangles enabled (triangulate model before baking normal maps)
2) open it in WMIT to see that model has proper size and shows without artifacts, save it to pie3 with normals enabled. Use special shaders for wmit from Armod repo because it still need some fixes.
3) Use this master build to test your models in game. May be you will need shaders from main Armod repo (those that are not for wmit). We are still on the way to synchronize this stuff.

If you still have questions, better pm me or Jorzi. I see email notifications on my phone/pc when someone pm me here. :-)
I also use 3dsmax and know some tricks how to force it to show model+textures in viewport exactly like in game.

EDIT: changed urls to official.
EDIT2: fixed light in shaders for wmit, pls dl again

Re: Structure Improvement

Posted: 14 May 2020, 07:30
by Jorzi
Hi
You can always make the texture as big as you want, it can be downscaled later. The important thing is to not get into the trap of adding huge amounts of tiny details onto small models just because your resolution allows it. I think MaNGusT's guidelines are good.

As for polycount, the limiting factor right now is the shadow casting algorithm. I think Per did some tests with shadow buffers at some point, but for now we are stuck with stencil shadows, where the shadow volume mesh is generated on the fly each frame (on the CPU).The parts that really need to be optimized are of course those that are going to be filling the screen the most (half-tracks, tracks, tank bodies, mg:s, cannons, lancers, cyborgs etc.)
Structures are always limited per player so the polycount makes less of a difference (except for walls, towers, bunkers maybe). Features are also usually spread out evenly on the map, rather than concentrated on the screen, same with oil derricks.

The exception might be NTW-style maps, but who plays those for the graphics anyway? People can just disable shadows in those cases. In my experience, as long as you have shadows turned off, you can spam polygons with basically no performance impact, assuming you have a reasonable GPU from within the last 15 years.

Re: Structure Improvement

Posted: 16 May 2020, 18:51
by MaNGusT
I was wrong about compression and alpha channel, you should try, may be it will look good enough.

As for me, I always thought that we will use deep foundations for every structure to not change map geometry.
Something like this
Untitled.png

Re: Structure Improvement

Posted: 16 May 2020, 19:50
by moltengear
MaNGusT wrote: 16 May 2020, 18:51 I was wrong about compression and alpha channel, you should try, may be it will look good enough.

As for me, I always thought that we will use deep foundations for every structure to not change map geometry.
Something like this
Untitled.png
In real construction, a bulldozer always levels the landscape before the construction of a building. Therefore, when the landscape is leveled before construction, in principle, this is logical

Re: Structure Improvement

Posted: 21 May 2020, 15:27
by aliswe
But concrete slabs are easier (to implement than modifying the terrain!!) and will fit in better with the idea we have for roads (along with bridges, tunnels).

See this issue where I made a quick sketch of the same idea, Mangust: https://github.com/Warzone2100/warzone2100/issues/302

Also, guys, please join the Discord please!!! https://discord.gg/QREfx9G

Re: Structure Improvement

Posted: 21 May 2020, 16:51
by MaNGusT
I agree with Moltengear, leveling the terrain for big buildings is logical. Also it's the easiest way to use flat baseplates. It already works and everybody's happy.
As for deep foundations, they should be created for defensive buildings, at least one for each type(for variety) because defensive turrets are often being built on uneven terrain, e.g. at edge of cliff. This is also the simplest way to fix texture stretching.

Roads are fine currently. Bridges will require some changes to code, especially for AI.

Aliswe, I would suggest you to concentrate your energy on one thing and bring it to the finished result. :-)

Re: Structure Improvement

Posted: 22 May 2020, 12:29
by aliswe
I did do the smoke trails but waiting for it to get some attention ... now I'm just getting some fast satisfaction out of doing small features, here and there. :lol2: