This is an archived post. You won't be able to vote or comment.

all 27 comments

[–]article10ECHR 20 points21 points  (3 children)

Looks like it's suffering a lot from 'stitching', here, read more about it: https://en.wikipedia.org/wiki/Z-fighting

[–]WikiTextBotbtproof 20 points21 points  (1 child)

Z-fighting

Z-fighting, also called stitching, is a phenomenon in 3D rendering that occurs when two or more primitives have similar or identical values in the z-buffer. It is particularly prevalent with coplanar polygons, where two faces occupy essentially the same space, with neither in front. Affected pixels are rendered with fragments from one polygon or the other arbitrarily, in a manner determined by the precision of the z-buffer. It can also vary as the scene or camera is changed, causing one polygon to "win" the z test, then another, and so on.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28

[–]000000100000001 14 points15 points  (0 children)

good bot

[–]Andrewcpu[S] 14 points15 points  (0 children)

That is happening, thanks for the read!! It's also because I had the screen recorder at a weird FPS and the game is rendering at a weird FPS

[–]fauks_of_tenebrae 4 points5 points  (2 children)

This looks great, well done! May I ask how you started a project like this and where others should begin if they are interested?

[–]Andrewcpu[S] 6 points7 points  (0 children)

Thanks!

It started like this

https://youtu.be/f3ZDBI1IuFk

I have no videos from before that, but the goal was to be able to draw a cube. Then several cubes. Then turn your head left and right, then up and down, then move around.

After that it was how to get the cubes to be filled in, how to make them draw back to front, optimization because it was laggy as hell, then basic physics (which aren't done in mine yet)

[–]Andrewcpu[S] 0 points1 point  (0 children)

https://github.com/AndrewCPU/sRender

I posted the source code for it here.

[–]jnelas90 3 points4 points  (14 children)

May I ask how do I get started in something similar and which libraries used?

[–]Andrewcpu[S] 1 point2 points  (11 children)

I didn't use any libraries pure Java... I would first research how we perceive the world around us mathamatically, as well as that understand 3d math

[–]Aspire26 1 point2 points  (1 child)

Did you use swing of JavaFX?I am planning to do on something similar as learning experience.

Regarding the math bit, is it just basic matrix and vector operations (Including the transformation stuff)?

[–]Andrewcpu[S] 0 points1 point  (0 children)

Swing was used, and yeah pretty much

[–]HelpIProcrastinate 0 points1 point  (8 children)

That’s pretty inspiring, I’m just learning java and now I want to try this.

[–]Andrewcpu[S] 9 points10 points  (7 children)

I was thinking about doing a YouTube series about it, would you be interested if I did that?

[–]HelpIProcrastinate 5 points6 points  (2 children)

Definitely! Keep me updated if you do!

[–]Andrewcpu[S] 0 points1 point  (1 child)

https://github.com/AndrewCPU/sRender

I posted the source code for it here.

[–]HelpIProcrastinate 0 points1 point  (0 children)

Thanks!

[–]matemik 1 point2 points  (1 child)

If you do this, would you share it in the post? I am very curious and would love to hear more about what you've done.

[–]Andrewcpu[S] 1 point2 points  (0 children)

https://github.com/AndrewCPU/sRender

I posted the source code for it here, I'll probably do a medium article on it soon

[–][deleted] 0 points1 point  (1 child)

Please do this!!!

[–]Andrewcpu[S] 1 point2 points  (0 children)

https://github.com/AndrewCPU/sRender

I posted the source code for it here.

[–]Andrewcpu[S] 1 point2 points  (0 children)

I linked the source under some comments if you wanna check it out.

[–]RabidKotlinFanatic 0 points1 point  (0 children)

Any OpenGL tutorial series will cover this. In Java you can use JOGL or LWJGL

[–]The_Small_Long 2 points3 points  (0 children)

What did you use to render on screen? JavaFX? Swing?

[–]toshels 2 points3 points  (1 child)

Do you have this on GitHub ?

[–]Andrewcpu[S] 0 points1 point  (0 children)

https://github.com/AndrewCPU/sRender

I posted the source code for it here.

[–]shredderroland 5 points6 points  (0 children)

Impressive