December 09, 2019, 08:48:47 AM

Author Topic: OpenB3D Questions  (Read 6544 times)

Offline Krischan

  • Full Member
  • ***
  • Posts: 200
    • Krischan's Homepage
Re: OpenB3D Questions
« Reply #45 on: February 17, 2019, 12:00:52 PM »
No Mark, I have to thank you. With OpenB3D, my project looks much better than all MiniB3D tests before. Optimizing the shader is a good idea, yes it is test.frag. I'm still not very good writing shaders and this one became complex. I'd like to have a shader style like in "Legend of Grimrock" (it looks very similar but the name is a coincidence and my game will work different than LOG), with nice lighting and shadows but I never achieved it, not even close. So more help is welcome and appreaciated.

As you can see in the test.frag I'm using Distance Fog, Tone Mapping, some kind of flashlight illumination/attenuation and a fake bumpmap to create depth. It looks somehow nice but is far away from a really good looking shader. And I had problems to make the shadows work with my level geometry.

I think another important point are very good normal textures, I'm using my own "Legend of Faerghail Normalmap Generator.bmx" to save time by converting a diffuse map into a normalmap, but all normalmap textures should be drawn by hand according to the diffuse map to have better detail (though my tool already creates nice results in a single mouseclick). To make it work again you must comment the "Import brl.d3d9max2d" and uncomment the "Import brl.glmax2d" line, I don't know what happened there (I'm getting a _d3dDev.Reset failed)

Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
My Blitzbasic Archive | Extrasolar Project | My Github projects

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 409
Re: OpenB3D Questions
« Reply #46 on: February 23, 2019, 11:12:20 PM »
Hi Krischan,

yes that does look awesome, much better than LOF. I have been kind of distracted getting multisample antialiasing (for Windows) running and fixing several bugs with ClearWorld, which is still not finished.

I think the soft shadows there are shader based, I was talking to RonTek about this and he posted some code which I'll try to convert to Openb3dmax, here's the link.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2220
Re: OpenB3D Questions
« Reply #47 on: February 23, 2019, 11:20:01 PM »
@Krischan - That looks really impressive and highly professional, nice work indeed :)
Until the next time...

Offline Derron

  • Hero Member
  • *****
  • Posts: 2607
Re: OpenB3D Questions
« Reply #48 on: February 23, 2019, 11:31:49 PM »
@Krischan - That looks really impressive and highly professional, nice work indeed :)

Are you talking about the screenshots (Krischan's work) or the gameplay video (of another game) ?


bye
Ron

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2220
Re: OpenB3D Questions
« Reply #49 on: February 23, 2019, 11:43:22 PM »
Quote
Are you talking about the screenshots (Krischan's work) or the gameplay video (of another game) ?
Krischan's work of course. I do know that LOG is not his :P. I kinda missed this thread and only just read through it.
Until the next time...

Offline Krischan

  • Full Member
  • ***
  • Posts: 200
    • Krischan's Homepage
Re: OpenB3D Questions
« Reply #50 on: February 24, 2019, 12:58:38 AM »
Thanks Qube, you should see it in action (if it runs, see PM). But I didn't make any progress in the last months as Mark and I had to find out and fix some nasty OpenB3D bugs first, which is this topic about.

And without Mark, it would not exist in this form. So thanks again to Mark for OpenB3D at this point ;D
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
My Blitzbasic Archive | Extrasolar Project | My Github projects

Offline Krischan

  • Full Member
  • ***
  • Posts: 200
    • Krischan's Homepage
Re: OpenB3D Questions
« Reply #51 on: February 24, 2019, 01:15:42 AM »
yes that does look awesome, much better than LOF.
Very true, but it hurts :P. To distinguish the two games better I've switched the name to "Faerghail" only. Faerghail already looks nice but it could look even nicer. Perhaps you have an idea how to pimp it.

I think the soft shadows there are shader based, I was talking to RonTek about this and he posted some code which I'll try to convert to Openb3dmax, here's the link.
Yes, Grimrock is using shaders for everything - and they have very nice and clean normalmaps (see attachment). For OpenB3D I would prefer a simple shadow solution that I could add to the game without having to rewrite much of it.
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
My Blitzbasic Archive | Extrasolar Project | My Github projects

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2220
Re: OpenB3D Questions
« Reply #52 on: February 24, 2019, 01:39:33 AM »
Quote
Thanks Qube, you should see it in action (if it runs, see PM).
Thanks for the PM :) - I wasn't aware of the original but was that an Amiga emulator in an exe? lol, so cool. Where are such magics from? ( so behind the times )

I tried your other zip file in both VM and native boot but each one failed unfortunately. They both got as far as showing the screen res options > loading splash screen with compass and then an "EXPECTION_ACCESS_VIOLATION" error.

I only have Windows 7 via VM and Windows 10 as a native boot so if you want me to install any bits and pieces or debug stuff then feel free to send as much as you want :)

