Giter Site home page Giter Site logo

love3d's Introduction

LÖVE3D

This library will be obsolete after LÖVE 0.11 is released, and will no longer be maintained (or will perhaps change just to a utility library). LÖVE 0.11 includes all the features this provided (and more!)

Extensions to the LÖVE 0.10 API for 3D rendering - depth testing, depth buffers on canvases, etc. Works on desktop OpenGL and OpenGL ES (tested on Raspberry Pi, should work for Android with some tweaking).

Two ways to use the API are provided. You can either use it as a regular module or tell it to inject itself into love.graphics using l3d.import(true). The latter is more user-friendly, but must be more carefully maintained with love versions (on our end).

While this can be used to make fully 3D games (and, in fact, we have), it's most reasonable to use it to lift art restrictions so you can make 2.5D games (or put 3D elements in otherwise 2D games). This is not intended to compete with the likes of any big 3D engine like Unreal Engine or Unity.

Depends on LÖVE 0.10 and CPML

You can load models using IQM.

Online documentation can be found here or you can generate them yourself using ldoc -c doc/config.ld -o index .

Usage

Examples can be found here: https://github.com/excessive/love3d-demos

love3d's People

Contributors

karai17 avatar shakesoda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

love3d's Issues

Examples?

Examples are mentioned in the Readme, but a link to them would be of great use.

Referencing IQM toolkits

Hi.
The IQM format isn't really widely used amongst 3D artists, so to speak. Löve is a little friendly framework and lots of beginners use it. A younger game developper can't really guess from all the dead links over the internet what's the best way to export models to the IQM format.

There are things like Noesis, that I've never heard of, or lsalzman's converter (https://github.com/lsalzman/iqm) but there's little (none ?) documentation for it and it isn't referenced anywhere. Xonotics developpers use their own IQM converter but it is hard to find and probably kind of hard to use too.

It would probably be a good idea to reference some ways to generate IQM files before less experienced Love3D users download shady stuff.

bug with drawing a canvas

i dont know if this is a bug or i'm doing something wrong, but this is what i get when i try to render the game on a canvas
untitled

i'm basically doing this:

function love.update( dt )
    canvas:renderTo( function( )
                  love.graphics.setShader( shader )
                  love.graphics.setBlendMode( "alpha" )
                  local camView = cpml.mat4( ):look_at( cpml.vec3( 0, 0, 1 * ( 180 / math.pi ) ), cpml.vec3( 0, 0,  1 ), cpml.vec3( 0, 1, 0 ) )

                  shader:send( "u_view", camView:to_vec4s( ) )

                  local w, h = gfx.getDimensions( )
                  local camProj = cpml.mat4( ):perspective( 45, w / h, 0.01, 1000 )

                  shader:send( "u_projection", camProj:to_vec4s( ) )

                  local matrix = cpml.mat4( ):translate( { x = 0, y = 0, z = 0 } )
                  shader:send( "u_model", matrix:to_vec4s( ) )
                  love.graphics.draw( image, 0, 0 )
                  love.graphics.setShader( )
       end )
end

function love.draw( )
     love.graphics.clearDepth( )
    love.graphics.draw( canvas )
end

Can't run skeleton app, didn't get a depth buffer

  1. Create project folder with love3d, cpml, bin/SDL2.dll (latest win32-x64), and minimal main.lua: require("love3d").import(true)
  2. Run LOVE 0.10.2 x64 on project folder

This bugged out on my machine (Win7 64, Intel Graphics HD 3000 with latest drivers). Even before using any love3d functions.

Error: love3d/init.lua:102: We didn't get a depth buffer, bad things will happen.
stack traceback:
[C]: in function 'assert'
love3d/init.lua:102: in function 'import'

Other SDL2 OpenGL applications run OK (e.g. ioquake3, even in the new OpenGL 2 rendering mode). So I don't think the problem is in SDL2 or my hardware.

Minor refactoring

(an issue so I don't forget what I'm doing...)

  • Automatic transforms are not particularly easier to use than doing it yourself, the state tracking is pretty unreliable so this should just be removed.
  • Some of the stubbed GL1 stuff should just be removed.
  • The monkeypatching works, but should be rethought a bit.
  • The OpenGL bindings should be cleaned out, only need a few functions.
  • A few example shaders
  • A proper demo or a few (more than what's on the forums)

Does Love 0.11 really obviate this?

From the front page:

"This library will be obsolete after LÖVE 0.11 is released, and will no longer be maintained (or will perhaps change just to a utility library). LÖVE 0.11 includes all the features this provided (and more!)"

Looking at Love 0.11 I don't see much in the way of 3d support there, just the ability to apply a transform matrix. I get that you can technically make a 3d engine in that way, uhh, minus depth buffer issues, but I'm assuming that love3d operates on gl contexts directly? No?

What is the state of this library w/r/t Love 0.11?

Thanks!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.