Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (767)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (854)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 202 203 [204]
  ignore  |  Print  
  What I did today  (Read 2833930 times)
0 Members and 1 Guest are viewing this topic.
Offline KaiHH

JGO Kernel


Medals: 573



« Reply #6090 - Posted 2018-08-27 12:33:26 »

Still working hard at the next Tutorial8 Path Tracing Demo with temporal and spatial antialiasing. Here are some images of real-time footage at different implementation stages:
1:2:
3:4:
5:
1. Importance Sampling (1 sample per pixel, 3 bounces) without temporal or spatial filtering (still camera)
2. (1.) + temporal filtering (still camera)
3. (2.) + edge-avoiding spatial filtering (still camera)
4. (2.) + animation (fast strafe to the left)
5. (3.) + animation (fast strafe to the left)

The newly disoccluded samples in an animation (5.) are faaar less noticeable than the ones in (4.), because of the spatial filtering (edge-avoiding à-trous filter), which in my implementation also takes into account the lifetime of a sample (samples that live longer will be filtered less than newly disoccluded samples to avoid unnecessarily smearing/blurring samples with low variance).

Next: Add Nuklear UI to tweak parameters without having to recompile and restart the application and losing previous viewpoints (as is visible in the images - the difference in specular reflection at the top right is not due to filtering but because of different viewpoints causing different Fresnel factors).

Video: https://www.youtube.com/watch?v=I3TBG9Zju68
Offline Stampler
« Reply #6091 - Posted 2018-08-27 20:38:03 »

Hi guys,

I am looking for a game that was posted here some years ago (at least one).
I can't remember its name, but some of its story and the game concept:

I think it was top down and had pixel-art.
The game involved a lot of reading and featured many books.
It plays in your deceased father's house (he was a writer I think) and you had to find some secrets by reading and combining a lot.
I haven't played it much though, so I don't know if the place changes, but the main part played only in a few rooms with many bookshelves and your father's desk.

I hope someone can point me to it  Smiley

EDIT:
Nevermind, I already found it! It's here if you're interested  Smiley
P.S. I did search the featured, showcase, and WIP section plus searching for "book/s" with the search function before posting. No hate please.  Grin

Don't dream big, dream realistic.
beemelonstudio: Website | Twitter | Instagram
Offline jonjava
« Reply #6092 - Posted 2018-08-27 20:54:38 »

@Stampler Seven Sages probably: http://sevensagesgame.tumblr.com/

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

JGO Knight


Medals: 95



« Reply #6093 - Posted 2018-08-28 10:05:59 »

@KaiHH Very nice!!! What primitives exactly are you tracing in your implementation?
Offline KaiHH

JGO Kernel


Medals: 573



« Reply #6094 - Posted 2018-08-28 10:53:04 »

Thanks! All primitives are AABBs. I used Blender to model and preview the scene (all primitives are boxes there, too) and exported as Wavefront OBJ. Fortunately, Blender's OBJ exporter has the option to declare each mesh/object as a separate 'o' object and Assimp uses those 'o' declarations to mark individual meshes, so I simply used Assimp to load the OBJ file with all separate meshes/objects, computed each individual min,max coordinates and voilà, those were my AABBs for the raytracer (and also the rasterizer - it's a hybrid implementation). Smiley
Offline h.pernpeintner

JGO Knight


Medals: 95



« Reply #6095 - Posted 2018-08-28 12:24:24 »

Very nice, do you plan to expand your tracer to trace against triangles with acceleration structures?

I have AABBs for every instance in my engine for occlusion culling, maybe you can give me your tracing code, so that I can test it with my engine O:-)
Offline KaiHH

JGO Kernel


Medals: 573



« Reply #6096 - Posted 2018-08-28 12:38:39 »

Sure, I plan to release the code to the LWJGL/lwjgl3-demos repository as with all other tutorials/demos there.
As for acceleration structures, not for this demo. For this, I wanted to keep everything as reasonably simple, accessible (current implementation is GL 3.3) as possible, concentrating on the filtering aspect, while still being somewhat interesting and extensible (custom scenes). And without a current acceleration structure the implementation is still real-time on 4K.
But I definitely want to explore BVH/LBVH building on the GPU and maybe switching to triangle meshes in later demos.

But you can see an already working demo with triangles and stack-less kd-tree traversal here which renders the Sponza model (although this is definitely not 4K real-time-capable):
- https://github.com/LWJGL/lwjgl3-demos/blob/master/src/org/lwjgl/demo/opengl/raytracing/tutorial/Tutorial7.java
- https://github.com/LWJGL/lwjgl3-demos/blob/master/src/org/lwjgl/demo/opengl/raytracing/tutorial/KDTreeForTutorial7.java
- https://github.com/LWJGL/lwjgl3-demos/blob/master/res/org/lwjgl/demo/opengl/raytracing/tutorial7/raytracing.glsl
Offline cygnus
« Reply #6097 - Posted 2018-09-01 03:35:06 »