*edit* - The other exe's in the zip file for the maps and stuff appeared to run fine though.
Until the next time...

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 409
Re: OpenB3D Questions
« Reply #53 on: February 24, 2019, 02:09:13 AM »
Qube, it could be the shader code, it only runs in GL 2.1.

Krischan, yeah don't get me wrong I think the art in Faergail is fine but it needs nicer bumpmapping code, which would be correct angle calculations and less glossy, maybe the lighting is a bit better too.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2220
Re: OpenB3D Questions
« Reply #54 on: February 24, 2019, 02:24:31 AM »
Quote
Qube, it could be the shader code, it only runs in GL 2.1.
Does that not work on Window 10?
Until the next time...

Offline Krischan

  • Full Member
  • ***
  • Posts: 200
    • Krischan's Homepage
Re: OpenB3D Questions
« Reply #55 on: February 24, 2019, 11:19:11 AM »
Qube, it should work on a native system but not in a VM, perhaps VMware but I don't own it. Which graphics card do you have: ATI/nVidia/Model? GPU RAM size? Here it is working on Windows 10 x64 Pro 1809 with a nVidia RTX 2080/8GB, Driver version 417.71 which is not the newest but still new enough.

And yes, the Amiga emulator is WinUAE (here the old version 3.4) which comes in a single exe today, I've only renamed it. The harddrive setup was complex but it runs very good and fast. You can restore an old savegame like "Aktuell" or "Schloss" which is inside the castle to see the difference between the original and Faerghail. But don't expect too much, this game is 30 years old now, this is "gaming stone age".

Mark, I know the bumpmapping is not correct, there is much room for improvements or we should use a complete new shader. I was starting with the bumpmap2.frag example, wasn't happy with it and rewrote everything to meet my needs. But writing shaders, I'm still a newbie. They are hard to debug and there are a lot of mathemetics and procedures inside I don't understand yet.
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
My Blitzbasic Archive | Extrasolar Project | My Github projects

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2220
Re: OpenB3D Questions
« Reply #56 on: February 24, 2019, 02:02:20 PM »
Windows 10 is native and not VM. I tried native first and then a VM but both failed. I have a few games installed on Windows 10 so all needed bits should be present.

GPU is a Radeon RX580 8GB which should be up to the task :)
Until the next time...

Offline Krischan

  • Full Member
  • ***
  • Posts: 200
    • Krischan's Homepage
Re: OpenB3D Questions
« Reply #57 on: February 24, 2019, 03:15:30 PM »
Then it must be the shader itself as I can't check the game on a ATI card here (I can only debug the shader source using the included glslangvalidator.exe which says it has some errors inside but works so far, at least on my rig). I decided to keep Intel+nVidia for my new rig as this combination never made any problems (even if it is much more expensive than AMD) and got rid of all AMD stuff years ago. Perhaps I'll buy a smaller rig with AMD/ATI only for my wife in the future to test the games there, but not yet.

However, you can change the EXE with the attached one, which is a recompile with the basic.frag shader which has no compilation errors, perhaps it works. But it looks not so good like the test shader. Or fix the shader bug to make it run with ATI and recompile it with BlitzmaxOS and the latest OpenB3D by yourself, the full source is included. ;D
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
My Blitzbasic Archive | Extrasolar Project | My Github projects

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2220
Re: OpenB3D Questions
« Reply #58 on: February 24, 2019, 10:14:48 PM »
That one worked fine, thanks. Still looks really good without a fancy shader :)

Quote
I decided to keep Intel+nVidia for my new rig as this combination never made any problems (even if it is much more expensive than AMD)
Mine is a special Apple version in an iMac so it's super expensive for what it is :P
Until the next time...

Offline Krischan

  • Full Member
  • ***
  • Posts: 200
    • Krischan's Homepage
Re: OpenB3D Questions
« Reply #59 on: February 24, 2019, 11:12:41 PM »
Good to hear that it works now. Looks like I have to put more effort into the shader QA. Ok, new release date for Faerghail is set to Fall 2059, after my funeral :o

I abandoned iMac after they decided to go for Intel+AMD, a bad combination IMHO - either one should use the overexpensive Intel+nVidia combo or go for the cheaper rebels from AMD instead. But don't mix it. And I still remember the problems I had back in 2001 with my Radeon 8500, never again, they've lost me as a customer forever.

My previous iMac was the Late 2013 (i7-4770+nVidia 780M) which is still a really good machine but after 5 years it became "too slow" for me (I know, first world problems :D) so I sold it and got my new rig which is really up to date now. And now as they'll go for ARM in the Macs, Apple is history to me. Good luck without Steve Jobs, I'm off.

If I want to take a look into Mojave I now start Virtualbox and there is my old system again (thanks to Disk2VHD) which is now encapsulated as a slave of Win10 :-D Was not that easy but it's working. But I'm working 99% on Windows, so it is merely a waste of SSD space, I've been just curious if it works.
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
My Blitzbasic Archive | Extrasolar Project | My Github projects