### Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

### Messages - Mortal

Pages: [1] 2 3 ... 19
1
##### General / Re: Can this collision code be simplified?
« on: May 29, 2022, 04:56:43 pm »
you may try manifold for detecting the collision, here an excellent tutorial in this topic with examples:

http://trederia.blogspot.com/2016/02/2d-physics-101-pong.html

2
##### SFML projects / Re: practice exercises on 2D/3D Physics - SAT algorithm
« on: April 24, 2021, 05:22:34 am »
back to my early 2D/3D physics project on Separating Axis Theorem algorithm  (SAT) and its Minimum Translation Vector (MTV) and The Sutherland–Hodgman algorithm (SH clipping).

i've made some progress but still a bit unstable. here short video about what has been done so far

SAT Collision Detection with MTV

2D Physics Simulation [SAT-MTV-SH Clipping]

3
##### SFML projects / practice exercises on 3D Planet Rendering - Icosahedral Base Mesh
« on: April 05, 2021, 06:39:08 am »
Hello guys

continuing on my terrain studying... i was dabbling with 3D Icosahedron mesh to achieve some how a planetary terrain. it seems fit well. here my progress

Icosahedral Base Mesh

LOD & Frustum Culling

Texturing

CDLOD-[Morph] & Heightmap

4
##### SFML projects / Re: Titanion Clone
« on: April 03, 2021, 04:17:15 am »
thanks
REZ really impressive, more likely it was hacking code than a game. lol

5
##### SFML projects / Re: practice exercises on 3D terrain - GPU Geometry Clipmaps
« on: April 03, 2021, 03:52:58 am »
update:

testing LOD tree Rendering

6
##### SFML projects / Re: practice exercises on 3D terrain - GPU Geometry Clipmaps
« on: April 03, 2021, 03:41:14 am »
re-visit old project

i added Detail-Texture & Cloud & Fog

i added simple & slow Trees & Grass Rendering

7
##### SFML projects / Re: practice exercises on 3D terrain - GPU Geometry Clipmaps
« on: April 24, 2020, 07:35:51 pm »
hi elias
good to see you, welcome back

8
##### SFML projects / Re: practice exercises on 3D terrain - GPU Geometry Clipmaps
« on: April 20, 2020, 08:15:48 pm »
thanks
Yes it is, I used the sfml window module for the window creation and UI. For the rendering, I used opengl in this project.

9
##### SFML projects / Re: practice exercises on 3D terrain - GPU Geometry Clipmaps
« on: April 03, 2020, 08:40:44 pm »
The original demo from the gem 2 book, was using Puget Sound, It is located along the northwestern coast of the U.S. state of Washington. The texture has a resolution of 160kmx160km. It is a fairly big size map. I added a Puget Sound map to the final demo in this practice exercises-series. Also, I added simple gradient texture to the terrain as what the original demo has. The prototype isn't optimized at its current state right now but it is definitely a start for further improvements.

Here the final result as what was described in that chapter:

10
##### Graphics / Re: Reusing a single sf::Sprite through a game: good or bad idea?
« on: April 02, 2020, 12:47:00 pm »
no, in contrary, what did you do is the most optimal way to handle the texturing efficiently with SFML or 2D graphics in general. this method sometime is called atlas-texture or texture-atlas i'm not sure.

11
##### SFML projects / Re: practice exercises on 3D terrain - GPU Geometry Clipmaps
« on: March 31, 2020, 11:25:13 am »
I added height-map to the terrain example. It wasn't easy for implementing height-map, especially for their terrain model, it needs other techniques to fill the crack and smooth the edges of every block level. But at the end of the road, it is achievable.

Here the latest update wireframe-demo for debugging:

12
##### SFML projects / practice exercises on 3D terrain - GPU Geometry Clipmaps
« on: March 30, 2020, 03:48:08 pm »
Hello guys

Still I'm working on my 3D OpenGL framework, this week I'm gonna focus on landscape;

There are many ways to make 3D terrains. The method that drew my attention most is GPU Geometry Clipmaps. It was introduced in GPU Gems 2: chapter 2, for nvidia. Here a link: https://developer.nvidia.com/gpugems/gpugems2/part-i-geometric-complexity/chapter-2-terrain-rendering-using-gpu-based-geometry .

I have implemented base blocks of their algorithm. It works fine for now, but still there is more to achieve the final result as shown in that chapter. For example, the height-map and normal-map ... etc.

Here the demo for the initial implementation:

13
##### SFML projects / Re: practice exercises on 3D Physics - SAT algorithm
« on: March 22, 2020, 10:21:50 am »
Desperate attempt to optimize the physics simulation.

I added Octree as Broad Phase Collision Detection while SAT is kept for what is called a Narrow Phase Collision Detection, it’s a common technique for optimization, it is used in both Box2D and Pullet3, but still that doesn't help to improve the performance. The frame rate dropped down below 10 FPS which is unacceptable for real time applications / games.

Here demo for latest update:

14
##### SFML projects / Re: practice exercises on 3D Physics - SAT algorithm
« on: March 21, 2020, 01:15:36 pm »
Testing SAT algorithm on 3D environment.

The principle is the same as 2D except for some tweak to suit the 3D environment. The test was for collision detection and basic physics resopene. it looks working just fine but unfortunately, it is so SLOW,  it is not suitable for 3D games.

Here the demo:

15
##### SFML projects / Re: practice exercises on 2D/3D Physics - SAT algorithm
« on: March 18, 2020, 08:12:17 am »
The second demo shows how the SAT algorithm works for testing the AABB detect collision of two quads.

From the previous demo, it is already known that each axis is a potential direction along which we can project the objects. So, all we need to do is find the axis with the smallest amount of overlap between the two objects.
the direction of the projection vector “ARROW” is the same as the axis direction which is the XY plane, and the length of the projection vector is equal to the size of the overlap along that axis.

SFML implemented it efficiently on sf::Rect::intersects, check it here:
https://github.com/SFML/SFML/blob/master/include/SFML/Graphics/Rect.inl#L109

Here the demo: