Page 3 of 4

Re: [NEW] The Love3D Project (NEW PROJECTS)

Posted: Thu Sep 20, 2012 8:27 am
by substitute541
Woo. Good thing there's love.graphics.polygon. If I had time I could (somehow) make a pyramid. And if I had LOTS of time, I could make a cylinder(that uses math functions, not hardcoded numbers... Whew, this is kinda hard...)

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Mon Sep 24, 2012 8:34 am
by substitute541
New Perspective.lua! Haven't tested it though, so please, TEST IT :3. Found any bugs? Report to me by replying in this thread.

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Mon Sep 24, 2012 2:18 pm
by Nixola
About perspective9, calculating the average Z position of every face's extremes (vertices? vertexes?), sorting the faces checking averageZ and then drawing them should do the trick
P.S: Use conf.lua and love.conf to set width and height
I know nothing about this topic. This is just a stupid idea that actually works.

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Mon Sep 24, 2012 4:35 pm
by qaisjp
You should consider a framework, instead of a hard-to-use perspective function. Such as a camera occupying 3D space and objects occupying 3D space. Then you can move the camera to view objects from a different angle. Something like this:
3D.camera.setMatrix(positionX, positionY, positionZ, lookatx, lookaty, lookatz, roll, fov)
Where 3D is the parent library, camera is the REQUIRED sublib (because without camera you're at 0, 0, 0 looking at 0,0,0 and can't control it.)
positionX: The x coordinate of the camera's position.
positionY: The y coordinate of the camera's position.
positionZ: The z coordinate of the camera's position.
Optional Arguments
lookAtX: The x coordinate of the point the camera faces.
lookAtY: The y coordinate of the point the camera faces.
lookAtZ: The z coordinate of the point the camera faces.
roll: The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.
fov: the field of view angle, 0 to 180. The higher this value is, the more you will be able to see what is to your sides.

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Tue Sep 25, 2012 5:26 am
by substitute541
Nixola wrote:About perspective9, calculating the average Z position of every face's extremes (vertices? vertexes?), sorting the faces checking averageZ and then drawing them should do the trick
P.S: Use conf.lua and love.conf to set width and height
I know nothing about this topic. This is just a stupid idea that actually works.
Lol good job. Apparently, putting points in the table was good. I will try to edit it so it will fit other polygonal shapes. When I do, i will give you credit when I put the zSort function. :3 . Working on the 2nd version of Perspective.lua ...

And it's vertices...

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Tue Sep 25, 2012 5:36 am
by substitute541
qaisjp wrote:You should consider a framework, instead of a hard-to-use perspective function. Such as a camera occupying 3D space and objects occupying 3D space. Then you can move the camera to view objects from a different angle. Something like this:
3D.camera.setMatrix(positionX, positionY, positionZ, lookatx, lookaty, lookatz, roll, fov)
Where 3D is the parent library, camera is the REQUIRED sublib (because without camera you're at 0, 0, 0 looking at 0,0,0 and can't control it.)
positionX: The x coordinate of the camera's position.
positionY: The y coordinate of the camera's position.
positionZ: The z coordinate of the camera's position.
Optional Arguments
lookAtX: The x coordinate of the point the camera faces.
lookAtY: The y coordinate of the point the camera faces.
lookAtZ: The z coordinate of the point the camera faces.
roll: The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.
fov: the field of view angle, 0 to 180. The higher this value is, the more you will be able to see what is to your sides.

That would be hard, but it's possible. . .

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Tue Sep 25, 2012 6:38 am
by substitute541
New PerspectiveTwo.lua .. As before, haven't tested it yet, but it has the zSort functions. Credit to Nixola! :D .

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Tue Sep 25, 2012 7:28 pm
by qaisjp
Love2D doesn't consist of one function to draw one pixel, which then you can design your own patterns (for example a for loop for rectangles) - it consists of one simple function. perspective.lua just gives you x, y, w, h and some other stuff - not a real Love3D project/framework.

It isn't very hard. You just need to make use of simple matrixes and have a frontend and backend.

I would actually help you out, but only once I am complete with my current project FULLY.

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Wed Sep 26, 2012 7:10 am
by substitute541
Perspective.lua, and PerspectiveTwo.lua are being fixed.

Re: [6 Demos] The Love3D Project (NEW PERSPECTIVE.LUA)

Posted: Wed Sep 26, 2012 7:15 am
by qaisjp
Jesus christ... subsitute541, pseudo 3D projects don't use perspective functions, they create a library to handle it for them, and then the real job is just doing this: 3D.physics.createBall(x, y, z, radius)
perspective functions are useless, and the project name is very bad if you say that its only going to consists of one perspective function.. seriously.
It's not my time being wasted, anyway.