Java-Gaming.org Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (649)
Games in Android Showcase (181)
games submitted by our members
Games in WIP (700)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 24
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-01-24 15:30:25
More reading. https://books.google.fi/books?id=WGpL6Sk9qNAC&pg=PA201&lpg=PA201&dq=real+time+collision+detection+point+in+polygon&source=bl&ots=Pn2PmJ7ddL&sig=-0ihjLz7vhEitGXa6VS6eh6hpBk&hl=en&sa=X&ved=0ahUKEwiMlrTX4cLKAhXGBywKHSm6C1YQ6AEIHTAA#v=onepage&q&f=true
2  Game Development / Game Mechanics / Re: 2D point in polygon algorithm on: 2016-01-23 20:24:38
Don't forget to add usual bounding box fast path early out test.
3  Discussions / Miscellaneous Topics / Re: Realistic graphics -- how can it be achieved? on: 2015-12-22 17:28:29
If you just want to understand and learn then start with unreal engine. There are lot's of documentation, presentations, videos and all code is available at github. You don't need to start from scratch and build AAA engine to know how it's done. You just need basic knowledge to learn from various sources. Roquen posted nice link collection. Just read everything from there.(I already have) https://gist.github.com/AbstractAlgorithm/d0194f477adf829822ff
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-10-31 11:02:19
I discovered I may have ASPD, or to use the more common term, a sociopath. Not really sure how I feel about that. It explains many things, but.. It's interesting to think about.
I read somewhere something like this: "If you think you are sociopath you are not."
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-10-31 01:29:57
More simplifications.

You have this.
1  
2  
3  
 // find horizon angle
float x = diff.z / length(diff.xy);
float elevationAngle = x * inversesqrt(x*x + 1); // ORIGINAL, SLOWER --> atan(diff.z / length(diff.xy));


But you can reduce this to just this.
1  
float elevationAngle = diff.z / length(diff.xyz); // And luckily you have already calculated diffLength so just reuse that.


Wolfram alpha suggested this altenate form but it said that "Assumming x,y,z are positive" but I don't see any reason for that restriction. At least we know that diff is always non zero so I think that should be enough.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-10-29 22:13:31

You have this.
1  
2  
3  
vec3 unproject( vec2 tc, float depth ) {
        return vec3( (tc * 2.0 - 1.0) * frustumCorner, -1) * depth;
}


You can precalculate 2.0* frustumCorner and optimize it to this.

1  
2  
3  
vec3 unproject( vec2 tc, float depth ) {
        return vec3(tc * frustumCorner2 - frustumCorner, -1) * depth;
}

7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-10-16 20:53:04
Does anyone know about PBR using HDR textures?

What you mean?
Render target need to be HDR and all emissive/cubemap textures.
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-10-02 19:27:31
Got an offer from Google for a Summer internship! Yipee!!! Smiley
Not long ago you was flipping burgers. Nice.
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-09-25 21:44:04
Technically yesterday, but I wrote a small program that can convert a normal map (back) to a height map.

We need more details. How does it work? What assumptions are needed?
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-28 19:11:30
Moved to my first own house. No more rent bullshit.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-22 21:51:35
Pretty much finished converting WSW to using JOML instead of LibGDX. Excellent library. Faster implementations, thread-safety out-of-the-box, smaller. Still awaiting a few features to be able to finish it and see how broken it is. =P

Did some profiling now that skeleton animation is over twice as fast thanks to JOML and found a physics bottleneck. The physics simulation uses a 2D grid to quickly find nearby bodies for collision detection. Each "tile" in the grid is just a list of bodies that are in that grid. To query nearby bodies, you pass in a position and a radius, and the grid returns all bodies that intersect the square the position+radius forms (circle test is too expensive). Since the grid tile size is bigger than the bodies, each body generally only needs to check 1 tile, or 2 or 4 if the query area extends across a grid boundary. While doing some optimizations getting rid of some unnecessary divides, I realized that there was a bug in there that expanded the search area by 1 tile in each dimension, meaning a 1x1 check turned into a 2x2, and a 1x2 check turned into a 2x3. This had a huge impact on performance as it basically does 2-4x as much work. In combination with getting rid of a few divides, Math.floors() and Math.ceils(), I almost managed to double the body-body collision testing performance.


What kind of perfomance scaling you have with increasing tile size. Many times I have found that making tiles much bigger than bodies is net win. Basically it increases number of hit test but fits cache much better.
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-21 20:20:56
Accidentally plugged node to wrong plug and computer just hard crashed. Infinite loop. Coding with ue4 Blueprints feels like doing bungee jumping with cord that is plait from spaghetti.
13  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-19 17:34:33
Matrix deconstruction without hefty assumptions is never going to be high performant. I needed to code this without corner cases for slicing game(Kinghunt) where I needed to dynamically reparent stuff and transformation chains were concatenated to matrices and didn't have time to change that. It was a very long day. If you have GPU Pro 5 in hand there is good article about ways to manage object hierarchies. http://www.crcnetbase.com/doi/abs/10.1201/b16721-29
14  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-08 08:25:36
I had problems with motion vectors stuttering during slow motion. With time running 1/20th as fast, the difference between in positions between each frame was minimal and the motion vectors are scaled up based on 1.0/timeStep to compensate. This amplifies floating point errors in the object and view matrices enough to cause seemingly stationary objects to get long enough motion vectors to cause motion blur to kick in. Running at a high resolution further increased the floating point errors. Computing object physics, object matrices and camera matrices with double precision and only convert them to floats when uploading them to OpenGL solves this.

This isn't motion blur anymore. Camera based motion blur is based on shutter speed. For Hardland I chosed shutter speed to be 1 /100 s. So with 60fps framerate I scale motion vectors with (1/100) / (1/60) = 0.6. If framerate dips lower scaling value just goes smaller. For realistic motion blur you never can't have longer shutter time than frame rate.
if you crank up motion blur with slow motion it might be cool effect but it's not actually motion blur effect anymore.
15  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-07 20:43:48
By the way, I forgot to mention it earlier, but the 48--->68 FPS increase I got from JOML included calculating all physics, model matrices and camera matrices at double precision. The physics were noticeably slower (10-20% longer CPU time) due to this. Double precision did help a lot with motion blur inaccuracies during slow-motion (difference between two positions scaled up by a large number) and also reduced model and camera jitter a lot. This led to less motion blur and anti-aliasing reprojection artifacts in the scene.

