The Love3D R1 Library [V 0.4.2]

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

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

Post 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...)
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

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

Post 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.
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post 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.
Attachments
perspectiveNix.love
(1.41 KiB) Downloaded 152 times
Last edited by Nixola on Mon Sep 24, 2012 9:30 pm, edited 1 time in total.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

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

Post 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.
Lua is not an acronym.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

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

Post 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...
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

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

Post 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. . .
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

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

Post by substitute541 »

New PerspectiveTwo.lua .. As before, haven't tested it yet, but it has the zSort functions. Credit to Nixola! :D .
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

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

Post 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.
Lua is not an acronym.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

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

Post by substitute541 »

Perspective.lua, and PerspectiveTwo.lua are being fixed.
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

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

Post 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.
Lua is not an acronym.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 54 guests