Love 2D with 3D

Showcase your libraries, tools and other projects that help your fellow love users.
RoboLV
Prole
Posts: 2
Joined: Tue Jul 14, 2015 2:56 pm

Love 2D with 3D

Post by RoboLV »

Hello everyone!
Last days I tried to make 3D rendering ower 2D. Yes, there no hight performance, as for me that was small experiment for experience.
Simple render system, simple entity system ( models ). Any way that was my first experience with love 2d and with custom 3d rendering.

P.S I used only triangles, lines and dots :)

Enjoy! :awesome:
Image
Image
Image
Image
Image
Attachments
3DTest.love
Sources...
(71.6 KiB) Downloaded 660 times
User avatar
Linkpy
Party member
Posts: 102
Joined: Fri Aug 29, 2014 6:05 pm
Location: France
Contact:

Re: Love 2D with 3D

Post by Linkpy »

Wow... Pretty awesome ! :awesome:

You just need to add the ability to use texture, and... You'll be hire by Khronos Group ! :crazy:
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
RoboLV
Prole
Posts: 2
Joined: Tue Jul 14, 2015 2:56 pm

Re: Love 2D with 3D

Post by RoboLV »

Linkpy wrote:Linkpy
No problem :3

Image

Image

How to use
Keys from 1 to 4 change draw method
Keys W A S D to fly
Keys arrows to rotate cube :3
Attachments
3DTest.love
v2
(115.73 KiB) Downloaded 632 times
User avatar
Linkpy
Party member
Posts: 102
Joined: Fri Aug 29, 2014 6:05 pm
Location: France
Contact:

Re: Love 2D with 3D

Post by Linkpy »

OMFG... :crazy:

I predict that you'll receive a letter from Khronos Group :awesome:
Soon...
In a few month...
Maybe... :crazy:
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Love 2D with 3D

Post by Positive07 »

Awesome mate!

I think there is a little error in the transformations you are doing, probably a sine or cosine. If you try to look at the bottom of the crate it looks more like a rhombus than a square.

As I said in the top this is awesome and really well done... Too bad meshes dont warp the images the right way!! you could be doing a lot of things...
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
raingloom
Prole
Posts: 36
Joined: Wed Apr 22, 2015 12:35 am
Location: Always elsewhere

Re: Love 2D with 3D

Post by raingloom »

When I move the camera closer, there is a really noticeable transformation error. Otherwise it's not bad.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Love 2D with 3D

Post by Positive07 »

raingloom wrote:When I move the camera closer, there is a really noticeable transformation error. Otherwise it's not bad.
That is probably caused by meshes trying to transform the image in a 2D plane instead of a 3D one, can only be fixed with shaders but would destroy the whole point of doing all this in software I think
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Love 2D with 3D

Post by Davidobot »

Positive07 wrote:
raingloom wrote:When I move the camera closer, there is a really noticeable transformation error. Otherwise it's not bad.
That is probably caused by meshes trying to transform the image in a 2D plane instead of a 3D one, can only be fixed with shaders but would destroy the whole point of doing all this in software I think
This is what Jasoco and I use in our 3D projects for textured polygons: https://www.love2d.org/forums/viewtopic.php?t=12483
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Love 2D with 3D

Post by Jasoco »

I would still recommend a shader. Löve's built-in meshes don't correct for perspective so you get the warping. The shader is the best way to do it without it being built into Löve itself.

Note: I've highly modified my version of the Perspective.lua file since Monkey Man gave it to me, but it still works the same way. (I added the ability to tint the image a certain color like for doing darkness and fog and made it so I could use it with any size resolution I need like for drawing to canvases that are smaller or bigger than the current resolution of the window.)
alejandroalzate
Citizen
Posts: 67
Joined: Sat May 08, 2021 9:45 pm

Re: Love 2D with 3D

Post by alejandroalzate »

What version uses? to try to get back to life again
That texture warping is a master piece like PS1 & N64 thing

oh and look for my bad luck it crashes

Code: Select all

Error

3Dlib.lua:159: Invalid Mesh vertex data type name '500', expected one of: 'byte', 'unorm16', 'float'


Traceback

[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'newMesh'
3Dlib.lua:159: in function 'Render'
main.lua:104: in function 'draw'
[love "callbacks.lua"]:168: in function <[love "callbacks.lua"]:144>
[C]: in function 'xpcall'
tested on 11.4 :(

Code: Select all

target = boardIndex.getWhosPeekingThisLine()
target:setObey(true)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests