3D Rendering Engine in Love 2D

Show off your games, demos and other (playable) creations.
Post Reply
User avatar
DwayneDev
Prole
Posts: 28
Joined: Sat Jun 15, 2019 9:33 pm
Contact:

3D Rendering Engine in Love 2D

Post by DwayneDev »

I took a course for 3D geometry and applied the math's to Love 2D to draw 3D shapes.


-didn't use CPML or any Shaders

-wrote a parser to load .obj files and map UV Texture coordinates to mesh objects.
-The program passed drops below 60 fps passed 30,000 tris - does anyone has any optimization tips for 3D in Love 2D?

-the UV coordinates read from .obj files will display incorrectly if the models vertices are closed together. if the mesh is cut to make the shape open the UV texture displays accurately. I don't know why this is the case so far, I expected the texture would display the same as it does in my blender project but perhaps I need to do something else with the UV coordinate data from the obj?
3D demos (run one of the love files).zip
(14.92 MiB) Downloaded 296 times
Diamond Deer.JPG
Diamond Deer.JPG (42.02 KiB) Viewed 6614 times
running with Higher poly Deer models exceeding 30,000 tris gets around 30 fps on my laptop. It's not love its me, any tips on how to improve the fps?
So far I've compacted matrix calculations and got performance improvements anything else I could do?

Just download the zip and run the love files inside: it needs to read .obj's from the same directory to work because I didn't set up the filesystem. :^P
3D demos (run one of the love files).zip
(14.92 MiB) Downloaded 296 times
Here's the git if you want to see the code, I tried to code it in an Object-Oriented way with inheritance:
https://github.com/DwayneSpades/3D-Engine-in-Love2D
Attachments
city mock1.JPG
city mock1.JPG (102 KiB) Viewed 6614 times
Visit my blog or social medias to play or follow my current game projects:
My blog: https://blog.dwaynedev.dev/
My Twitter: https://twitter.com/Animoodl
My itch.io: https://dwaynedev.itch.io/
User avatar
pgimeno
Party member
Posts: 3549
Joined: Sun Oct 18, 2015 2:58 pm

Re: 3D Rendering Engine in Love 2D

Post by pgimeno »

DwayneDev wrote: Mon Feb 10, 2020 7:24 pm -The program passed drops below 60 fps passed 30,000 tris - does anyone has any optimization tips for 3D in Love 2D?
A priori I can only think of backface culling, if you're not using it already.
User avatar
DwayneDev
Prole
Posts: 28
Joined: Sat Jun 15, 2019 9:33 pm
Contact:

Re: 3D Rendering Engine in Love 2D

Post by DwayneDev »

Yeah I turned on the back face culling feature. Doing the matrix math with a gl calls in a shader wouldn't make this faster would it?
Visit my blog or social medias to play or follow my current game projects:
My blog: https://blog.dwaynedev.dev/
My Twitter: https://twitter.com/Animoodl
My itch.io: https://dwaynedev.itch.io/
KayleMaster
Party member
Posts: 234
Joined: Mon Aug 29, 2016 8:51 am

Re: 3D Rendering Engine in Love 2D

Post by KayleMaster »

You should ask Shell32 on the discord server. He's doing some amazing stuff with 3D and may give you some tips.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 70 guests