Hi,
I've been trying to figure out how to draw a 3D object on a 2D screen and I just can't get it. I looked over some LOVE examples but I still can't figure out anything. How do I draw a 3D object using LOVE? Can someone please explain?
3D rendering
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
3D rendering
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
Re: 3D rendering
It's not simple. It is, Love2D. Requires lots of maths and stuff. Just thought I'd let you know. If you're really experienced in that kind of stuff, then I'm sorry, I'm no help.
Code: Select all
L
L Ö
Ö V
L Ö V E
Ö B E
V E
E Y
Re: 3D rendering
I know it's not simple, but I still want to do it.iPoisonxL wrote:It's not simple. It is, Love2D. Requires lots of maths and stuff. Just thought I'd let you know. If you're really experienced in that kind of stuff, then I'm sorry, I'm no help.
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
Re: 3D rendering
you probably wanna use unity3d or sauce engine instead....
Re: 3D rendering
The difficult part is the perpective projection. That is the transformation that transforms a 3d-point coordinates (x,y,z) to a 2d coordiante (on screen).spynaz wrote:How do I draw a 3D object using LOVE? Can someone please explain?
If, for a start, you assume the viewer is in the origin (0,0,0) and your screen is in the x-y-plane at z=1 then the transform is:
Code: Select all
function transform (wx,wy,wz)
return wx/wz, wy/wz
end
Check out my blog on gamedev
Re: 3D rendering
So that's the transform? Ok, but what about quaternions and stuff? I want to be able to rotate and move around too.micha wrote:The difficult part is the perpective projection. That is the transformation that transforms a 3d-point coordinates (x,y,z) to a 2d coordiante (on screen).spynaz wrote:How do I draw a 3D object using LOVE? Can someone please explain?
If, for a start, you assume the viewer is in the origin (0,0,0) and your screen is in the x-y-plane at z=1 then the transform is:Once you have the coordinates of points, you can use these to draw triangles or lines.Code: Select all
function transform (wx,wy,wz) return wx/wz, wy/wz end
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
Re: 3D rendering
My advice is to start with the simple approach and a fixed camera position. If that works, go on and implement rotation and movement. Unfortunately, I cannot help you any further, as I haven't tried it on my own. But I am pretty sure, you will find some tutorial with google.
Check out my blog on gamedev
Re: 3D rendering
I can't find any tutorials. Do you know any good ones?micha wrote:My advice is to start with the simple approach and a fixed camera position. If that works, go on and implement rotation and movement. Unfortunately, I cannot help you any further, as I haven't tried it on my own. But I am pretty sure, you will find some tutorial with google.
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
Re: 3D rendering
you could also... use a... 3D engine?
Who is online
Users browsing this forum: No registered users and 87 guests