Jasoco's 3D Engine Thread: Go to Page 6 Please!

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Jasoco's 3D Model Extravaganza.. Does anyone like STAR F

Post by Jasoco »

Oh, you can still have it. I might do something with these one day, but here is both projects to play with. They are not zipped, just renamed folders, but you can run them or zip them yourself.
Archive.zip
3D as it is now
(21.78 KiB) Downloaded 315 times
If you use the methods, feel free to give me some credit even though I didn't do it completely myself. I got some methods off Google for displaying stuff in 3D. I just experimented and added to it to make something that works well. And Star Fox was a natural progression (As it was the whole reason I wanted to do it). Also, this guy:
Andross
Andross
55gxoi.jpeg (20.6 KiB) Viewed 3968 times
I wanted to make a game with a boss like that ever since I played the original.
User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

Re: Jasoco's 3D Model Extravaganza.. Does anyone like STAR F

Post by Luiji »

Andross=best boss ever. He's actually a little scary.
Good bye.
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Jasoco's 3D Model Extravaganza.. Does anyone like STAR F

Post by vrld »

Strange thing, implementing a 3D renderer on top of a 2D framework which is built on top of a 3D framework.
Very strange indeed, but very hackish and thus cool.

Kudos, Jasoco, kudos...
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Jasoco's 3D Model Extravaganza.. Does anyone like STAR F

Post by Jasoco »

I've put Star Fox on the shelf for now while I work more on perfecting the core 3D engine.

I've started working on it a bit today. Hopefully I'll have something worth showing again soon. I want to get moving, rotating and scaling objects in place first. I did however add rectangles (4-point polygons instead of 3) that can be used in place of triangles if you choose to which will help the framerate a bit (Since it'd be one less polygon to draw. Two if you have outlines turned on.) and you can override the predefined colors of a model if you choose.

Back to work.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Jasoco 3D

Post by Jasoco »

As posted in another thread:
3D.love
Even newer version than the one earlier tonight.
(9.71 KiB) Downloaded 360 times
It is AS IS. No warranty. Work in progress. Whatever I was working on at the time I left it last. So don't complain!
Edit: Earlier version replaced with newer version I just did. I'm getting 60FPS with 100 cubes bouncing around inside a cubical area. Polygons are now attached to their object definition. The object is what is moved and manipulated and the points and polys inherit their properties.


The only problem is in Löve, 3D calculations are slow...
Screen shot 2010-11-17 at 8.26.00 PM.jpg
Screen shot 2010-11-17 at 8.26.00 PM.jpg (70.52 KiB) Viewed 3835 times
40FPS on I think 190+ cubes. (The screenshot was taken with Hulu Desktop running fullscreen on another display) Each with 6 sides (I implemented 4-sided polygons to help cut down instead of having to always use two triangles for a square) and 8 points of their own. Which would mean over 1000 points and 1000 squares.

The more points there are and the more polygons there are, the slower it is. Also, it's not that easy to program clipping. (i.e. when a polygon intersects another and it clips the unseen stuff.)

Now, the problem with my program is that it recalculates the location of the points every frame because they're always moving. IF I were to turn off the calculations for each subsequent frame after the first, and have it use the same points every time, it wouldn't be moving, but it would be faster. With optimization, I could set it up to only recalculate objects that are moving and not unmoving ones. I fully plan on turning this into an FPS or something in the style of old-school late 80's 3D PC games.

IF Löve could do texture warping and clipping, it could do real 3D textured models.. but then again, it would be SLOOOOOOOOOOW. Löve just can't handle that large amount of looping.

See, the program needs to loop through both the points and polys tables a few times each frame. Even if I optimize it to only loop once for each, maybe I might gain some FPS but still it'll be slow. It goes through Points twice and Polys 4 times. It even has to go through the Poly table, then sort the polys by their lowest Z coordinate, then go through the Poly table again.

Future plans include marking objects as static so they don't get calculated every frame (i.e. once their points are plotted they don't need to be updated) to reduce FPS loss. Also, sprites. The old-school 3D game style with a flat image representing a 3D object. Also, not just a FPS game but maybe also a Kart style game.

Don't get too attached to this version. Just use it for reference. I want to rewrite the model loader and make models separate entities that can be moved independently and rotated and shrunk and everything.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Jasoco's 3D Engine Thread: Go to Page 6 Please!

Post by tentus »

Very impressive, I get a steady 61 FPS even when swirling everything around in every direction. Outline may be broken though.
Kurosuke needs beta testers
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Jasoco's 3D Engine Thread: Go to Page 6 Please!

Post by Jasoco »

Outline? There's two modes actually. L turns it on and off, ; switches between colored and black. But I don't like it much so I might be removing it. It gives jaggier looking polys but looks more authentic.
User avatar
arquivista
No longer with us
Posts: 266
Joined: Tue Jul 06, 2010 8:39 am
Location: Insert Geolocation tag here
Contact:

Re: Jasoco's 3D Engine Thread: Go to Page 6 Please!

Post by arquivista »

Man that is even slower than Grid engine! Ah naw just messing with you Jasoco. Things seem fine. Remember we are on Mac, as I watched in benchmark thread things must be even faster in Windows/Linux machines. But you will need this to be faster right for action purposes? I guess if as you said stop do all that intense calculations like you doing now you will manage it! :)
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Jasoco's 3D Engine Thread: Go to Page 6 Please!

Post by nevon »

Runs smoothly at 61fps, regardless of how I rotate or zoom. Looks nice.

You removed the line though, right? Because I couldn't tell any difference when pressing 'L'.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Jasoco's 3D Engine Thread: Go to Page 6 Please!

Post by thelinx »

nevon wrote:Runs smoothly at 61fps, regardless of how I rotate or zoom. Looks nice.

You removed the line though, right? Because I couldn't tell any difference when pressing 'L'.
Look at the edges. With line activated, they're smooth as a baby's bottom.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests