Looking for a 3d tutorial

General discussion about LÖVE, Lua, game development, puns, and unicorns.
AlexYeCu
Citizen
Posts: 53
Joined: Fri May 30, 2014 4:08 pm

Looking for a 3d tutorial

Post by AlexYeCu »

Looking for a tutorial or any other information for using 3d in love.
Need to create several textured planes with correct perspective.
Something like terrain in old dos-time games: YoB, Wizardry VII, MM IV/V.
User avatar
YoungNeer
Party member
Posts: 118
Joined: Wed May 15, 2019 7:49 am

Re: Looking for a 3d tutorial

Post by YoungNeer »

Technically you just can't make a 3d game in love2d. Cause as the about page of the site says "love is specialized only for 2d games" but ofcourse that wouldn't stop the community from trying out ways to render a 2d image so that it looks more like 3d. So even though you can't make a 3d game still you can make a 3d game. :huh:

Honestly saying I haven't tried any of it myself - I'll simply post links of what other people are doing or have done.

viewtopic.php?t=85199 [Cube renderer - renders a 2d square (image) as a cube which I think is cool - but the source is very complicated}

viewtopic.php?f=5&t=1692 [3D dice game. I can't comment on this one since it uses a old version of love and so i couldn't run it]

https://github.com/coltonoscopy/rl-fps [Kinda like doom I'd say - to run in the latest version of love you'll have to replace the push.lua in the code/lib folder with the latest version of push library]

