AGK2 questions

Started by GaborD, December 02, 2017, 18:23:13

Previous topic - Next topic

GaborD

Could any of the AGK experts be so kind and give me some info on how flexible AGK is in terms of shaders and rendertextures? Pondering about buying it and diving in.
I was so annoyed after the last abandoned engine fiasco that I haven't worked on a hobbyist game in almost a year. Time to start new and fresh.

Would it be possible to freely write own lighting, shadows and post chain systems in shaders? Basically completely ditching the in-engine lights/shadows and using AE lights, PBR shading, own shadows and custom GI instead.
Can for instance rendertextures be chained together in a refresh for runtime capturing and GGX convoluting lighting probes?

How flexible is the post system? (I saw in the docs that there are fullscreen shaders, but there isn't much info about them) Can we use them to force the main rendering to write HDR data into a 16 or 24 bit tex-buffer to then be used in post for things like HDR bloom and tonemapping? Rendertextures seem to be only LDR according to the docs (RGBA32 or depth) and the docs for LoadFullScreenShader really don't state much. Worst case the data could be RGBA packed I guess, so this can probably be worked around, but still, would be easier if it supported the nifty things.
GLSL 1.1 is ofcourse really old, but I can live with that. Makes sense with all the export targets.

Also, the "automatic shadows" and similar entries make me a bit cautious, reminds me of some engines that have some of these things hardcoded in their blackbox innards, which makes them uninteresting to me (a big part of the fun is tailoring these things specifically to a game). Unless in AGK those features are shader side and are circumvented by using own shaders, then it's all good.

Sorry for the annoying newbie questions but I am desparate for a flexible but easy to use engine. *Places an evil curse on Matt for letting NB die*
I am surely not the only one missing the good old B3d and NB days. :)

Qube

I'm not an expert on the shader side of AGK but I know they can be applied to sprites, 3D objects or full screen.

QuoteWould it be possible to freely write own lighting, shadows and post chain systems in shaders? Basically completely ditching the in-engine lights/shadows and using AE lights, PBR shading, own shadows and custom GI instead.
There are shaders written by AGk users that do shadows and lighting, even volumetric light scattering ( God rays ) so I think it's flexible enough. Take a look at the recently released shader pack created by Janbo which has a good variety of what can be done https://forum.thegamecreators.com/thread/220091

If I recall, PBR is coming to AGK but I don't know when.

Quoterendertextures
Not sure if this is the info you want but... You can render to a texture ( image ) and then use that texture in both 2D and 3D.

QuoteAlso, the "automatic shadows" and similar entries make me a bit cautious
The automatic shadows in AGK are just based on sun direction at the moment. There are currently no built in point light shadows and the current built in shadow options are a little light on the ground, but very easy to setup.

QuoteUnless in AGK those features are shader side and are circumvented by using own shaders, then it's all good.
Yes, you can use your own shaders for 2D / 3D shadows and lighting.

QuoteSorry for the annoying newbie questions but I am desparate for a flexible but easy to use engine
Lol, I don't think your questions fall into the newbie section :P - AGK is really nice but keep in mind that the BASIC Tier 1 side is not compiled, so if you need heavy logic per loop you may be better off using the Tier 2 C++ side. Also AGK is not perfect ( is any language? ) and some of it's working are a little quirky but if you want a fun, easy to use, quick to learn, feature rich and powerful language then AGK is definitely worth a look.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

GaborD

Thanks for the info, sounds really good. The thread you linked has some interesting shaders, which means a lot can be achieved with the custom shader approach.
I can live with some quirkiness. :)

I guess I will just buy it and then port my PBR shaders over from NB/C3D and see how far I get.
As long as I can find a way (even if it's a bit convoluted) to calculate GI and specular probes in-engine and then store them out, it will be all I need for a small game.

Qube

#3
QuoteI can live with some quirkiness. :)
That's the spirit :P

QuoteI guess I will just buy it and then port my PBR shaders over from NB/C3D and see how far I get.
As long as I can find a way (even if it's a bit convoluted) to calculate GI and specular probes in-engine and then store them out, it will be all I need for a small game.
You may want to have a chat with Janbo on the AGK forums as he's pretty knowledgable on the AGK shader side.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

MikeHart

What Qube said. But to work with these features you have mentioned, in sounds like you have already a huge knowledge and I think it would be better that you work natively with your own engine and in C++.

Steve Elliott

#5
Gabor from NB is indeed a Shader Wizard.  Good to have you here.  :D
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Kronos

#6
I believe that AGK is limited to only 8 texture units. the various in built functions such as normal mapping and shadows uses some of these which reduces the number of texture units available even more(per object). Model loading is fairly rudimentary. It seems bad at identifying child-meshes within objects and does not load textures at all with models, you have to load separately which is a bit of a pain. Also the IDE is pretty crude.

GaborD

#7
Thanks guys!

Ran some first quick tests, so far so good. Got my PBR shader with HDR, UC2 tonemapper, roughness aware IBL probes and GGX-specular realtime lights working.
Still some issues with it, like the engine not providing binormal and tangent being a pain when normalmapping and dds not being supported, but those can be worked around for now.
Speed seems decent, but I only used some spheres so far, so that doesn't say much, haha.

Going to delve deeper if I have some time this week, back to work now. Was lazy so far today and just goofed around with AGK.


MikeHart

What is the hardware you are running it on?

Rick Nasher

Looking pretty good! Willing to share your custom shaders?
_______________________________________
B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

GaborD

#10
GTX1070 and sure, I'll gladly share things when they are stable.

Once I figure out binormal/tangents in AGK I'll add parallaxing to this, then it could be a semi-useful base shader.
It does however use my custom format for the reflection probes. (GGX convoluted and RGBA packed latlong images that are vertically stacked for the different roughness values, all the way to the last level basically being captured diffuse lighting). But maybe I can figure out how to make those in AGK too. In NB it's easy due to the flexible rendertex functionality.

Nice to see some known names from the old NB and B3D days around here.  :)

Yue

Hey, good to see you around. Welcome back.   :)

Naughty Alien

..heyy Gabor..nice to see ya lurking around here..very very good..now, appart from AGK, i wouls love to see you pick on OpenB3D and BMX...that would be some nice touch :) ..hehehe...welcome man..

GaborD

#13
Hi! Great to see you both!

I am willing to try anything until I find my "NB2"  :P
I was so sad when the C3D team fell apart, it was right on track to being exactly that. I had the shader and lighting things all finished for it too.

Will check out OpenB3D for sure. I used Blitzmax back in the day, but that was when we didn't have a decent 3D option for it.

AGK is fun so far, but with tier one usage seems to have some severe limitations.
And tier2 would mean C++, which defies the point of using such a "simple" engine/language.

Yue

#14
About the shaders, I can only think about this. ;D
http://store.steampowered.com/app/710830/AppGameKit__Shader_Pack/