Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (736)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (813)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3] 4 5 ... 192
  ignore  |  Print  
  What I did today  (Read 1911215 times)
0 Members and 2 Guests are viewing this topic.
Offline PandaMoniumHUN

JGO Coder


Medals: 32
Exp: 3 years


White-bearded OGL wizard


« Reply #60 - Posted 2014-06-24 22:57:31 »

That too beautiful to be a real in-game screenshot. Shocked
Good job, I'm looking forward to the game. Cheesy

My Blog | Jumpbutton Studio - INOP Programmer
Can't stress enough: Don't start game development until you haven't got the basics of programming down! Pointing
Offline Slyth2727
« Reply #61 - Posted 2014-06-24 23:12:49 »


That is absolutely beautiful, however how does it perform?
Offline pitbuller
« Reply #62 - Posted 2014-06-25 09:03:13 »


Game is targeted for PC with 60fps gameplay. It does need beefy machine if you want high resolution. Everything is dynamic and procedurally so hardly anything can be baked or faked which do add pressure for performance.

Godray technique itself is really cheap as it only use 16 samples per pixel but temporally refine results which would converge to right solution(in static scene with static camera).

If you want follow the game progress. https://twitter.com/minigore
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Leif.Ross

Senior Newbie


Medals: 2
Exp: 3 years



« Reply #63 - Posted 2014-06-25 16:27:52 »

Today i ventured on the most wonderful journey,
The adventure started with some jolly birds singing outside my window, which had the unfortunate effect of waking me from a state of deep shut-eye.
Annoyed by this altered state, i walked north, into the lands of bathroom, where the tiles are white and the great rivers roam.

The shower was wild and furious, but i mastered the current and managed to get out alive.
I put on my pieces of cloth and ventured east, crossing the border between bedroom and kitchen.

The inhabitant of kitchen named fridge offered a bowl of milk and corn to ease my journey, i accepted the gift, and prepared a mixture of crushed java-beans and hot water.

I have now entered the battlestation and begun to unload the workload of the day, however i have a suspicion that my waterbottle is the source of a contagion. Needs more investigation!



(Semi-procedural generating tilemaps to simulate height has proven to be more of a challenge than i first imagined,
more comparable to playing hanoi-towers than it was to doing the same thing in 3D)

Todo:
- Drink coffe (check)
- Work on landscape generator (in progress..)
- Implement shadow tiles

Ps:
- Stay away from the waterbottle!!



Also this is my first post, this seems like a awesome community, hi! Cheesy

Algorithms designer, freelance developer and professional duck-assassin trainer.
Offline JVallius
« Reply #64 - Posted 2014-06-25 17:30:08 »

I had to spend some time on refactoring hex map code before it expands too much and explodes in my face.

Offline CptSpike
« Reply #65 - Posted 2014-06-26 12:22:48 »

Saw my baby for the first time Smiley http://i.imgur.com/ZfLTkRF.jpg
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #66 - Posted 2014-06-26 12:39:30 »

Also this is my first post, this seems like a awesome community, hi! Cheesy

Hi there, Welcome to JGO. Smiley

The darkest of carts.
Offline theagentd
« Reply #67 - Posted 2014-06-26 13:21:00 »

Godray technique itself is really cheap as it only use 16 samples per pixel but temporally refine results which would converge to right solution(in static scene with static camera).
Those god rays aren't even close to accurate. Radial blur god rays, made popular by Crysis, only rely on the limited screen space information available. Look closely and you can see that the light that goes just next to the large tower structure to the left of the sun magically take a detour around the head of the guy in the foreground. Also, the shadow from his ear is WAY too strong as there's not enough dust in the air in the small volume surrounding his ear to make that shadow visible (although the exaggerated effect does look decent).

I molested your picture a bit to illustrate what I meant: https://drive.google.com/file/d/0B0dJlB1tP0QZRll4SmxVeGFVN1U/edit?usp=sharing

If you're already doing 16 RGB samples (stored as RGBA), you could just as well be doing proper raytracing through the shadow map to achieve a much more accurate version of this. Assuming you're doing this in HDR, you could be doing twice as many depth samples while still keeping the amount of bandwidth the same. The depth test is all done in hardware with hardware 2x2 PCF filtering, so it's simply a stepping loop in GLSL:

1  
2  
3  
4  
5  
6  
7  
8  
9  
vec3 sampleCoords = startShadowCoords;
vec3 deltaCoords = (endShadowCoords - startShadowCoords) / SAMPLES;

float light = 0;
for(int i = 0; i < SAMPLES; i++){
    light += texture(shadowMap, sampleCoords);
    sampleCoords += deltaCoords;
}
light /= SAMPLES;