Finally all these stuff really don't count as tutorials. I'm afraid there is no tutorial on 3d for love (since it's not officially supported) And I don't want to disappoint you and all that - so here's a library you can look into. From the look of things - it should not be hard (by that I don't mean it's going to be easy)

https://github.com/krakow10/Love2D/blob ... ective.lua

Again I'd like to point out that you can create 3d games only the way they did it in the 90s not the way they do it now (that is 100% impossible to achieve - cause you can't load a 3d model in love on the first place - maybe some fork might do that but that's a different matter)
My Github- your contribution is highly appreciated
User avatar
zorg
Party member
Posts: 3436
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Looking for a 3d tutorial

Post by zorg »

Löve2d uses OpenGL under the hood, and version 11 added all the necessary functions to do 3D games without any FFI hacks, so Löve is indeed fully capable of creating actual 3D games.

And it is officially supported, in that it supports the necessary functions; if anything, the wiki's just lagging a bit behind on the functions needed for it; they will be eventually written up.
YoungNeer wrote: Mon Jul 29, 2019 4:35 pm Again I'd like to point out that you can create 3d games only the way they did it in the 90s not the way they do it now (that is 100% impossible to achieve - cause you can't load a 3d model in love on the first place - maybe some fork might do that but that's a different matter)
And this is wrong, people have already written at least one quake model loader for it, and released "true 3D" projects using it.
https://love2d.org/forums/viewtopic.php ... 90#p214485
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
AlexYeCu
Citizen
Posts: 53
Joined: Fri May 30, 2014 4:08 pm

Re: Looking for a 3d tutorial

Post by AlexYeCu »

>Again I'd like to point out that you can create 3d games only the way they did it in the 90s

Well, yes. I want to make something close to 90s. But there is one thing which is a real problem: terrain in the perspective view.
I've seen the link about SS3D, and it's developer says that there new features in love2d 11 which can help to create simple 2d objects easily, so there is no point to continue SS3D development. So, I thought someone used these new functions and can answer if the thing I want to do is possible in love2d or not.
User avatar
Kindermaus
Prole
Posts: 33
Joined: Sun Sep 23, 2018 5:08 am

Re: Looking for a 3d tutorial

Post by Kindermaus »

I've been working on a fully functional 3D game with decently modern rendering techniques (deferred renderer with second forward pass for translucent objects, plus a pluggable fully forward mobile renderer)... You could even do PBR and stuff, the sky is the limit with LOVE 11.
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
:emo: they / she
sphyrth
Party member
Posts: 260
Joined: Mon Jul 07, 2014 11:04 am
Contact:

Re: Looking for a 3d tutorial

Post by sphyrth »

I don't know about any tutorial, but this thread has some info. The guy was trying to solve a "Portal" problem, but it's libraries are small enough for you to study how 3d can work using Love2D.
User avatar
YoungNeer
Party member
Posts: 118
Joined: Wed May 15, 2019 7:49 am

Re: Looking for a 3d tutorial

Post by YoungNeer »

zorg wrote: Mon Jul 29, 2019 5:01 pm And this is wrong, people have already written at least one quake model loader for it, and released "true 3D" projects using it.
viewtopic.php?f=5&t=78943&start=190#p214485
Oh look it's the know-it-all again (no-offense). Anyways thanks for letting me know.

I cloned the repository at github and really it's supercool but I don't really think there's a 3d file format by the extension 'iqm" (and even if there is what's it's use when I can't import it in 3dsMax) So that means my assertion that love can't load 3d models is still correct (I'm not talking about the forks out there such as love3d,etc,etc)

Extra Note: Even before you told me - I knew you could "load an 3d model" particularly obj files. But as you may know wavefront file is just a text file with information about the position of origin, vertices (texture and non-textured) and all that. So one could really parse them using the default io system of lua or love.filesystem and render it in 2d. And that is just what this library (viewtopic.php?t=11307) does! But although this may sound cool - the technique is awful (it works well only on planes and i guess on very basic 3d models such as cube, cylinder, etc). I tried loading one of my 3d models with it and see a screenshot-

Image

Well if it was a hat model then I wouldn't have criticised but it was a tree model and not to mention that even though it did load the material - it didn't render that because it was a image texture not color texture. I think it's somewhat difficult (or impossible) to draw a "textured polygon" in love and distorting images in general which is why the dude who made the library couldn't figure his head around how to load (and render) materials from the mtl file.
My Github- your contribution is highly appreciated
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: Looking for a 3d tutorial

Post by pgimeno »

AlexYeCu wrote: Mon Jul 29, 2019 3:09 pm Looking for a tutorial or any other information for using 3d in love.
Need to create several textured planes with correct perspective.
Something like terrain in old dos-time games: YoB, Wizardry VII, MM IV/V.
The very basics of using 3D vertices to form triangles are covered here:

https://love2d.org/forums/viewtopic.php ... 33#p220633

There is also a 3D library with a demo here, but without any model loader (however it comes with a pretty impressive example):

https://love2d.org/forums/viewtopic.php?f=5&t=86350
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: Looking for a 3d tutorial

Post by Tjakka5 »

YoungNeer wrote: Tue Jul 30, 2019 8:31 am snip
LaN2ju4.png
LaN2ju4.png (224 KiB) Viewed 13216 times
I was able to load in this model + textures + specular light map with ease in LÖVE. It was definitely under 100 lines of code.

Additionally, exists.
To say LÖVE can't do (modern) 3D is just plain wrong.


To be a bit more on topic.
I've been sending my github repo around as a barebones example for how to get 3D going in LÖVE.
Learnopengl is also a great resource. You'll have to skim through the first few tutorials since it focuses on just setting things up that LÖVE already provides, but after that it's an amazing source of knowledge for 3D stuff.
Last edited by Tjakka5 on Tue Jul 30, 2019 11:24 am, edited 1 time in total.
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: Looking for a 3d tutorial

Post by pgimeno »

YoungNeer wrote: Tue Jul 30, 2019 8:31 am I cloned the repository at github and really it's supercool but I don't really think there's a 3d file format by the extension 'iqm" (and even if there is what's it's use when I can't import it in 3dsMax) So that means my assertion that love can't load 3d models is still correct (I'm not talking about the forks out there such as love3d,etc,etc)
Yes, your assertion that love can't load 3d models is correct, that's why there are support libraries like iqm. Blender can handle iqm files just fine when installing the corresponding extension, therefore Blender users can and do use iqm with LÖVE, which responds to your question of "what's its use".

LOVE3D is not a fork of LÖVE, it's a library for LÖVE, but it's obsolete with love 11.0+. LOVR is not a fork either, by the way, it's a new engine that copies a lot of the API.
Post Reply

Who is online

Users browsing this forum: pgimeno and 46 guests