Page 1 of 2

Love 2D with 3D

Posted: Tue Jul 14, 2015 3:24 pm
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

Re: Love 2D with 3D

Posted: Tue Jul 14, 2015 8:59 pm
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:

Re: Love 2D with 3D

Posted: Fri Jul 17, 2015 1:57 pm
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

Re: Love 2D with 3D

Posted: Sat Jul 18, 2015 10:07 am
by Linkpy
OMFG... :crazy:

I predict that you'll receive a letter from Khronos Group :awesome:
Soon...
In a few month...
Maybe... :crazy:

Re: Love 2D with 3D

Posted: Sat Jul 18, 2015 9:44 pm
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...

Re: Love 2D with 3D

Posted: Thu Jul 23, 2015 4:57 pm
by raingloom
When I move the camera closer, there is a really noticeable transformation error. Otherwise it's not bad.

Re: Love 2D with 3D

Posted: Sat Jul 25, 2015 9:48 pm
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

Re: Love 2D with 3D

Posted: Sun Jul 26, 2015 4:12 am
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

Re: Love 2D with 3D

Posted: Sun Jul 26, 2015 4:40 am
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.)

Re: Love 2D with 3D

Posted: Fri Feb 25, 2022 1:41 pm
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 :(