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.

AppGameKit/AppGameKit Studio Showcase / App Shader Kit (3D Shader Pack)

Author
Message
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 7th Nov 2017 13:38 Edited at: 7th Nov 2017 14:03
@Green7:
For better performance:
You could adjusted the SSAO render target Size: SP_SSAO_SetRenderImageSize(Width,Height)
Or decrease the sample count: SP_SSAO_SetSamples(SampleCount)
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 7th Nov 2017 13:58 Edited at: 7th Nov 2017 14:00
I already did as you suggested. It helps for sure, i hve found a decent way between look and performance, but for the final game i have to decide if it will be part of it. maybe as option if i release it as pc game. i'm even thinking about to ditch the mobile version and go full pc..
.

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 7th Nov 2017 14:01 Edited at: 7th Nov 2017 14:07
Uh this looks like a nice game !
Yeah SSAO adds some depth on top off the shadows.
Thankfully 3D games are much more accepted on steam or on other PC game platforms than 2D games.
Where is the WIP thread ?
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 7th Nov 2017 14:05
thanks! I'm more from the artsy side of game developing... and i got not much to show yet. it is in a early stage and misses much content. in fact there is not much more than what you see on the shots.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 7th Nov 2017 14:29
Do the shaders work on all platforms?
The coffee is lovely dark and deep,and I have code to write before I sleep.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 7th Nov 2017 14:33 Edited at: 7th Nov 2017 14:51
@Stab: I had some testers who ran them on their devices.
They where tested on Andoid,IOS,PC,MAC and HTML5 thats all, right ?
That also made a lot of work on top
For example: on HTML5 there are no Depth maps supported, so I had to render my own depth maps.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 7th Nov 2017 18:36
Quote: "They where tested on Andoid,IOS,PC,MAC and HTML5 thats all, right ?"


Great! You may want to include this info on the steam page. Otherwise they may think it is just for Windows.
The coffee is lovely dark and deep,and I have code to write before I sleep.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 7th Nov 2017 19:17 Edited at: 7th Nov 2017 20:39
Yeah wrote that to Rick right after you posted your question.
It was a good question because it's not obviously that those kind of shader effect's run on mobile devices let alone HTML5.
DARKHALO2K
20
Years of Service
User Offline
Joined: 4th Sep 2003
Location: UK
Posted: 8th Nov 2017 20:29
I picked up the pack on Steam as soon as I read that it was available, and I'm very happy with it.

Thanks again for all of the work that went in to this. I'll be sure to leave a review just as soon as I've had a little more time to play with it.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 8th Nov 2017 20:35 Edited at: 9th Nov 2017 00:13
Tank you, I love getting so much love from you guys
I think we have a great community, I won't let you down and I already have some effects in my mind to add to the pack in the future.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 9th Nov 2017 13:44
Got my very first error! I'm so proud!

I tried this SSAO stuff:
SP_SSAO_SetActive(1)

Gave me this:
Error: Could not find file Shader/BlurH.ps in ./../Templates/ShaderPack/Includes/SP_SSAO.agc at line 29
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 9th Nov 2017 13:53 Edited at: 9th Nov 2017 14:00
Well I guess you have to make sure that there is the Shader/BlurH.ps file in your projects media folder ?
If thats not the case then copy paste the Shader folder from ./../Templates/ShaderPack/ into your projects media folder and try again.
If it IS the case and you still get the error you might send me you project if thats ok for you.
Also I recommend you to leave all shaders in the media folder till you release your game so you don't need to paste them again if I made an update, but only need to remove the unnecessary shaders once in the final version.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 9th Nov 2017 16:06
Oh, just that -- I somehow missed that crucial step, now it works!
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 12th Nov 2017 02:10
I tried adding VR to the water shader, but it result looked pretty weird! Might just be that I was looking from inside a mesh. When I tried locking the normal camera to the position/rotation of my HMD, the screen view looked weird too. But right now, my VR gear is at the other end of the country, so further tests must wait.

But looking at that water shader made me wonder if it would be possible to make a frosted glass shader? Seen this effect in a few games, 'Portal' and something by Frictional Games ... the effect lends itself really well to horror, I think.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 12th Nov 2017 15:31 Edited at: 15th Nov 2017 12:13
For proper Cardboard VR you would need to render the scene twice, once per eye, so you need to manipulate the SP_Sync() inside SP_Init.agc.