Check it out. An animation DSL! Sorry, Cas.

Now you can say Animation.ROBOT.play("walk_then_wait") or ("waiting") or whatever you want without switching between textures. I also released a cool play button animation:
<a href="http://www.youtube.com/v/OZ1AYd6OJ5Y?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/OZ1AYd6OJ5Y?version=3&amp;hl=en_US&amp;start=</a>
Offline SkyAphid
« Reply #6098 - Posted 2018-09-01 19:24:57 »

Check it out. An animation DSL! Sorry, Cas.


Very nice! If I had one bit of feedback, I'd turn the ticks you use into something that's more easily modifiable incase you need to change your Updates per Second in the future. What I tend to do on my projects is something like this:

In the game core:
1  
public static final int UPDATES_PER_SECOND = 30;


In animation code:
1  
animationDelay = UPDATES_PER_SECOND/10; //So a tenth of a second, no matter what the tick-rate is


Of course, your system may already handle that, but I just wanted to write this feedback just in case. Having constants for important aspects of any engine is pretty important, in my opinion.

There's also a more complex version of this where you can use the timestep to determine how long something should take, but the above easier to remember and more verbose in my opinion.

it just werks
Offline cygnus
« Reply #6099 - Posted 2018-09-01 19:30:34 »

I do have a constant in the main class that defines the UPS. I don't plan on changing that, because any lower would mean the game would look choppy and any higher would be too performance intensive. I really appreciate the suggestion though, and that would certainly be the best solution if I were less confident the UPS wasn't going to be changed.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SkyAphid
« Reply #6100 - Posted 2018-09-01 20:36:41 »

I do have a constant in the main class that defines the UPS. I don't plan on changing that, because any lower would mean the game would look choppy and any higher would be too performance intensive. I really appreciate the suggestion though, and that would certainly be the best solution if I were less confident the UPS wasn't going to be changed.

Fair enough. I think UPS only really tends to be something that may need to be changed in the case of 3D games because the physics may need more updates to stay accurate. That was a big problem we had with We Shall Wake; we were constantly increasing the UPS because our characters were out running the physics systems. I think DEMO 7 ended up being around 276 UPS. Haha

it just werks
Offline philfrei
« Reply #6101 - Posted 2018-09-02 01:36:31 »

I've seen the advice given by SkyAphid before, with a name that was something like a "magic numbers" pattern. The notion is that a number sitting in code is often meaningless for the code reader. Giving the number a name makes it both easier to read and to edit. So as a general practice, why not? (Because coming up with names for everything is bothersome.)

****

A little while back I decided to take a break from not working on the itch.io site for selling "Tone Circle Drone" and do some coding instead. I managed to make a new synth choice for the theremin: using vocal formants generated by FM. It's a little tricky to say the least, and using a filter-based approach would have made a lot more sense, but I thought I'd try coding it anyway and see what happened.

Short version: the basic concept works! I can make smooth transitions between ooo to aaah to eee. If I have a chance, I'll make a quick OBS video. It is pretty hilarious sounding. But it could also probably use some fine tuning--I might wait until I get a chance to experiment with some of the parameters.

Maybe publishing a Theremin would make more sense as a first opus. The 'blocking' I'm experiencing on TCD has been significant. There's a bit more I want to do with the GUI but the application is close to ready. (Maybe add a "vibrato bar" via the spacebar.)

music and music apps: http://adonax.com
Offline KaiHH

JGO Kernel


Medals: 573



« Reply #6102 - Posted 2018-09-05 20:21:11 »

Had some fun with WebGL (actually I wanted to play with Webpack HMR and live-reloading shaders came to be the use-case) today being somewhat more productive at quickly prototyping stuff than with desktop Java. Tracing triangle meshes without any filtering yet:

Yes, it does look kinda crappy. Smiley
Stuff used: WebGL 2.0, Webpack (+ integration with HMR to live-reload shaders without reloading the whole app/site such as with LiveReload), Typescript, gl-matrix, webgl-obj-loader.
Offline SkyAphid
« Reply #6103 - Posted 2018-09-07 03:13:49 »

Here's a video of a small project that theagentd and I were commissioned to work on last October:

<a href="http://www.youtube.com/v/1yklZAPgamw?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/1yklZAPgamw?version=3&amp;hl=en_US&amp;start=</a>

It's a pretty cool application of our game engine outside of making actual games. It's a shame it didn't actually pan out for the people who requested it.

it just werks
Offline beeaware
« Reply #6104 - Posted 2018-09-07 09:10:07 »

@SkyAphid amazing! Is it some kind of holographic effect? Or clever placement of leds?

