Page 10 of 21

Re: LÖVE3D

Posted: Sun Jul 26, 2015 5:07 pm
by shakesoda
Updates!

* Updated Love3D github repo (OVR support is there)
* Fixed some relevant CPML bugs and added mat4.hmd_perspective
* Posted the IQM loader! https://github.com/excessive/iqm - no animation loading yet as IQE has (soon), but it's something like 40x faster than the old IQE loader was.
* GLES should be fixed, as long as your shaders are compatible (the ones in the demo attached aren't, I'll fix them at some point)

I should have a camera library for this ready to post here soon, too, I'm just waiting on a pull request.

@Alexar: Here's a demo .love, be sure to run it with a Love 0.10 nightly (you can get one here if you use Windows: https://ci.appveyor.com/project/AlexSzp ... /artifacts)

Hopefully it's commented well enough, I tried to leave a lot in main.lua.

EDIT: The demo requires sRGB support. If your GPU doesn't have it, set t.window.srgb = false in conf.lua and it should run (but it will look a bit wrong).

EDIT 2: Updated attachment to fix undefined behavior in the shader
EDIT 3: Updated again to fix error on nvidia gt 330m (it's more sensitive than the 9600 gt apparently)

also, a picture for the lazy
Image

Re: LÖVE3D

Posted: Mon Jul 27, 2015 9:51 am
by FlattenedTesseract
Awesome stuff you've got there!

I have this question though:
Did you create the 3D renderer from scratch or did you magically use OpenGL through SDL?

Re: LÖVE3D

Posted: Mon Jul 27, 2015 12:48 pm
by Davidobot
Wow, this is amazing!
So LOVE 0.10.0 will support LÖVE3D out of the box? That's nice, I can't wait to mess around with this.
Side question: Who makes the 3D models? They're really neat.

Re: LÖVE3D

Posted: Mon Jul 27, 2015 1:29 pm
by shakesoda
FlattenedTesseract wrote:Did you create the 3D renderer from scratch or did you magically use OpenGL through SDL?
It's using OpenGL via FFI and SDL to load the function pointers.
Davidobot wrote:So LOVE 0.10.0 will support LÖVE3D out of the box? That's nice, I can't wait to mess around with this.
Yep! No need for custom builds anymore like when this was first posted.
Side question: Who makes the 3D models? They're really neat.
They're all my own models, other than the Miku model used in the video in the opening post (that one was from MMD). Thanks!

Re: LÖVE3D

Posted: Mon Jul 27, 2015 1:47 pm
by undef
It insta-crashes without error message on Windows.

Re: LÖVE3D

Posted: Mon Jul 27, 2015 1:54 pm
by shakesoda
undef wrote:It insta-crashes without error message on Windows.
Are you using love 0.10? it requires 0.10.

Re: LÖVE3D

Posted: Mon Jul 27, 2015 2:26 pm
by qubodup
So LOVE 0.10.0 will support LÖVE3D out of the box? That's nice, I can't wait to mess around with this.
love-hg on Arch Linux can run the demo. If you're able to compile love from mercurial (hg) repository, you can start messing around now. Instructions at https://bitbucket.org/rude/love/overview


http://youtu.be/apTzVcRtTLM

If you run this with love 9.2, you will get this error message:

Code: Select all

$ love love3d-demo_2015-07-26.love 
Error: iqm/init.lua:178: bad argument #2 to 'newMesh' (Texture expected, got FileData)
stack traceback:
	[C]: in function 'newMesh'
	iqm/init.lua:178: in function 'load'
	main.lua:38: in function 'load'
	[string "boot.lua"]:418: in function <[string "boot.lua"]:413>
	[C]: in function 'xpcall
Just for the record, love-hg + love3d does run with the following system specs:

Code: Select all

Distro        4.1.2-2-ARCH x86_64
Mainboard     FOXCONN A7GM-S 2.0
CPU           AMD Phenom(tm) 9550 Quad-Core Processor
              4 x 2200 MHz, 64-bit
RAM           7.8G
Video         Advanced Micro Devices, Inc. [AMD/ATI]
              Cape Verde PRO [Radeon HD 7750 / R7 250E]
OpenGL        4.4.13397 Core Profile Context 15.20.1013, GLSL 4.40
GCC           gcc (GCC) 5.1.0

Re: LÖVE3D

Posted: Mon Jul 27, 2015 4:06 pm
by shakesoda
If you run this with love 9.2, you will get this error message:

Code: Select all

$ love love3d-demo_2015-07-26.love 
Error: iqm/init.lua:178: bad argument #2 to 'newMesh' (Texture expected, got FileData)
stack traceback:
	[C]: in function 'newMesh'
	iqm/init.lua:178: in function 'load'
	main.lua:38: in function 'load'
	[string "boot.lua"]:418: in function <[string "boot.lua"]:413>
	[C]: in function 'xpcall
I forgot to make the demo declare itself as being for 0.10, next update will do so (so people stop reporting it as broken because they're using 0.9.2...)
Just for the record, love-hg + love3d does run with the following system specs:

Code: Select all

Video         Advanced Micro Devices, Inc. [AMD/ATI]
              Cape Verde PRO [Radeon HD 7750 / R7 250E]
OpenGL        4.4.13397 Core Profile Context 15.20.1013, GLSL 4.40
Nice, I don't have any AMD hardware to test with so it's good to know the shader works properly.

I should put together a demo or two with some actual interaction and content - latest one is, again, just a minimal tutorial. Next time I'll make sure GLES support is working, too (at least for desktops and raspberry pi, I haven't looked into it on Android & iOS, it crashes there).

Re: LÖVE3D

Posted: Tue Jul 28, 2015 2:37 am
by Alexar
hi~ thanks for your reply but here comes an error
i downloaded the 0.10 and dragged the love file to the exe. but an error occured "unable to initialize opengl, this program requires a graphics card which support opengl 2.1 or opengl es 2.
but when i print(love.graphics.getRendererInfo()) ,the resulte is "OpenGL 4.0.0 - Build 9.18.10.3220 Intel Intel(R) HD Graphics 4400"
so...how can i fix it ? thanks~
-----
i print(love.graphics.getRendererInfo()) in the version 0.92. for the 0.10 version , i can double click the love.exe, it shows the default screen. but when i drag the .love file to the love.exe. the error occured in the boot.lua..
error.png
error.png (31.89 KiB) Viewed 3991 times

Re: LÖVE3D

Posted: Tue Jul 28, 2015 4:22 am
by shakesoda
Looks like you need to upgrade your drivers, 9.xx is old.

other options (all in conf.lua) :

- try setting MSAA to 0
- if that doesn't work, try disabling sRGB (your GPU supports it, but it might be misbehaving)