Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / [SOLVED] Evolved's Advanced Lighting and DBPro 9Ex

Author
Message
Dimis
10
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 16th Feb 2022 17:38
Hello, i have been away from our forums for quite a while, good to see there is still activity around, also there are some DBpro newcomers too, which is pretty awesome.

I was wondering if anyone is following Evolved's progress with Advanced Lighting. For those who don't, it might worth a download just to try his test programs, the "trees" program with the water shader is quite amazing. It is still a wip and i hope that he will continue to work on it.
Now, I made a test scene with my own models, to try the latest version of AL. It compiles with no problems with the DBpro 1.077 version , so far i only encountered a problem and it has to do with object limbs disappearing when the center point of the limb is outside of the camera view. I don't know if that is an AL or a DBpro issue, but there might be an easy fix for that. Anyway that is not my actual problem, i want to try to install then latest AL to my game, but i am developing it with the DBPro 9Ex version and i don't want to go back to 1.077 version. The latest AL and DBPro 9Ex don't work well together. Compiling on different computers produces different results, for example compiling at my work's pc makes all objects to appear black, compiling at my home pc produces a different problem, all objects appear correctly, but when the 0,0,0 world coordinates are outside of the camera view the display goes black (or at least i think that this causes the problem). In any case i use the "use legacy shader compiler" command otherwise the compiled exe produces shader compilation messages and doesn't work.
The thing is that using the latest AL, the result looks better and modern so i want to try to install it, the shaders that i use in my game now are pretty fine but they look outdated. So i wanted to ask if anyone had any luck running correctly AL on DBPro 9Ex.

Thanks in advance for any help or advice!

The author of this post has marked a post as an answer.

Go to answer

Bored of the Rings
17
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 16th Feb 2022 17:58
Yes I use dbpro ex and AL runs fine
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
James H
15
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 16th Feb 2022 18:39 Edited at: 16th Feb 2022 18:44
Evolved uses 1.0761 version, there is a chance I guess of it working with 9Ex with that version instead, iirc 9Ex overwrites some but not all of any versions updated files. Edit: did not see BOTR had replied lol!

My desktop machine is 1.077 RC7 (no 9Ex) and black objects where an issue because of the resolution, which I think was down to the virtual texture size being bigger than my max res(height) of 1024*768(old flat tv screen limits it to this - my gpu being more than capable - 750GTX). This is a DBP limitation, I did ask on Evolved's forum and he/she did reply this was the reason. In that particular version which was some time ago now, it was straight forward to change that, iirc the newest version isn't as simple, you have to change stuff in at least one of the include files as opposed to the main source in previous versions.
This was coupled with trees being completely translucent and flickering in a strange manner as well as the odd additional trees I added having different sized imposters to the original tree...I had to change code to allow for some manual control of the scale of imposters per tree type. Eventually I got that version fully working at such a low res. Then he/she released a newer version and no matter what i did this time around the reflections in the water where messed up - there was major reflection artifacts and camera update issues for rotations for the reflections. Since then another update was released and the code itself changed significantly, so I didn't even bother to try properly as I was going to buy a new machine.

So I now have a cheap gaming laptop purchased recently along with a new screen, and with version 1.0761 the newer version works perfectly, the older version I managed to alter enough to work at low res works fine(pre compiled) so long as I don't use two monitors for my desktop screen - I have to choose one or the other.

That is about as far as I have got as my job ensures I work long hours and extra days, will be weeks before I have enough time off to delve into this again. I need to switch around hardware and reinstall under different DBP versions, do some more tests to find out what results in what. maybe even use 9Ex with each version, but like I said will be weeks away from doing this and that is only if RL stuff doesn't interfere with my time outside of work. Also there is a high probability Evolved will have made another update by that time!
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
Dimis
10
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 16th Feb 2022 21:35 Edited at: 16th Feb 2022 21:47
Thank you both for the quick responses!

Bored of the Rings
So you can compile AL with 9ex and there are no problems? That's good, maybe i should try to download and install DBpro again, there could be something wrong with my installation.

James H
So, screen resolutions, that is indeed something i didn't thought about, so i just checked. Running tests (latest AL compiled with 9ex) on my gaming laptop had another issue, the app window was invisible while the program was running normally. So i just replaced the "screen width(), screen height()" commands with literal values (1920x1080) and that problem now is gone, the window is visible. Now i use at my work a desktop pc with 2 monitors with extended desktop, so maybe this is creating the black objects.
I asked once Evolved about 9ex and AL, and Evolved responded that he/she doesn't use 9ex because of it's instability. Evolved keeps updating AL from time to time and i want to implement and keep one version permanently as long as it is working properly, the version that i currently use is very old, but it is working perfectly. The thing is that, now that i saw the visual result with the latest AL and my models and i just can't unsee it....

Now the problem with the screen display going black when the camera moves beyond a point is still there, here is a video i just uploaded showing the problem. This is an issue that happens only with 9ex, it doesn't happen when i compile with 1.077.

edit
The black area to the right and bottom of the video is because of the video recording, not part of any mentioned problem.