You know you're getting old when you played Pong while it was still hot...
Offline KaiHH

JGO Kernel


Medals: 573



« Reply #6105 - Posted 2018-09-07 13:45:15 »

The sides of the cuboid can just be thought of as separate monitors and then when knowing the position of the viewer, you calculate appropriate perspective projections and view transformations for each monitor.
This can be achieved with this, which I guess they are using ;-) https://github.com/JOML-CI/JOML/blob/master/src/org/joml/Matrix4f.java#L14101
This is also what people do with CAVE systems.
Offline SkyAphid
« Reply #6106 - Posted 2018-09-07 18:04:17 »

The sides of the cuboid can just be thought of as separate monitors and then when knowing the position of the viewer, you calculate appropriate perspective projections and view transformations for each monitor.
This can be achieved with this, which I guess they are using ;-) https://github.com/JOML-CI/JOML/blob/master/src/org/joml/Matrix4f.java#L14048
This is also what people do with CAVE systems.

Yep, we used JOML to do the heavy lifting on the math. Thanks Kai!

it just werks
Offline philfrei
« Reply #6107 - Posted 2018-09-10 03:40:50 »

Hi - Thought I'd show the vowels that are now working on the digital theremin. I'm using FM, not filters. Filters would probably make a lot more sense, but FM is the technology that I know best. I think it was Alan Benson who mentioned the possibility of using a sort of inverted arrangement, where the carrier is a high harmonic and the modulator is the root pitch. The tricky part, then, becomes, picking the harmonic to the root that is closest to the desired formant pitch. I did this by "bracketing" the formant with the nearest two harmonics, and adjusting their volumes based on how near or distant they were to the desired formant pitch. It seems to work pretty well, and could probably be improved upon.

I am just learning to use OBS, and didn't want lack of confidence or skill with video presenting or the OBS software to prevent me from posting. So, don't expect a slick video!

Vowels on PTheremin

Above is a link to the .mp4 file.

music and music apps: http://adonax.com
Offline beeaware
« Reply #6108 - Posted 2018-09-10 07:39:18 »