EDIT: Skeleton animation was of course done at float precision.
How you are doing motion blurring? Sounds bit odd that you would ever have precision issues with it. I just use last frame mvp matrices which are always exact.(if object wasn't visible on previous frame I use current matrices which is not problem for temporal AA and hardly problem for motion blur.). Actual motion vectors are scaled from difference vectors using frame time and camera shutter time.
16  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-07-10 19:26:11
Planes don't actually need to be normalized if you never ask actual distance from the plane.
http://iquilezles.org/www/articles/frustum/frustum.htm
17  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-09 09:23:14
Spent the entire day preparing RFLEX for the greenlight push. The majority of the day was spent working on a game demo for the press kit. I spent the last 4 hours getting a list of 35 game writers to email, and making a game plan for greenlight Tongue.
Try to get contact with Youtubers. They are lot more valuable than game sites.
18  Game Development / Newbie & Debugging Questions / Re: LibGDX - Combine textures? on: 2015-06-15 17:32:01
You don't move or rotate textures. But meshes that are texture mapped. Putting all those textures to single atlas does not simplify this thing at all. It may improve performance but it does not make it simpler.
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-06-12 18:57:38
Upgraded our project to UE4.8. Everything seems to be going to right direction.
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-06-08 21:10:50
Yes! Managed to get the depth of field as good as physically possible when generating it from a sharp image.

Have you considered to combine motion blur and DOF. This way you could reuse most of the samples.
http://bartwronski.com/2014/12/09/designing-a-next-generation-post-effects-pipeline/
21  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-06-06 07:34:31
Tried to get depth of field working. Didn't go very well, but by carefully dodging all the artifacts I could take the following screenshot.

Try this technique. It's lot simpler and there are tons of optimization opportunities.
http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane-part-1/

Bruteforcing it is too slow for gameplay scenes but usually you want to use crazy dof/bokeh only for non action parts anyway.(cut scenes etc)
Hardland is actually shipped with naive variation of this but its only used when player inspect something or chat with npc.
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-06-02 21:43:33
Temporal array? You mean the vec4 sraaSamples[SRAA_SAMPLES] array?
Yes. I meant just that.
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-06-02 21:08:48
Theagentd could you post more of that shader code. If there is way to avoid that temporal array it should be lot easier for register pressure.
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-06-01 19:49:07
...
Quote
                    Pack transparency : 0.515ms
                    Fast resolve pass : 0.254ms
                    Stencil mark : 0.322ms
                    Full resolve pass : 0.492ms
The wrongly named transparency packing (e.g. the complete precomputation pass, to be renamed) went up by 0.1 ms, but the fast resolve pass shaved off 0.1 ms too. The full resolve pass also got quite a bit faster, losing almost 0.3 ms too. All in all, we're down to just under 1.6 ms, a pretty amazing result considering the same process took 3.4 ms a few days ago.

With those precomputation optimizations is the fast resolve pass + stencil markin still a win?
25  Game Development / Newbie & Debugging Questions / Re: Efficient Collision detection on: 2015-06-01 19:44:50
Does your game in hand actually have performance problem with collision detection right now?
26  Game Development / Newbie & Debugging Questions / Re: Shadows flicker (Shadow Mapping) on: 2015-04-29 21:06:59
Snapping to texel is great with translate only but does not completely solve problem with orientation change. Only way to fix that is to push screen pixel to shadow texel ratio high enough and use wider sampling kernel. So you want to push your effective shadow resolution as high as possible. For Hardland I use standard cascade shadow maps but I also clip sub frustums to ground plane(I just use min of height map for frustum area). Then I try to fit this clipped frustum to minimal projection area. I just use 60 different shadow camera up vectors and I choose smallest projected area. Usually worst up vector produce twice as high area.

Remember also put far plane to edge of frustum.
Keeping the extent constant and the shadow map square is supposed to fix that.

Some how I skipped that part. But this basically waste lot of effective resolution.

Luckily my temporal antialiasing filters out rest of the noise.

More advanced techniques.
http://www.realtimeshadows.com/sites/default/files/Playing%20with%20Real-Time%20Shadows_0.pdf
http://advances.realtimerendering.com/s2010/Lauritzen-SDSM(SIGGRAPH%202010%20Advanced%20RealTime%20Rendering%20Course).pdf
27  Game Development / Newbie & Debugging Questions / Re: Shadows flicker (Shadow Mapping) on: 2015-04-29 17:12:19
Snapping to texel is great with translate only but does not completely solve problem with orientation change. Only way to fix that is to push screen pixel to shadow texel ratio high enough and use wider sampling kernel. So you want to push your effective shadow resolution as high as possible. For Hardland I use standard cascade shadow maps but I also clip sub frustums to ground plane(I just use min of height map for frustum area). Then I try to fit this clipped frustum to minimal projection area. I just use 60 different shadow camera up vectors and I choose smallest projected area. Usually worst up vector produce twice as high area.

Remember also put far plane to edge of frustum.
28  Game Development / Newbie & Debugging Questions / Re: Textured Greedy Mesh on: 2015-04-08 19:43:28
Shaders should be first thing that you learn when you start to fiddle with graphics programming.
29  Java Game APIs & Engines / OpenGL Development / Re: Lightning and Bump mapping on: 2015-03-23 18:50:17
Deferred rendering would solve this perfectly. Render normals and albedo(diffuse textures) to framebuffer. Then render each light as quad using albedo buffer as input and output to backbuffer with addditive blending.
30  Game Development / Newbie & Debugging Questions / Re: [LibGDX] [Solved] How to rotate a single texture in a spritebatch? on: 2015-03-22 00:09:41
1  
2  
void   draw(Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY)
//Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels.


There is this monstrosity what you should call when you want rotation and not use TextureRegion/Sprite.
Pages: [1] 2 3 ... 24
 
KaiHH (164 views)
2016-01-31 23:15:29

sci4me (158 views)
2016-01-23 21:47:05

sci4me (141 views)
2016-01-23 21:46:58

KaiHH (175 views)
2016-01-19 13:26:42

theagentd (261 views)
2016-01-05 17:10:00

ClaasJG (277 views)
2016-01-03 16:58:36

chrisdalke (266 views)
2015-12-28 06:31:21

Guerra2442 (278 views)
2015-12-25 03:42:55

Guerra2442 (281 views)
2015-12-25 03:27:21

theagentd (301 views)
2015-12-21 14:43:24
List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48
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!