Vulkan support

For code related discussions and questions
Vincent
Trained
Trained
Posts: 103
Joined: 06 Aug 2016, 17:24

Re: Vulkan support

Post by Vincent »

I've played Warzone 2100 when I was young so contributing is rather a natural step. And Vulkan makes a good reason to work on it.

Another screenshot :
wzvulkan.PNG
Currently alpha effects (particles) and button are still missing, otherwise I think I've implemented everything.

Edit:
Ok implementing the others pipeline state didn't take long, I've mostly finished the vulkan implementation. The only things not working is color masking on unit and mipmapping.
Vincent
Trained
Trained
Posts: 103
Joined: 06 Aug 2016, 17:24

Re: Vulkan support

Post by Vincent »

red96x
New user
Posts: 1
Joined: 16 Nov 2016, 17:52

Re: Vulkan support

Post by red96x »

Maybe you can apply some changes to the terrain rendering?
User avatar
Ezio
Trained
Trained
Posts: 306
Joined: 24 Apr 2010, 16:42

Re: Vulkan support

Post by Ezio »

is it pushed?
User avatar
Tzeentch
Trained
Trained
Posts: 309
Joined: 14 Oct 2012, 14:24

Re: Vulkan support

Post by Tzeentch »

How you getting on Vinc?
Vincent
Trained
Trained
Posts: 103
Joined: 06 Aug 2016, 17:24

Re: Vulkan support

Post by Vincent »

I'm reworking my code to make the changes less invasive.
Basically I'm wrapping gl calls Inside an API agnostic interface (that's the purpose of the wrap_gl branch whose commits are being merged/tested) without changing rendering logic (I'm keeping terrain rendering code as it, I'm not adding change to lighting).
On top of that I'm backporting the vulkan work I did several month ago.
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Vulkan support

Post by vexed »

Also... https://twitter.com/icculus/status/902386119236612096 :)

So, SDL will soon support Vulkan. :)
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Vulkan support

Post by MaNGusT »

Guys... I don't want to be annoying but when artists will get the full support of tangent-space normal mapping? I mean a support not only for models but for the terrain too. This will make the game much more eye-attrative and will even turn the game experience to a new level. It's a very old graphical technology, comparing to modern games.
I'm waiting it for about 3 years. And I'm still the only one here who could and know how to make normal maps for current terrain's diffuse textures. For obivious reasons.
Sorry for off-topic.
Image
Vincent
Trained
Trained
Posts: 103
Joined: 06 Aug 2016, 17:24

Re: Vulkan support

Post by Vincent »

What is needed for tangent space normal mapping ? With shader it's rather easy to add normal map support to terrain.
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Vulkan support

Post by MaNGusT »

Vincent wrote:What is needed for tangent space normal mapping ? With shader it's rather easy to add normal map support to terrain.
It requiers precompileted normals stored in a model file. 3d software generates and saves normals to models, then we use WMIT tool to convert our models to pies(no normals) or wzm(store normals but this file format is not finished). As for terrain, this work has to be done by a map creating tool.
In conclusion: we need an upgraded file formats for models and maps that will store right normals.
Currently we generate normals on-the-fly and they are not right(they are "flat"), well, they are right only for the current normal mapping but this technique isn't
universal.
Tangent-space normal mapping is a standard in game industry because of many reasons, one of these is that tangent space normal maps(textures) can be easily edited with 2d software like photoshop.
Last edited by MaNGusT on 12 Sep 2017, 23:57, edited 1 time in total.
Image
User avatar
moltengear
Trained
Trained
Posts: 170
Joined: 22 Jul 2017, 15:05

Re: Vulkan support

Post by moltengear »

In the real world, we see a big difference between the lighted areas of the surface and the shadows.
image.jpg
image.jpg (9.82 KiB) Viewed 22924 times
how does the graphics look in this game?
02.jpg
User avatar
moltengear
Trained
Trained
Posts: 170
Joined: 22 Jul 2017, 15:05

Re: Vulkan support

Post by moltengear »

Incorrect display of shadows.
01a.jpg
02a.jpg
03a.jpg
User avatar
moltengear
Trained
Trained
Posts: 170
Joined: 22 Jul 2017, 15:05

Re: Vulkan support

Post by moltengear »

The illumination of the surface does not change due to the position of the camera.
This is the second problem.
field.jpg
room.jpg
render (2).jpg
It's very easy to implement!
Vincent
Trained
Trained
Posts: 103
Joined: 06 Aug 2016, 17:24

Re: Vulkan support

Post by Vincent »

I know what a normalmap in tangent space is, but I don't see what's preventing such support in wz2100 ; it's possible to generate normals and tangents at load time.

By the way the shadow missing on objects is a bug, we draw shadow after terrain but before any object that's why they're missing.
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Vulkan support

Post by MaNGusT »

Vincent wrote:I know what a normalmap in tangent space is, but I don't see what's preventing such support in wz2100 ; it's possible to generate normals and tangents at load time.
we discussed it already. You can't generate right normals at load time because these normals will not have so called "smooth groups" - a place on edge of a model where a normal breakes into two normals to create the sharp edge. We use these technique when creating most of the models. So, the pie format have to be upgraded to store normals of a 3d creating tool.

As for the terrain, yeah, I think we could generate normals at load time and place all map's tris in one smooth group (no sharp edges). When I will get a test build whith these improvements, I can start to work on terrain normal maps.
When I was creating current diffuse textures for terrain, I did some experiments in editor with normal maps, looked awesome and was easy for me to edit them in a 2d software.
Image
Post Reply