@philfrei This is pretty cool stuff, Phil! Would very much like to try this out (I'm an avid fan of Tangerine Dream and the likes, so fiddling with a synth app (as I see it) is always fun). It would also be great if you could make another version for touchscreen, where you have something like different coloured clouds of particles against a black background, that expand/change when you touch them and produce different sounds. Well, that's just an idea.

You know you're getting old when you played Pong while it was still hot...
Offline ral0r2
« Reply #6109 - Posted 2018-09-12 11:23:29 »

Implemented platforms successfully to my game:

Click to Play
Offline KaiHH

JGO Kernel


Medals: 573



« Reply #6110 - Posted 2018-09-15 12:57:46 »

Today I wanted to do something with a binary BVH built using Z-order curve (i.e. Morton Code) partitioning and I searched for something that would really fit it: And that would be "minecrafty" terrains with small axis-aligned cubes. So here is a 1024x1024 cubes level completely ray-traced at ~300FPS using a custom BVH traversal with an OpenGL compute shader and with a small 32-bit bitstack to track whether the far or near child was visited, and whether that was the left or right child of the node:
<a href="http://www.youtube.com/v/mJHOQ8vIfHA?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/mJHOQ8vIfHA?version=3&amp;hl=en_US&amp;start=</a>
Code: https://github.com/LWJGL/lwjgl3-demos/blob/master/src/org/lwjgl/demo/opengl/raytracing/CubeTrace.java

EDIT: Okay, heightfields are boring. Density fields are much more interesting. 1024x1024x64 level with cubes generated using Simplex Noise density field:
<a href="http://www.youtube.com/v/5BecrNtud0o?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/5BecrNtud0o?version=3&amp;hl=en_US&amp;start=</a>
Got any ideas for a game? Smiley

EDIT2: Stress Test: 25.893.821 cubes/voxels
<a href="http://www.youtube.com/v/X49o5q9zoPw?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/X49o5q9zoPw?version=3&amp;hl=en_US&amp;start=</a>
Offline cygnus
« Reply #6111 - Posted 2018-09-17 00:09:22 »

[/size]
Quote
Today I wanted to do something with a binary BVH built using Z-order curve (i.e. Morton Code) partitioning
Ah yes I understand exactly what you're saying. Perfectly.

what does it mean?? Smiley
Offline CommanderKeith
« Reply #6112 - Posted 2018-09-17 04:45:59 »

EDIT: Okay, heightfields are boring. Density fields are much more interesting. 1024x1024x64 level with cubes generated using Simplex Noise density field
Really nice videos, thanks for sharing. Can your storage method or world-building formula cope with 4 dimensions? Would be really cool to add time as the fourth dimension and see the big lumps move about. They reminded me of blood cells.

Offline philfrei
« Reply #6113 - Posted 2018-09-17 06:12:54 »

@KaiHH - Wow!

I've always wanted to set up something where one could navigate through a noise-generated space like that. Was playing with a very naïve version using JavaFX 3D the other day, a lattice of spheres whose size depended upon the OpenSimplex value. Did nothing (as I know nothing) special, just plunked the spheres into place. It was glacially slow.

Is this BVH the same format used for motion capture devices?

I wonder if you have enough granularity to get some nice structures by adding octaves (a la fractals), or maybe get crevices by using Perlin's "turbulent" form.

I have a hard time imagining that there would be enough computing power to change these over time, as CommanderKeith asks. Would be cool if it were possible. But it would probably require a couple orders of magnitude more computations?

This should work with OpenSimplex, too, if there's any worries about lawsuits over unlicensed 3D use of Simplex Noise.

music and music apps: http://adonax.com
Offline KaiHH

JGO Kernel


Medals: 573



« Reply #6114 - Posted 2018-09-17 07:31:22 »

what does it mean?? Smiley
It means that we can have path-traced minecrafty worlds. Smiley
This has also been done earlier by: https://raytracedminecraft.wordpress.com/

Can your storage method or world-building formula cope with 4 dimensions? Would be really cool to add time as the fourth dimension and see the big lumps move about. They reminded me of blood cells.
Currently, the noise evaluation and BVH building is done on the CPU. The most expensive part is the noise evaluation, even though I am currently only using one octave and it is already multi-threaded (I probably should not be using ByteBuffer.putFloat()...). But building the BVH is simple and blazingly fast. And using z-order curve partitioning even makes it parallelizable to run on the the GPU, which was my motivation in the first place (but first getting a working CPU implementation).
Next is to port that to compute shaders to sort the voxels and build the BVH bottom-up.

With this, it is quite possible to animate the voxels over time. See for example this: https://www.youtube.com/watch?v=-6jyt192pK0
In this case, you would likely use transform feedback to evaluate animation like usual with vertex weights, write them out to a buffer object and use that data to build a BVH.

Is this BVH the same format used for motion capture devices?
It is BVH as in "Bounding Volume Hierarchy" and not as in Biovisions BVH file format. So the Bounding Volume Hierarchy is a tree data structure (and in my case a binary tree - meaning each internal node has exactly two children) used to spatially index the scene geometry, so that each ray need not compute intersections with all the millions of cubes in the scene. Instead many cubes can quickly be culled when the ray does not intersect some bounding box encompassing the cubes.

I wonder if you have enough granularity to get some nice structures by adding octaves
The granularity is currently one cube. Of course one could scale them down and simply use more cubes. Smiley

Btw. I've experimented with rendering 41 million cubes at under 1ms. per frame using what is known in rasterization as "checkerboard rendering". With ray tracing and compute shaders we can achieve the same thing by not compute each pixel every frame but one pixel within a 2x2 or 3x3 or 4x4 group. Since we can do scattered writes in a compute shader (which is impossible to do in a fragment shader on the framebuffer, so people generate fragments with clever layouting of triangles), we do not need to downscale the framebuffer but rather "stretch" the distribution of the rays using a fixed stride and a varying offset per frame. This way, we can issue less work items in a compute shader call and have zero thread divergence (no if (pixel-should-be-rendered) ... else abort).

Here is a video rendering at over 1000FPS and showing 41 million cubes (the video itself is just 60Hz but the frametime of the presented rendering was just under 1 millisecond): https://www.youtube.com/watch?v=cXKpKrecvhc

EDIT: Improved the sampling pattern of the 2x2, 3x3 and 4x4 "alternating sampling" (I wouldn't call it checkerboard sampling anymore) to be less apparent in animations. Now, it looks like motion blur, because samples from earlier frames stay visible until rewritten (it's just not based on actual camera velocity). Also removed the high contrast red, green, blue color scheme. I somewhat got headaches from it after staring too long at it yesterday. So a nice grey. Here are some pictures where the sampling pattern are visible (camera flying forward quickly):

Video: https://www.youtube.com/watch?v=cFmT69ABwvA
Pages: 1 ... 202 203 [204]
  ignore  |  Print  
 
 

 
EgonOlsen (1232 views)
2018-06-10 19:43:48

EgonOlsen (1101 views)
2018-06-10 19:43:44

EgonOlsen (842 views)
2018-06-10 19:43:20

DesertCoockie (1251 views)
2018-05-13 18:23:11

nelsongames (1100 views)
2018-04-24 18:15:36

nelsongames (1329 views)
2018-04-24 18:14:32

ivj94 (2068 views)
2018-03-24 14:47:39

ivj94 (1223 views)
2018-03-24 14:46:31

ivj94 (2147 views)
2018-03-24 14:43:53

Solater (787 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!