You are right, the water shader is pretty close to what a glass shader is.
If I implement a glass shader I wan't it to be working for all sorts of objects, like all of my shaders, not only planes, which is theoretically not possible without any kind of environment map, cube mapping for example.
But thats the theory it might be looking good enough if I add normal mapping to my previous attempt
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 16th Nov 2017 22:38
I'm really REALLY loving the Dissolve shader! This is good ol' color cycling with transparency added for the dissolve effect! Me, I'm mostly interested in pure color cycling, which I can get by simply removing the transparency from Ramp.png and give it some crazy color gradients.

SP_Dissolve_SetThreshold() shifts Ramp.png back and forth along the grey values. So if you let the value change gradually in the do loop, it will give that shimmering color cycling animation. (It seems like the value goes from 0.0 to 1.0)

I'm not entirely sure about the command SP_Dissolve_SetSize(ObjectID,Size#). It seem to shift how Ramp.png is mapped to Dissolve.jpg or something?

Also not sure about SP_Dissolve_AddMesh(ObjectID,MeshID,DiffuseImageID,MaskImageID,RampImageID)

I tried expanding Ramp.png in the X direction, from 128 to 1024 pixels. Seem to work, but I don't know if I'm supposed to do that.

So far, I'm mostly playing around with editing Ramp.png and Dissolve.jpg, creating wacky effects.

The most committed use of color cycling I have ever seen is found in the game ENDORFUN. Back in the nineties, I found this rarity at a sale which had really cheap prices, but which in retrospect didn't seem entirely legit, taking place at a top floor storage facility and being advertised with a paper note taped to the outside wall. Anyway, I was there and saw that green box with that really ugly artwork in front. Another customer came over and began going on about how great the game was with eagerness normally found in those who wish to talk to you about Jesus. I bought the game. This was a trippy new age puzzler with grossly exaggerated "subliminal messages". Basically, the soundtrack sometimes broadcasts positive messages, and with each .wav song running under 10 seconds before repeating, those subliminal messages get delivered with the subtlety of a jackhammer. The gameplay was actually pretty good, with a surprising amount of depth. Still, the true strength of the game was how committed it was to its new age aesthetics, with the music, blatant positive messages, trippy colors and playfield turned at weird angles, sometimes even upside down.

I found a clip on youtube which shows the games color cycling effects:
https://www.youtube.com/watch?v=4IEFC_Y3nrA
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 16th Nov 2017 22:58 Edited at: 16th Nov 2017 23:01
It sounds like you got everything right.
SP_Dissolve_SetSize(): scales the lookup value for the ramp... you can stretch a one pixel ramp over the whole object with this command for example.
SP_Dissolve_AddMesh(): sometimes you only want to add the effect to a single mesh not an entire object.
from 128 to 1024 pixels: sure why not.

Nice you like it
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 24th Nov 2017 15:38 Edited at: 2nd Dec 2017 00:07
I decided to tease you a bit more
What does these quotes all have in common ?
blink0k wrote: "I supply say a gameboy palette and you render, using those colours"

Alien Menace wrote: "Scene Greyscale Shader"

PartTimeCoder wrote: "Greyscale, Sepia, Thermal"

Right they request the new Color Grading Effect !

The artists among you will probably be happy as it is one effect for so many looks using a simple LUT(Look Up texture).
You put in two Lookup textures and you can tween/fade between them as you please.
I made some standard lookup textures for you and a Demo where you can switch through them.

Sepia (other images are in the attachments)


There will also be the possibility to generate smooth normals for objects using the outline effect so you don't get the hard edge artifacts anymore.
I could also improve the overall rendering process.


[EDIT] I talked to Ron Erickson according depth textures in AGKVR.
He wants to add a command to render to a single eye, I can make my System compatible with VR then.
I also got a nifty method to render several layer of fullscreen shader by now.[/EDIT]

Attachments

Login to view attachments
Preben
AGK Studio Developer
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 2nd Dec 2017 10:15 Edited at: 2nd Dec 2017 10:16
Quote: "If you zoom out in GGLoader you will see the same pattern
But the texture seems to be a bit more tile friendly than the one I've chosen."


No i use UV mixing in GGLoader , it removes the patterns , you can read about it here:

https://docs.unrealengine.com/udk/Three/TerrainAdvancedTextures.html#Multi-UV Mixing: Reducing tiling through scalar mixing

