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
12
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
User Banned
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
17
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
12
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
User Banned
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
12
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
16
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
12
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
16
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
17
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
9
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
12
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
16
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
12
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
16
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
12
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
12
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.
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 5th Jul 2022 17:55
Hi everyone, i wanted to make an update on the thread. I have been able to install the latest Advanced Lighting in one of my projects, the result is far better than anything i have made in the past. I did spend this last month working with textures and models, so that they can work correctly with the new AL.
I don't believe that i am making the best possible visual result, the new AL is capable of producing way better visual results, i am limited by my capabilities, but i am quite satisfied with what i have been able to make. I uploaded a couple of screenshots with people kicking each other in the face, just to show my progress.

Now i worked out most of the bugs and glitches that i have previously mentioned, but there are two more issues that i can not work around or fix. First thing is that, once an object is added in the AL system, it is not possible to use the scroll (object/limb) texture command. I wanted to use texture scrolling to produce simple effects, (like running water, etc) but mostly i wanted to use it in a custom particle system, so that i could use sprite sheets instead of individual images.

Second is that so far i can only use animated objects that have skeletal animation with bones. Objects that have simple animations, (without bones) will not animate at all. I don't know why, am i supposed to use a plugin or something else?

I would appreciate if anyone had some insight on those subjects.

Attachments

Login to view attachments
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 6th Jul 2022 06:25
Not sure on how AL works. But by the attached pics it's for sure based on shaders. I had a similar problem years ago , i..e. when applying shaders , scroll object / limb texture doesn't work anymore. That must be encoded in the shader itself in some way.
I don't remeber all the details tho.
Check out this old thread: https://forum.thegamecreators.com/thread/214402
No idea about boneless objects animation not working. But why do not use only objects with bones?
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 6th Jul 2022 08:54
Thanks for the reply Scorpyo, AL is a complicated lighting system that uses it's own set of shaders, and it is 100% shader based, i read the thread you posted, seems that a solution will probably require shader modifications. Texture scrolling was possible with earlier AL versions though.
I used boneless animations to add simple animations to background objects, for example rotating wind turbines, moving vehicles, and other things, now backgrounds appear lifeless, only trees are animated normally because of the tree and vegetation shaders.
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 7th Jul 2022 07:36 Edited at: 7th Jul 2022 07:39
1) I wasn't using AL in my case.
What I did was to load the relevant bump mapping shaders kindly modified for by GG in order to have a controllable constant by DBP at runtime.
i.e.
load effect section:


shader section for UV scroll:


Then applied the shader (effect in DBP) to all my limbs after loading the images and the bumps :



Then controlled the scroll at DBP runtime:


2)
Quote: "I used boneless animations to add simple animations to background objects, for example rotating wind turbines, moving vehicles, and other things, now backgrounds appear lifeless, only trees are animated normally because of the tree and vegetation shaders."


Ahhhh, Limb rotations stopped working after a while after several DBP upgrades ( but I also think it was due to Windows upgrades which modified DirectX libraries, not sure)
At that point I had to add rotation joints to all my objects . I do that in Milkshape. see attachment.

Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 9th Jul 2022 13:22 Edited at: 9th Jul 2022 13:22
Quote: "Ahhhh, Limb rotations stopped working after a while after several DBP upgrades ( but I also think it was due to Windows upgrades which modified DirectX libraries, not sure)
At that point I had to add rotation joints to all my objects . I do that in Milkshape. see attachment."

That's interesting, so far this has not occurred for me, although after a windows update i think that something stopped working correctly regarding lighting (with the native DBpro commands) with old projects, but I only use shaders now so this is not a problem.
Anyway i am working around the animation problem, i will add bones where it is possible, and control some things with code instead of animation.

About the texture scrolling, i see how you fixed that issue, but still shader modification was needed, I don't have much experience working with shaders but i will attempt to modify the AL Alpha shader and see if it works.
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 13th Jul 2022 21:19
Ok, texture scrolling works, I modified the shader and it works fine, thank you Scorpyo! Non skeletal animations work too, with animation pluggins instead of DBpro commands, so those two issues are fixed.
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 19th Jul 2022 07:20
Great !
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 31st Jul 2022 07:13 Edited at: 31st Jul 2022 07:13
Heirarcical animation is beyond legacy at this point and pretty much any shader will assume bones and offset vertices based on bones

My biggest complaint with AL updates is undocumented changes to which texture channels control what shader values.

I guess dropping previously robust systems like terrains and particles is also a big issue, but Evolved's work is always impressive.
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.
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 3rd Aug 2022 18:02 Edited at: 3rd Aug 2022 18:07
You are right Ortu, the earlier AL versions were more complete from many aspects. I could certainly use the particle system and the shader variety of the earlier versions. The latest version has only basic shaders and they are all affected by lighting sources, there is no option to exclude them now from environmental lighting. I made a custom particle system to use with the latest AL, but it is very simple and basic and doesn't really look very good. I want to add hit flashes and projectile effects, unaffected by the environment and lighting, but I haven't figured out how to do it. The particles now look too dimmed or too bright, depending on the environment. This will probably need a modified alpha shader that will not receive data from AL lighting sources, I think i can do that. Controlling object's opacity would be a nice thing too, to make objects fade in/out smoothly, but I don't know how to do it. I guess i will have to add an alpha value somewhere in the shader, like i did with the texture scrolling.
But even with the missing features, Evolved has made an outstanding work. Makes me think what would be possible with dbpro, if TGC continued to support it. Are you going to switch to the latest AL?

Login to post a reply

Server time is: 2024-04-26 07:42:05
Your offset time is: 2024-04-26 07:42:05