Add a random offset to the start position and possibly run a blur at the end of it all to cover up any noise and you have something extremely accurate and good looking for barely any performance hit at all. If you're really concerned about performance, you could even run this at half resolution, and upscale it with a bilateral filter if you get edge artifacts.

Here's something I made a very long time ago. Banding is due to the lack of a random offset per pixel.


EDIT:
Also, IRL god rays just before landing in Stockholm:


EDIT2:
Dark Souls god rays use the same radial blur technique. This is why you don't use radial blur god rays.


Proper raytraced god rays from Stalker: Clear Sky (although these had horrible performance):

Myomyomyo.
Offline Orangy Tang

JGO Kernel


Medals: 57
Projects: 11


Monkey for a head


« Reply #68 - Posted 2014-06-26 13:45:48 »

Radial blur god rays, made popular by Crysis, only rely on the limited screen space information available.

The original Halo did radial blur god rays way before Crysis. Smiley

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline JVallius
« Reply #69 - Posted 2014-06-26 14:38:11 »

Click to Play


Moar hex porn: FOV implemented!

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Brynn

JGO Wizard


Medals: 103
Projects: 3
Exp: 1 month or less


JGO's Spiffy Duchess


« Reply #70 - Posted 2014-06-26 15:01:26 »

I was sad and depressed..

So I made sad music.

http://revereor.com/images/crush.mp3

Now I am not sad.

I also got basic menus on Project NAH done!

Welcome to a new kind of tension
All across the alienation
Where everything isn't meant to be okay
Offline bogieman987
« Reply #71 - Posted 2014-06-26 15:32:17 »

Did some prototyping on how I want my loading screen to look because I was bored.

Components:




Result:


There are some inconsistencies between the images, but as a prototype, I think it's pretty good Cheesy
It's also a very small resolution, gonna double it up.

Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #72 - Posted 2014-06-26 23:40:51 »

Strange Attractors!



Source: https://gist.github.com/BurntPizza/a9a204e17705356d977f
Click to generate a new, random attractor that most likely nobody has ever seen before!
(May take a few clicks as not all initial conditions produce an interesting attractor)
Now checks the Lyapunov Exponent to (almost) guarantee visually interesting results!


These are specifically Peter de Jong attractors.
I might put more effort into rendering them, as they can look quite good with a bit of work: http://imgur.com/a/HdonA (not mine)
Offline Spacebeans
« Reply #73 - Posted 2014-06-27 00:42:34 »

I made a JavaFX UI for selecting a workspace for my 'game design environment'

Offline theagentd
« Reply #74 - Posted 2014-06-27 00:55:32 »

Implemented compute shader tile based deferred shading. Gonna improve the tile frustum calculation for better performance and also improve the light culling accuracy using AABBs.



Myomyomyo.
Offline ra4king

JGO Kernel


Medals: 506
Projects: 3
Exp: 5 years


I'm the King!


« Reply #75 - Posted 2014-06-27 03:10:07 »

Goddamn I wish I had that much free time and motivation to do cool stuff like that Emo

Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #76 - Posted 2014-06-27 04:38:26 »

Made a screensaver-ish thing: http://www.java-gaming.org/user-generated-content/members/120868/strangesaver.jar

Progressively renders the de Jong attractors one at a time, pausing 5 seconds before starting a new one.
You can also click to start a new one, and press F1 to save a screenshot. ESC to exit.

Small Imgur album: http://imgur.com/a/ndVqN


EDIT: Now with color! http://imgur.com/a/WoEYB
(Jar should be updated)
Offline PandaMoniumHUN

JGO Coder


Medals: 32
Exp: 3 years


White-bearded OGL wizard


« Reply #77 - Posted 2014-06-27 11:24:42 »

Made a screensaver-ish thing ...
Cool! But where do you get these ideas from? Smiley

Also some on topic: Today I learnt not to trust X.org and the Linux graphics drivers.
I was trying to debug my code after a few hours of optimizing my engine and no matter what I did, my application launched and freezed out the ENTIRE X.org server after 2-3 seconds. That left me with the option to either restart my entire PC or my X.org server every time I wanted to debug the application.

Because I was certain that the error was in my game (never really had serious issues with Ubuntu before), I spent 2 hours trying to fix this issue, than I said f*ck it, I'm done with this. Booted up windows (because I run dual-boot), launched my application and voilá, it was running completely fine on a smooth 6000FPS+. *Smashes head in the wall*
Seeing that the error is not in my application I tried to install an earlier, but stable version of Nvidia driver on my linux OS but I got the same crash issue all the time.

I ran out of ideas, so I enabled V-Sync in my application and it now works perfectly on linux now too. However, that means that every time I want to test the performance of my game I will have to boot into Windows and test there because X.org crashes on high FPS? Seems like I will have to reconsider whether or not I will want to continue my game development on linux... Emo Roll Eyes