I use this on both terrain and water shaders
Subscribe and checkout great AppGameKit video's here: Videos click here
Latest GameGuru Loader news: News click here
best regards Preben Eriksen,
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 2nd Dec 2017 16:27
Ah I see, so basically I mix the normal texture with a scaled version of it and adjust the brightness to normal...sounds pretty easy and Unreal says it magically removes the pattern.
I will try that, thanks
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Dec 2017 15:43 Edited at: 3rd Dec 2017 16:38
I talked about view independent environment mapping and how we could archive reflection, refraction and maybe even point light shadows with it.
So finally I made the dual parabolic mapping I mentioned so often.

I don't need to bake the two images (1024x1024), I can render them in real time at nearly no costs
Westa
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 3rd Dec 2017 22:16
Are there are plans for a tier2 version of the shader pack ?

Westa
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 4th Dec 2017 09:16
The shader themself are independant anyway
But yeah there are plans to port the library to Tier 2.
Not sure how urgent it is
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 4th Dec 2017 10:20
hmm, do you think there could be a chance to make something PBR like, now that you got real time reflections working?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 4th Dec 2017 13:33 Edited at: 4th Dec 2017 14:25
I already made a real PBR shader and if you see it in action it looks damn good but the calculations are way to performance hungry to be useful.
But I think you don't want real PBR, because it doesn't necessarily mean that you also get reflections, so I can Make a shader with normal+specular+gloss/reflection-mapping.
How does that sound ?
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 4th Dec 2017 15:38
You are the pro, if you suggest it to be better that way, and if you like to give it a go, please feel free.
If it emulates something like this: https://3dcoat.com/pbr/ then this would be awesome!
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 4th Dec 2017 17:14
I have a rather boring question (sorry!)

The thing is, inside the .vs files, it very clearly says:
//#### Please do not share any of this code ####

So I wonder, am I supposed to distribute the .vs file with my game? The compiled executable throws an error if it can't access \media\Shader\Dissolve.vs
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 4th Dec 2017 17:58 Edited at: 4th Dec 2017 18:45
@Green7
Nah I'm just a guy who like shaders
As I think of it, it doesn't make sense to have an extra specular shader that only reflects the light color without the environment mapping anymore, right ?
The Specular shader would reflect the environment in that amount you describe in the specular texture.
Like Reflective Specular shader in Unity

@basicFanatic
I think you need to encrypt the shader files then.
I can't provide the encryption library also
But I could add a parameter to the commands to load the shader from a string.
nonom
6
Years of Service
User Offline
Joined: 12th Nov 2017
Location: Picking mushrooms
Posted: 4th Dec 2017 19:31
Keep the good work janbo, they are great!
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 4th Dec 2017 22:32
Good call -- loading the shader from a string sounds like a perfect solution!
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 5th Dec 2017 08:42
@janbo: exactly! if you even could do one with normal maps included, then we are ready to let the artists loose.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 5th Dec 2017 13:23
@nonom: Great to see more new people here lately and thanks !
@basicFanatic: There are two possible methods and both will need to load the shader as a string and encrypt the shader in some way. So either we load them from the media folder or from within the AppGameKit code.
Would be cool if we could use the Wad Packer but it creates the original files to read them, so I probably just use my own encryption and everything will stay the same but you need to encrypt the files, for your final game version, with a little tool I make .
Green7: Sure !
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 5th Dec 2017 15:25
I have finally figured out how to do a looping animation with the Dissolve effect!
I needed to first let the ramp repeat itself. Then I needed to upscale the ramp to 0.5 so that only half of it is used:
SP_Dissolve_SetSize(funbox, 0.5)

And then I just needed to make the threshold loop back to the midpoint (0.50):
currentThreshold = currentThreshold + thresholdSpeed
if currentThreshold > 0.999999 then currentThreshold = 0.50
SP_Dissolve_SetThreshold(funbox, currentThreshold)

(if you wanna try it, remember to paste the /Shader folder into the /Media folder)

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 6th Dec 2017 14:01 Edited at: 6th Dec 2017 16:48
This is great

It also shows me what a fool I was to not encrypt the shader files
[Edit]Encryption is done for the next version[/Edit]

Attachments

Login to view attachments
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Dec 2017 00:31

Quote: "Would be cool if we could use the Wad Packer but it creates the original files to read them, so I probably just use my own encryption and everything will stay the same but you need to encrypt the files, for your final game version, with a little tool I make .
"


As soon as Paul adds unpack to memory and exposes password control to zip files

