3D Polygon Rendering Engine!

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: 3D Polygon Rendering Engine!

Post by Inny »

Very neat.

Incidentally, I view the recent interests with 3d as a kind of a code golf. I don't think we'll actually see many games made from these experiments. Nor do I feel like many games should be made from them. Love2d's target tech level appears to be between the SNES/Genesis/TG16 era and the 32X/Saturn/Jaguar era (that one before PS1 and N64 that few were part of). So, if I had to point to existing art that probably represents as far as Love2d's "3d" abilities could go or should go, Arcana or Tempest 2000 would be what I think make good targets.
scutheotaku
Party member
Posts: 235
Joined: Sat Dec 15, 2012 6:54 am

Re: 3D Polygon Rendering Engine!

Post by scutheotaku »

Looks very nice!

What types of framerate do you get with much lower poly models? Say 100 to 200 tris?
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: 3D Polygon Rendering Engine!

Post by Jasoco »

Roland_Yonaba wrote:
Jasoco wrote:Competition. Doesn't scare me.
Well, you should. :awesome:
Cause actually, I don't know what's going on, but it seems lots of people are diving into simulating 3D. Or 2.5D.
That's why competition doesn't scare me. I'm glad more people are interested in 3D. We should all be helping each other make our individual projects better.

The only problem I see with this one is the framerate. You can tell how Löve wasn't built for 3D because there's no accelleration so handling many many triangles at once is really really slow. Hence why earlier 3D games had such low polygon counts.
scutheotaku wrote:Looks very nice!

What types of framerate do you get with much lower poly models? Say 100 to 200 tris?
Löve can handle hundreds.. no tens of thousands of triangles since they're just draw calls. It's no big deal. It's just that this project has so many triangles at once. If you cut down significantly and stylize it but use simpler models you can make it work much better. That and all the math calculations being done on every single point of every single triangle every single frame.

You might be able to optimize it a little, but in the end it comes down to Löve's ability to loop through and draw the thousands of triangles every frame without hiccuping. Sadly this isn't Java.
User avatar
slime
Solid Snayke
Posts: 3157
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 3D Polygon Rendering Engine!

Post by slime »

Jasoco wrote:Sadly this isn't Java.
I doubt Java would help much, especially if you're using LuaJIT. The largest problem is likely that you transform and send every single triangle on every individual model from the CPU to the GPU... separately... every frame! The OpenGL API has been forcibly pushing people away from doing things like that for over a decade, for good reason. ;)

See the text rendering performance improvements that are making it into 0.8.1 for a concrete example of this - although in the case of text rendering, the 'slow' 0.8.0 implementation is still more efficient than sending each individual triangle or quad to the GPU separately every frame.

The overhead from Lua as well as the overhead of going between the Lua/C barrier very often also plays a role, but I'm not so sure it's the largest factor in performance in this case - it often isn't.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: 3D Polygon Rendering Engine!

Post by Jasoco »

I don't know how Minecraft does it, but Java is very fast at displaying many many images at once even after calculating their 3D locations on the 2D screen.

Unfortunately it's also Java. And I'm no Notch. Or Jeb. Or DinnerBone.
User avatar
slime
Solid Snayke
Posts: 3157
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 3D Polygon Rendering Engine!

Post by slime »

Jasoco wrote:I don't know how Minecraft does it, but Java is very fast at displaying many many images at once even after calculating their 3D locations on the 2D screen.

Unfortunately it's also Java. And I'm no Notch. Or Jeb. Or DinnerBone.
Well, as I was trying to say, rendering a 3D scene via LÖVE is very slow because LÖVE doesn't provide an API to utilize hardware 3D rendering support to its full potential. It has little to do with the language used.
Personally, I don't believe it would be a good idea for LÖVE to provide such an API. When you get into the realm of 3D, the complexity of everything rises exponentially. Best not to be the jack of all trades and master of none.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: 3D Polygon Rendering Engine!

Post by Jasoco »

I tend to disagree. Proper 3D access can help even 2D games be better. People don't have to use the 3D stuff if they don't want to. They don't even need to know it's there. GPU acceleration isn't just for 3D. It can be very useful for 2D too.
User avatar
slime
Solid Snayke
Posts: 3157
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 3D Polygon Rendering Engine!

Post by slime »

Jasoco wrote:GPU acceleration isn't just for 3D. It can be very useful for 2D too.
Which is why LÖVE has used GPU accelerated rendering since its inception. ;)

Note that there is a difference between providing an API for using 3D models in a hardware depth buffered perspective projected 3D display, and using hardware accelerated rendering under the hood for 2D images and primitives.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: 3D Polygon Rendering Engine!

Post by Jasoco »

Hey, I'd be happy if we could skew quads perspectively instead of just orthogonally. I don't even need the 3D access. Just let me warp a quad or image so it looks 3D and I'll be happy.

*Or just figure out a way to fake it. Maybe with PixelEffects or something?
User avatar
slime
Solid Snayke
Posts: 3157
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 3D Polygon Rendering Engine!

Post by slime »

Jasoco wrote:Hey, I'd be happy if we could skew quads perspectively instead of just orthogonally. I don't even need the 3D access. Just let me warp a quad or image so it looks 3D and I'll be happy.

*Or just figure out a way to fake it. Maybe with PixelEffects or something?
You might not have to wait many more years.
XvjS1.png
XvjS1.png (330.73 KiB) Viewed 452 times
I definitely encourage you to use something like Unity3D if you really are interested in making a 3D game though. A few non-rectangular quads drawn with textures are a far cry from a full-fledged game, to put it mildly.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests