This is where the fine line between actual graphics and haxy 2d 3d graphics comes in again. Because the way it's done in actual graphics is that each vertex of an object is transformed all nice and well, and then it goes through the faces and looks up the already transformed vertices. This means that for a cube, you transform 8 points and not something like 4*6=24 or 2*3*6=36. But what I have found is that the overhead of storing stuff in tables and such actually eliminates the speed you gain. By doing it like this, it will still be a bit faster, but it's more work to code, and becomes quite a lot slower when you do stuff like individual triangles (not part of a mesh or anything).
That z-sorting issue doesn't really go away until you implement something like a depth buffer (which I still haven't found a way to do). BUT, you can at least eliminate it for all convex models (for example a cube). By just culling back faces, you effectively take away any sort of artifacts (not your definition of artifact =P) that an object may create with itself, while essentially doubling your speed with barely any difference to the final result.
Oysi's 3D Rendering & Physics Engine
Re: Oysi's 3D Rendering & Physics Engine
Follow the potato. Achieve enlightenment.
Re: Oysi's 3D Rendering & Physics Engine
I got something very interesting in this video, which doesn't really have too much to do with 3D, but it's still in 3D, so hey, why not. =P
As you can see, loading the video took roughly 5 seconds, and it's a 16 second video. So theoretically, I could put the loading into a separate thread and sort of stream the video bit by bit, which would essentially make it completely dynamic. =D
As you can see, loading the video took roughly 5 seconds, and it's a 16 second video. So theoretically, I could put the loading into a separate thread and sort of stream the video bit by bit, which would essentially make it completely dynamic. =D
Follow the potato. Achieve enlightenment.
- Sheepolution
- Party member
- Posts: 264
- Joined: Mon Mar 04, 2013 9:31 am
- Location: The Netherlands
- Contact:
Re: Oysi's 3D Rendering & Physics Engine
I didn't even know you could put videos in LÖVE.
It's basically a 2D video of a 2D video of a 3D world in a 3D world made in a 2D framework.
It's basically a 2D video of a 2D video of a 3D world in a 3D world made in a 2D framework.
Re: Oysi's 3D Rendering & Physics Engine
when I saw it at first I was like no way this is löve, I don't have words worthy of describing this.
you are doing stuff I thought was impossible to do with this engine, you did the impossible.
you are doing stuff I thought was impossible to do with this engine, you did the impossible.
- substitute541
- Party member
- Posts: 484
- Joined: Fri Aug 24, 2012 9:04 am
- Location: Southern Leyte, Visayas, Philippines
- Contact:
Re: Oysi's 3D Rendering & Physics Engine
My brain hurts.Sheepolution wrote:I didn't even know you could put videos in LÖVE.
It's basically a 2D video of a 2D video of a 3D world in a 3D world made in a 2D framework.
Currently designing themes for WordPress.
Sometimes lurks around the forum.
Sometimes lurks around the forum.
- ArchAngel075
- Party member
- Posts: 319
- Joined: Mon Jun 24, 2013 5:16 am
Re: Oysi's 3D Rendering & Physics Engine
Why doesn't Oysi get hired by slime and the Love2D creators i don't know. He is head developer of cool things that make love more than love (lust ?!?!?!)
Im too tired for this...
Im too tired for this...
Re: Oysi's 3D Rendering & Physics Engine
Haha, thanks folks. Much appreciated! =D
And I have a new update. Mesh physics! Which really it has been capable of for quite some time, but I just haven't made a video of it. Actually, the video is a few weeks old as well, so... Yeah. Anyway, here it is, using the lovely teapot. =)
And I have a new update. Mesh physics! Which really it has been capable of for quite some time, but I just haven't made a video of it. Actually, the video is a few weeks old as well, so... Yeah. Anyway, here it is, using the lovely teapot. =)
Follow the potato. Achieve enlightenment.
Re: Oysi's 3D Rendering & Physics Engine
my mind is blow, this is amazing
Re: Oysi's 3D Rendering & Physics Engine
oysi is a bot ok
Re: Oysi's 3D Rendering & Physics Engine
A little non-video update: I've optimized my thing quite a lot. I tested the garbage that my thing was outputting, and the result was quite crazy. It was spitting out like 10 mb per sec for a scene of around 10k triangles. I was creating tables and then ditching them, every frame. Which makes for some easy coding, but not very ideal in terms of memory, even for Lua with fully automatic garbage collection. So I did some testing, re created my engine in a very simple way to do some simple benchmarking without all the shader stuff and normal stuff and texture and bla bla...
Went from that inconsistent spiky piece of madness, to this smooth piece of awesomeness:
You can also notice that the actual memory used is a whole lot less. The only garbage from that second pic is really all from the love.run function, which is only around 1 kb per sec, which is essentially nothing. I could literally just disable the garbage collector and run the program for ages without any problems (as opposed to previously, where it would quickly get to 2 GB and then crash xD (when I disabled the gc, that is)).
On top of that, I changed the core parts of my engine a bit, to put more emphasis on reference. So instead of creating objects everywhere, just create them at first, send them in by reference and change accordingly. Which gave me a pretty huge fps boost as well (although for some reason it syncs to 30 fps). I was able to render 100k polygons at 10 fps:
That's 100 teapots (rendering all faces). And it's also completely dynamic. I could move them around and rotate and scale and whatever, which would add some time to the processing, but not much. I should note though, that this is without depth sorting and coloring. When I added those, the fps went from 10 to 3. But it's still a whole lot faster than what I had previously.
Went from that inconsistent spiky piece of madness, to this smooth piece of awesomeness:
You can also notice that the actual memory used is a whole lot less. The only garbage from that second pic is really all from the love.run function, which is only around 1 kb per sec, which is essentially nothing. I could literally just disable the garbage collector and run the program for ages without any problems (as opposed to previously, where it would quickly get to 2 GB and then crash xD (when I disabled the gc, that is)).
On top of that, I changed the core parts of my engine a bit, to put more emphasis on reference. So instead of creating objects everywhere, just create them at first, send them in by reference and change accordingly. Which gave me a pretty huge fps boost as well (although for some reason it syncs to 30 fps). I was able to render 100k polygons at 10 fps:
That's 100 teapots (rendering all faces). And it's also completely dynamic. I could move them around and rotate and scale and whatever, which would add some time to the processing, but not much. I should note though, that this is without depth sorting and coloring. When I added those, the fps went from 10 to 3. But it's still a whole lot faster than what I had previously.
Follow the potato. Achieve enlightenment.
Who is online
Users browsing this forum: No registered users and 7 guests