Windows only, we can do direct to memory with a plugin.
I would add some encryption to the existing Wad Packer if there's no sign of native support from AGK... let's hope to hear if we will get it?
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 11th Dec 2017 13:00
HDR reflections anyone, a bit more cost effective alternative to real reflections?
Eisenstadt Studio: Eisenstadtstudio.com
Composers Page: Milesthatch.net
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 11th Dec 2017 14:58 Edited at: 11th Dec 2017 15:52
I think I can't get more effective + dynamic as with the technique I'm using right now.
I could probably save a texture sample if I combine the Front and Back reflection map onto one single texture.
Its not perfect, low poly objects can look strange in the reflection because the edges don't bend but it should be fine for most situations.

You can see here the reflection on the specular object and the glow map for the illumination object.

Maybe you even notice that there is no/less repetition for the water.

Attachments

Login to view attachments
nonom
6
Years of Service
User Offline
Joined: 12th Nov 2017
Location: Picking mushrooms
Posted: 11th Dec 2017 23:04
In my honest opinion the whole water effects deserves their own pack, and it's a valuable component in the most part of 3D engines. The current Water shader in the Shaders Effect Pack is pretty flexible and enough for me, but a Water Effects Pack will be a instant buy
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 18th Dec 2017 16:41 Edited at: 18th Dec 2017 16:44
I hope every effect is so flexible like the water shader, at least I want them to be.
Quote: "but a Water Effects Pack will be a instant buy "
I don't fall for that
But maybe I make a 2D shader pack in the future

I also have some other news.
I just added a glass shader using the new dual-parabolic-environment-maps.
I probably will not stop before I've made all the effects out there.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 18th Dec 2017 22:05
awesome janbo ! great work !!!
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 18th Dec 2017 22:38
Been away for awhile. Purchased!!
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 19th Dec 2017 23:29
Regarding the glass shader, could it be adapted to make a magnifying glass? We were able to easily make a magnifying glass in DBPro by squashing a cone, reworking the UV coordinates, invoking a second camera, narrowing the FOV of the second camera, and setting the second camera to the image set as the texture of the flattened cone. Unfortunately, we can't do this in AppGameKit since it has only one virtual camera. (The second camera was also useful for making telescopes and mirrors.)
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 20th Dec 2017 14:47 Edited at: 20th Dec 2017 15:24
The Glass shader does reflect and refract you can pass a normalmap and the refection value Eta(for example air/glass~1.0/1.5=0.66) to alter the amount of refraction.
And if you watch closely you can see that it already has a magnifying effect in the Video.
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 20th Dec 2017 21:13 Edited at: 20th Dec 2017 21:21
[EDIT: never mind, didn't see above post. Just found the YouTube vid, appart from this tread. Looking awsome!]
I seriously need to find me some cash to buy this, hehehe.

Question: Is this applicable on a grand scale? Like for instance on windows of buildings, cars etc or will it slow down the FPS too much like that?
puzzler2018
User Banned
Posted: 20th Dec 2017 21:22
Love the glass shader - wouldnt it be cool if souly do it without shaders (shader coding to me is like swimming deep in the sea with no snorkel (non existant) lol
nonom
6
Years of Service
User Offline
Joined: 12th Nov 2017
Location: Picking mushrooms
Posted: 20th Dec 2017 22:33
janbo wrote: "I don't fall for that "

Y tried

Impresive glass effect, congrats
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 20th Dec 2017 22:44 Edited at: 20th Dec 2017 22:48
I created a separate file to handle environment-maps so you can choose between updating as soon as the linked object moved or full control over the env-map rendering.
Which means you can choose to not update the env-map at all if you want.
Generating the env-map is the "problem" (not really because its still very fast if you compare it to other techniques) but reading the env-map for reflection or refraction is super fast.
Now there is still a problem with this method if you have large objects which have only a few vertices's. This method(dual-parabolic-mapping) creates the curvature of the scene, which is the parabolic part, which is done per vertex and not per fragment.
Thats why it can look strange for those large objects with few vertices but its also why its so fast.
This can be fixed if you divide the object into more triangles i.e if you spend more vertices for the large object.

@Rick Nasher: The short answeris: if it works with cube-mapping, it also works with dual-parabolic-mapping, so I guess yes.
@puzzler2018: Thats why I made a whole diving equipment
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 22nd Dec 2017 15:25
Alright, at 30% off I went ahead and picked this up. Really nice work and I'm looking forward to playing around with it more
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.
hoyoyo80
7
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 24th Dec 2017 13:28
Hope to have neon glow effect in the future

Login to post a reply

Server time is: 2024-03-29 14:31:26
Your offset time is: 2024-03-29 14:31:26