Bored of the Rings
17
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 17th Feb 2022 07:30
the only thing I had to do that I recall was include the include files into the project physically. I'll post a screendump at some point today if I get time.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Dimis
10
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 17th Feb 2022 08:09
i had to include all AL in 1 file too, otherwise it couldn't compile. the problem with the black screen insists no matter what i try , it seems that as long as i keep the world center inside the camera view everything is ok, when i move the camera away from it, display becomes black.
here's another test scene
Kuper
14
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 19th Feb 2022 14:28
Geometry can be hidden beacause of wrong camera culling ( Evolved use very complicated culling system which uses second .exe file and passing data to it via sharing memory ( I guess ) )
or it may be not correct AL shader render ( dir light or post processing mostly )
Try to switch off post processing, lights and so on - one by one - to find what works ok and what not.
By the way, on his forum Evolved mentioned that he did not use Ex version because of permanent errors.
As a advice I can say that AL is a great stuff, but you need to know what each module is doing and how, to avoid different glitches and bugs in future.
Dimis
10
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 27th Feb 2022 14:41
Thanks for the advices Kuper, i was able to work around the problems i mentioned by tweaking some numbers in AL code, everything works except the black screen issue, i had to keep the 0,0,0 world coordinates constantly inside the camera view just to do some tests , but even so, you are right i should consider that this version of the AL could produce problems in the future, something to take under consideration. I don't really know how this AL version works, i should continue with the version i am currently using because it is safer, although the latest one is very tempting.
Ortu
DBPro Master
14
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 9th Apr 2022 04:06
Evolved's work is amazing, but it can be hard to keep up with the changes and full on rewrites with very little documentation or even comments.

I stopped trying to update AL after the terrain module was dropped but I definitely get the temptation to use the newer stuff
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Mage
15
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 13th Apr 2022 01:04
I have found just generally speaking that I seemed to need to know how to reprogram the shaders, as often you'd need one more light or combine one effect with another. Maybe you want that fancy water effect, but wish the water wouldn't ignore lighting. The shader examples are great but never seem to quite fit one's specific needs.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
sman512
7
Years of Service
User Offline
Joined: 28th Nov 2014
Location: Russia
Posted: 3rd May 2022 06:35 Edited at: 3rd May 2022 06:47
Just replace all "al set object radius -1" to "set object radius 9999^9999" it worked for me.
GS
Dimis
10
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 4th May 2022 13:54
sman512, thank you, that seems to be the answer, my test scene now works with 9ex. This probably should be applied to every object on screen, because for example sometimes the main character on my test scene still disappears under certain camera angles. So this could produce again problems involving object radius, like accurate collision detection, but still i would rather deal with that kind of problems because there is always a workaround.

Mage, you are right, actually i would rather use my own shaders and a custom lighting system, but i haven't learned to write my own shaders. For example i wanted to try a stylish cartoon approach on my test scene with post fx (bloom, edge detection, hue/saturation control) and cell shading, i liked the result but the lack of multiple lighting sources, no normal mapping on characters, and no shadow casting was pretty bad. At least, if i could have cell shading with shadow casting, i could use that instead of Advanced Lighting.

Ortu, indeed the latest version is very tempting. Now that sman512 found a solution i will probably try to install it in my game when i have the time. Of course that's going to be a large amount of work, and after that, a lot of testing will be needed again to clear possible bugs, performance tests, etc. But if it works i will stick with it, no need to update any further.
Still there is nothing wrong with the AL version that i use (i think you use a version latest than the one i use), it just looks outdated now. I only wish there was a way to add some post process fx, but that doesn't seem to be possible with any version.
I wonder if Evolved is still working on it, there has been no updates since November.
Kuper
14
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 4th May 2022 21:28
@sman512
yes, I also had such problem, but i use "set object radius 0" instead. It turns frustum culling off - not making object culling radius huge.
Dimis
10
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 5th May 2022 14:26
This post has been marked by the post author as the answer.
Kuper, sman512, thank you both, i will mark this post as the answer.
Seems that the best way to go is to replace all "al set object radius -1" to "al set object radius 0" or "al set object radius 9999^9999", both seem to work the same perhaps it is better to set the radius to 0 instead of infinite range.

So far all the problems that i mentioned have been fixed, i still need to test on more machines to make sure.
Kuper
14
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 5th May 2022 18:36
Unfortunately some of DBPro commands are not fully documented. Some has hidden set of parameters, mostly of them I found looking inside someones code examples, here on the forum.
Such examples as:
set object radius 0
or
make object plain size x, size y, faces count x, faces count y
Dimis
10
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 13th May 2022 08:04
Kuper, that's interesting, there might be some useful commands and features, undocumented.
More on the last subject, from one hand al Advanced Lighting objects need to have their radius set to 0, but at least in my test scene, to avoid game objects (like characters, trees etc) from occasionally disappearing again they all need to have their radius set to a value that is depended on how much they have been scaled up in the game. Otherwise they will still flicker or disappear when viewed from certain camera angles and positions.
I have set up my test scene to work perfectly with the latest AL, now this weekend's challenge is to try to install it in a game. I will come back to report whatever results i get.
Dimis
10
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 26th May 2022 21:34 Edited at: 26th May 2022 21:37
Hi, i wanted to add an an update on the subject.

Again my thanks to everyone who helped with the AL issues that i previously mentioned. I have managed to install the new AL system to one of my projects. It took a lot of tweaking, experimenting with object radius, draw distances, and some other things, but so far it works and it is pretty exciting to see the new visual result!

Still another thing that needs to be resolved is the particle system. Evolved has made a pretty awesome particle editor tool, but the particle system inside AL is still missing a lot of functionality, the version that i was previously using is far more advanced in that area. In the new AL it is easy to add a steady emitter, (like a fire emitter on a torch) that emits particles continuously, but not so much for particle emitters with short life, like hit flashes or explosions. Something doesn't work, or maybe i am doing something wrong. I want to have emitters loaded and hidden, and have them emit particles at certain coordinates when it is needed (that's how i used them with the previous AL), but once i make an emitter invisible, or use a play/stop/emit function the emitter will not show up again, also sometimes the autodelete feature will not work. So i want to make a custom particle system, but i don't know if it is possible to control an object's opacity with the AL shaders, to make particles that fade out and disappear smoothly.

Login to post a reply

Server time is: 2022-05-27 16:30:05
Your offset time is: 2022-05-27 16:30:05