Page 1 of 2

<3D - A simple 3d library for LOVE

Posted: Thu Mar 21, 2013 7:03 am
by MattRB

(Runs at 70fps for me on normal LOVE and 300-500 on LuaJIT LOVE)

<3D is a simple 3d library for LOVE that will enable users to make simple 3d games. It should allow a few thousand colored triangles/quads to be rendered in real time. Here's a sample of the API:

Code: Select all

Game = Object:new()

function Game:Game()
    self.mdl = Model:new(objstring)
    self.camera = Camera:new()
end

function Game:update(dt)
    self.mdl:rotate(1*dt, 1*dt, 1*dt)
end

function Game:draw()
    self.camera:draw(self.mdl)
end

love.state(Game:new())
That's using my "loove" project, but it will work without that too. How about a demo?
monkey.love
(22.38 KiB) Downloaded 243 times
https://github.com/MatthewBlanchard/Love3D

Re: <3D - A simple 3d library for LOVE

Posted: Thu Mar 21, 2013 8:39 am
by xXxMoNkEyMaNxXx
Why don't you implement my Textured polygons for all? :) I'm thinking of textured meshes...

Re: <3D - A simple 3d library for LOVE

Posted: Thu Mar 21, 2013 3:35 pm
by Ref
Ahm ... I'm thinking textured triangles before texture meshes can be used (if they are triangulated.)

Re: <3D - A simple 3d library for LOVE

Posted: Thu Mar 21, 2013 3:49 pm
by mickeyjm
xXxMoNkEyMaNxXx wrote:Why don't you implement my Textured polygons for all? :) I'm thinking of textured meshes...
Shameless plug is shameless...

Anyway: That lloks really good, if you could add some colour/lines to see different vertexes it might be clearer as to what shape it is because ATM its all 1 colour

Re: <3D - A simple 3d library for LOVE

Posted: Thu Mar 21, 2013 9:30 pm
by MattRB
mickeyjm wrote:
xXxMoNkEyMaNxXx wrote:Why don't you implement my Textured polygons for all? :) I'm thinking of textured meshes...
Shameless plug is shameless...

Anyway: That lloks really good, if you could add some colour/lines to see different vertexes it might be clearer as to what shape it is because ATM its all 1 colour
Improved demo:
<3demo.love
(5.15 KiB) Downloaded 220 times

Re: <3D - A simple 3d library for LOVE

Posted: Thu Mar 21, 2013 9:56 pm
by Ref
I think what xXxMoNkEyMaNxXx would like is something like the demo below only with a real 3D system (like yours) that can handle 3D operations (on quads rather than triangles) rather than the cobbed up one I used in the demo.
Just some chopped together code to show what could be done with textured quads (really quire limiting).
Code doesn't deal properly with a limited number of quads because of the primitive way 'z' data is handled.
Textured triangles really would be nice!

Re: <3D - A simple 3d library for LOVE

Posted: Fri Mar 22, 2013 8:37 pm
by Username
After playing a bit with your last example, i got this:

Image

Re: <3D - A simple 3d library for LOVE

Posted: Fri Mar 22, 2013 8:43 pm
by Kyle
@Username

Ref: "Soon."

Re: <3D - A simple 3d library for LOVE

Posted: Fri Mar 22, 2013 10:44 pm
by MattRB

Re: <3D - A simple 3d library for LOVE

Posted: Fri Mar 22, 2013 11:10 pm
by Ref
Username wrote:After playing a bit with your last example, i got this:

Image
Never said it was idiot proof (sorry).
Just an exampe to let you explore the limits of what you could do at this point in time with textured quads.
Could have just given you a rotating torus but that wouldn't have been any fun.