My Blog | Jumpbutton Studio - INOP Programmer
Can't stress enough: Don't start game development until you haven't got the basics of programming down! Pointing
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #78 - Posted 2014-06-27 11:40:31 »

Cool! But where do you get these ideas from? Smiley

I find some article detailing some random phenomenon that I was vaguely aware of but suddenly now handed the key of understanding to, and before you know it feature creep has me writing screen savers...

Actually this specifically was inspired by this: http://reddit.com/r/proceduralgeneration/comments/290rfy/video_of_my_game_that_utilizes_multiple/
The guy threw around some screenshots of the attractors, not even related to what he was talking about (some other cool stuff for sure), and the reward/effort ratio was predicted to be high enough, so I went at it. Before long I realized it would make a great screen saver, which was another thing I was in need of.


Seems like I will have to reconsider whether or not I will want to continue my game development on linux... Emo Roll Eyes

Or just use V-sync? Although that might be broken of half of people's drivers as well...
Offline PandaMoniumHUN

JGO Coder


Medals: 32
Exp: 3 years


White-bearded OGL wizard


« Reply #79 - Posted 2014-06-27 11:56:14 »

Or just use V-sync? Although that might be broken of half of people's drivers as well...
If I just use V-sync I can't be sure that the performance is okay for everyone because I have a pretty powerful PC so it's very likely that it will hit 60fps all the time. I want to make my games perform okay on low-end machines as well. My latest optimization brought up my FPS from 300 to 6000, and if I would have run the game with V-Sync on I might have not even spotted how inefficient some of my methods was.

Also, it is indeed very likely that it's broken for others too. It's weird because I ran my games before on linux with 5000fps+ on simple scenes and there was no issues.
I've scanned through my code looking for errors multiple times but I can't find any. It's broken with the 2 latest "stable" Nvidia drivers, and I also have every other component of the OS updated. I'm a big fan of all the command line tools that Linux gives me, but if I can't test my games out (if such a simple thing is broken imagine what else could be also broken) I will switch back to Windows.

My Blog | Jumpbutton Studio - INOP Programmer
Can't stress enough: Don't start game development until you haven't got the basics of programming down! Pointing
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #80 - Posted 2014-06-27 11:59:41 »

Make your game, and at the end (or periodically) test it with V-sync off and/or on a crappy machine.
I have a craptop running Mint if you ever need a lower-bound perf test.
Offline mojo
« Reply #81 - Posted 2014-06-27 12:21:18 »

Implemented silhouette shader.

Offline m77

« In padded room »

« Reply #82 - Posted 2014-06-27 12:41:02 »

yesterday i had a fight with the overpowered teenage skinhead mf
i got more physical damage (around 8 bruises)
he got more lyrical damage
he retreated
Offline temu

Junior Devvie


Medals: 2
Exp: 2 years



« Reply #83 - Posted 2014-06-27 13:00:05 »



This pixelart Grin lol
Tons of work D:
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #84 - Posted 2014-06-27 13:02:39 »

Saw my baby for the first time Smiley http://i.imgur.com/ZfLTkRF.jpg

Congratulations!

The darkest of carts.
Offline theagentd
« Reply #85 - Posted 2014-06-27 13:04:03 »

Added AABB calculation for tiles.

Before:


After:


Performance dropped due to the overhead of per-tile computations that I need to optimize. I currently recalculate all per-tile stuff for each pixel in the tile for simplicity, so the constant overhead per tile is 256 as high as it should be.

Myomyomyo.
Offline CptSpike
« Reply #86 - Posted 2014-06-27 14:05:42 »


Thanks! I'm so excited I'm losing sleep over it.

@theagentd That looks really good, what sort of game is it?
Offline Spacebeans
« Reply #87 - Posted 2014-06-27 14:56:43 »



Can you explain what you're doing here? I'm trying to get more into advanced OpenGL, and that looks flippen' amazing.
Offline pitbuller
« Reply #88 - Posted 2014-06-27 15:53:47 »

Noticed that you can approximate high freq AO by using normalized normal map z length. Basically this is free. Combined with baked vertex AO and temporal smoothed SSAO I have three different frequencies of ao all playing nice together.
Offline theagentd
« Reply #89 - Posted 2014-06-27 16:49:18 »

@theagentd That looks really good, what sort of game is it?
This is just a test program for my engine, but it's being used by WeShallWake.


Can you explain what you're doing here? I'm trying to get more into advanced OpenGL, and that looks flippen' amazing.

My engine is using deferred shading. That means that lighting is split up into two passes. The first pass renders all the models to write the diffuse color, normal, specular intensity, roughness and glow color into a massive G-buffer (4 render targets + depth buffer). In the second pass, I try to figure out which pixels that are affected by which lights, read the lighting data stored in the first pass for those pixels and accumulate lighting for each pixel.

Traditionally the second pass has been done by rendering light geometry and using the depth bounds test to cull pixels that are too far away from the light to be affected by it. For a point light, I render a sphere. This is what the light geometry looks like. You can clearly see where the light sphere is intersecting the world.


This has two main problems. The first has to do with the depth test. Consider the worst case scenario where you're looking straight up into the sky and standing inside the light volume. The volume is covering the whole screen, but not a single pixel will pass the depth test. That's 2 million wasted depth tests for a 1920x1080p screen. Basically it doesn't matter if there is actually any geometry intersecting the light volume; you still have to run the depth test to figure that out, which although fast isn't free. Note that the screenshot above does not show the pixels that failed the depth test, only the pixels that actually ran light computations. Around 2/3rds of the pixels were wastefully filled and failed the depth test. This can lead to extremely bad performance, especially when you're standing inside multiple lights, regardless of how small they are.

The second problem has to do with overdraw. The lighting data needs to be read from the G-buffer and unpacked every time a light covers a pixel and passes the depth bounds test. I also need to reconstruct the eye space position for each pixel. If 10 lights affect the same pixel, this data is read and unpacked 10 times, again leading to possibly bad performance. It'd be better if we only had to unpack this data once for all lights. What we're essentially doing is this:
1  
2  
3  
4  
5  
6  
7  
8  
for(PointLight light : lights){
    for(Pixel pixel : getPixelsThatLightOverlaps()){
        if(checkDepthBounds(pixel, light)){
            LightData lightData = pixel.getAndUnpackLightData();
            pixel.color += computeLighting(lightData, light);
        }
    }
}





The solution to these two problems is tile based deferred shading. Instead of rendering light volumes, we split up the screen into 16x16 tiles. We upload a list of lights to the GPU and have the GPU compute a frustum for each tile based on the minimum and maximum depth of each tile. We can then check which lights that affect a certain tile and only compute lighting for these lights. The resulting light overdraw looks like this:


You can see that it detects the overall same light shape as the light volume technique, so why is this more efficient? First of all, we test visibility per tile, not per pixel. Before, we ran a depth test per covered pixel, which could be anywhere from 0 to 2 000 000 pixels, with the worst case scenario happening when you stand inside the light volume (a very common case). With tiles, we do a constant number of tests, 1920x1080/(16x16) = 8100 tests per light, regardless of how much of the screen they cover. It's clear that the worst case scenario is much better here. Secondly, we only need to unpack the pixel data when loading in the tile. The pseudocode now looks like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
for(Tile tile : tiles){
    for(PointLight light : lights){
        if(light.intersects(tile.frustum)){
            tile.addToLightList(light);
        }
    }
}
for(Pixel pixel : getAllPixelsOnScreen()){
    LightData lightData = pixel.getAndUnpackLightData();
    List<PointLight> lightList = getTileForPixel(pixel).getLightList();
    for(PointLight light : lightList){
        pixel.color += computeLighting(lightData, light);
    }
}

It's clear that this is much more efficient. Fine-grained per-pixel culling of lights isn't necessary, so culling them per tile has much better performance. For the actual lighting, the inner loop is now over lights, allowing us to read in the light data once and reuse it for all lights. The 16x16 tiles are also a very good fit for GPU hardware, as GPUs process pixels in groups. This technique was first used for Battlefield 3, and requires OGL4 compute shaders for an efficient GPU implementation.

EDIT: The overhead of computing the tile frustums is currently around 3ms for a 1920x1080p screen, but it is currently doing 256x as much work as it has to. Hopefully I can get it down to at least 0.5ms. Despite the 3ms overhead, I can create scenes with lots of lights were tiled deferred shading is much faster than light volumes, 12.5ms vs. 17.0ms.

Myomyomyo.
Pages: 1 2 [3] 4 5 ... 192
  ignore  |  Print  
 
 

 
cybrmynd (138 views)
2017-08-02 12:28:51

cybrmynd (159 views)
2017-08-02 12:19:43

cybrmynd (153 views)
2017-08-02 12:18:09

Sralse (169 views)
2017-07-25 17:13:48

Archive (646 views)
2017-04-27 17:45:51

buddyBro (766 views)
2017-04-05 03:38:00

CopyableCougar4 (1300 views)
2017-03-24 15:39:42

theagentd (1264 views)
2017-03-24 15:32:08

Rule (1237 views)
2017-03-19 12:43:22

Rule (1312 views)
2017-03-19 12:42:17
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!