Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-12-2012, 10:22 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Project Mode7

'ello! I thought I'd try my hand(again) at attempting Mode7 in Graal. For those unaware, mode7 was graphical mode embedded in the hardware of the SNES that emulated 3D projection. Obvious examples would be Super Mario Kart on the SNES.

People have attempted to do this many times before in Graal, but it tends to be a taxing endeavor. There is always a lot of looping involved and on top of that having to entirely rerender the player's view.

So I've been going over in my head various methods to try to emulate Mode7 in Graal in the least intensive way possible. I thought I'd post a thread on the subject to share my progress, and possibly exchange ideas and maybe even get some others on board.

See, I'm not good at math. Any math I accomplish I pretty much wing my way through it, tweaking and messing around until I get a desirable result. So I'm probably not the most qualified person to do this, but I'm trying!

My first attempt is already underway. This attempt is being done in a sort of progressive, tweaking matter. What I did was start by rendering tiles in a standard grid view with polygons. The polygons are important because in the end I want to tweak each point of the polygon as if I were manipulating the vertices of a 3D plane. The downside is that polygons seem to be VERY expensive to Graal. Rendering even half a level's worth of polygon tiles drops my FPS down to 12. Rendering the full level(without further 3D math and other intensive calculations) drops it to a staggering 3 frames per second. Anyways, then I took this plane of tiles and I added rotation math to it. This is the first step to emulating mode7 for me.
Click image for larger version

Name:	graal_1336854421.png
Views:	1625
Size:	60.4 KB
ID:	54621

However, I don't think this will be a viable method. Rendering polygons are just too taxing. So I'm also contemplating other methods. My most promising idea is to use a drawingpanel to emulate a screen buffer. This would allow me to create mode7 using methods similar to how actual programming languages would do it. See, what I would do is use the canvas like a buffer, rendering each pixel individually. I haven't done any experimentation yet though, so I don't know how taxing this method will be. However the upside is that because I'm emulating a screen, I can lower the resolution, thus lowering the calculations needed to be done. I could actually allow users to specify their own resolutions that fit their computer.

In the end my desire is to make a flexible and more importantly, user-friendly mode7 emulation. Something that others can be able to drop directly into a level and easily manipulate the camera to do their own thing with. Everything from rendering a map to porting old game types like Mario Kart of F-Zero. The more cooperation and help, I think the better off I'll be!
Reply With Quote
  #2  
Old 05-12-2012, 10:52 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Update. Thought I'd check out the drawingpanel render times. Just to render a screen on each tick. It's abysmally slow. Even rendering a very small resolution like the SNES results in a framerate of 2.

Reply With Quote
  #3  
Old 05-13-2012, 12:12 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
Looks pretty interesting so far. Have you talked to beholder?, he had alot of great ideas to get the most out of his mode7 emulation.
Reply With Quote
  #4  
Old 05-13-2012, 01:37 AM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
There really isn't a practical way to do it in Graal. All of the native transforms that Graal uses are done in screenspace with no 3D projection whatsoever, even writing your own projection for verts results in broken interpolation of the texture you assigned to the polygon. When I did this, the only way I could get it at a reasonable speed was with showimgparts with larger parts near the bottom, and increasing the texel density as it reached further off the screen.

Unfortunately, even with precomputing all of the math that's possible to precompute into lookup tables, rendering was still the bottleneck. I don't think there is a reasonable way to accomplish this in Graal unless you do something with an external server/process in some manner. Keep in mind you can embed Flash, so I guess that's the cheap way.
Reply With Quote
  #5  
Old 05-13-2012, 01:41 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Hezzy002 View Post
Keep in mind you can embed Flash, so I guess that's the cheap way.
Flash isn't supported on v6 or on non-Windows platforms.
__________________
Reply With Quote
  #6  
Old 05-13-2012, 02:58 AM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
I just remembered Graal can display some 3D models, might only be in OpenGL mode or something, but it's worth looking into to get those transforms.

Quote:
Originally Posted by cbk1994 View Post
Flash isn't supported on v6 or on non-Windows platforms.
Good riddance.
Reply With Quote
  #7  
Old 05-13-2012, 03:01 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Hezzy002 View Post
I just remembered Graal can display some 3D models, might only be in OpenGL mode or something, but it's worth looking into to get those transforms.
It was OpenGL only with v5 at least, might've changed with v6.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 05-13-2012, 04:30 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Hezzy002 View Post
There really isn't a practical way to do it in Graal. All of the native transforms that Graal uses are done in screenspace with no 3D projection whatsoever, even writing your own projection for verts results in broken interpolation of the texture you assigned to the polygon. When I did this, the only way I could get it at a reasonable speed was with showimgparts with larger parts near the bottom, and increasing the texel density as it reached further off the screen.

Unfortunately, even with precomputing all of the math that's possible to precompute into lookup tables, rendering was still the bottleneck. I don't think there is a reasonable way to accomplish this in Graal unless you do something with an external server/process in some manner. Keep in mind you can embed Flash, so I guess that's the cheap way.
I had intended to do my own projection, yes. Each tile is a polygon, so I'm hoping by scaling each tile to its own polygon I can alleviate some of that horrible normal issues with the textures that Graal seems to have.
Reply With Quote
  #9  
Old 05-13-2012, 07:30 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Some progress, but it's just trial and error. Me tweaking numbers over and over. Fun stuff though.



I'm hoping IF I get anywhere, I can optimize it to only need to render tiles in view of the camera, and that the necessary tiles to render a proper view is low.
Reply With Quote
  #10  
Old 05-13-2012, 11:29 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Amazing :O
Reply With Quote
  #11  
Old 05-13-2012, 05:05 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Very interesting, good job!
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #12  
Old 05-13-2012, 05:08 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
That's about the furthest everyone gets. Beyond that, you require more texel samples if you want to extend the view range toward the horizon, especially with rotated views, which is what really kills performance.
Reply With Quote
  #13  
Old 05-13-2012, 05:38 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
what if you chop the tileset up so its only loading bits of the tileset you know will be used. for example is it loading all the snow/lava aswell? dont need dat!
__________________
Reply With Quote
  #14  
Old 05-14-2012, 02:29 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Crono View Post
what if you chop the tileset up so its only loading bits of the tileset you know will be used. for example is it loading all the snow/lava aswell? dont need dat!
Most likely no because pics1 is already in memory. Rendering the entirety of pics1.png onto the polygon as opposed to an individual tile yields no difference in framerate. The only thing that can help here is to 1) cut back on rendered tiles. This is to reduce the looping and calculations that take up a lot of processing power 2) clip unviewed polygons. I already added this, though it doesn't make a very noticeable difference when you're rendering an entire level. But this may help as I tweak the camera in final levels(the more I can keep out of view, the better).

Can anyone math savvy help me out with a little issue with my perspective rendering? When I apply my math I get this sort of perspective going on:



Instead of:

Reply With Quote
  #15  
Old 05-15-2012, 11:11 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Huge breakthrough : D

I had a great idea, and I was able to pull it off. Before, I was rendering each tile to a polygon. Before that, people were mimicking pixel buffers with showimg's, rendering a showimg for each tile(or multiple per tile). Either way was very slow... however I had an idea!

I first process the level(or gmap, eventually) and render it to a drawingpanel. Then I take the image and save it. Now I have an image of the level(thus in the future I can easily use this script in any desired level) that I can use to render. Instead of rendering a polygon for each tile I now can specify subsections. The higher, the better the rendering. Then I chop the prerendered image up into sections dependent on the subsection count. This allows me to keep the horrible artifacts of Graal's poor texturing to a minimum while being able to easily render the entire level without framerate loss.



As you can see, still 20fps. Chances are even the slowest computers will be able to render it this way. Now I just need to figure out the math involved and I'm almost done
Reply With Quote
  #16  
Old 05-15-2012, 11:56 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Wow. Just wow.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #17  
Old 05-15-2012, 02:17 PM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
y not just tell stefan to release the Graal 3d platform he made a while ago ?
oh wait this will be in 2020
__________________
Graal Developer
Reply With Quote
  #18  
Old 05-15-2012, 04:19 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I'm very close to getting something "playable" but I've run into a problem that I just can't seem to fix.

Here's what my rendered looked like:


Okay, but see that perspective is VERY wrong. It's especially obvious when turning as everything gets a very funnel/spiral distortion. So I want to correct this. What I need to do is make the render shrink as it nears the horizon. Sounded easily enough but I just can't seem to get it to work. I ended up with ONE result that works perfectly, visually, but with the sideeffect of... flipping the view vertically.


I desperately need to figure this out. That view is perfect, especially when you're moving. Everything is normalized great, but I just can't get the view oriented right.

Here is the portion of the script that deals with the positioning of the vertices:
PHP Code:
for (temp.p0;p<4;p++) {
  
// Rotate vertices
  
vert_px[p] = (vert_x[p] * cos(this.cam.angle)) - (vert_y[p] * sin(-this.cam.angle));
  
vert_py[p] = (vert_x[p] * sin(-this.cam.angle)) + (vert_y[p] * cos(this.cam.angle));

  
// Stretch horizontal view as it nears the camera
  
vert_px[p] *= ((vert_py[p]+(screenheight/1.5))/256);

  
// Problem line. This is what's currently rendering the distance, but also flipping the render
  
vert_py[p] *= abs(vert_py[p])/-screenheight;

  
// Orient new render to center of viewing
  
vert_px[p] += screenwidth/2;
  
vert_py[p] += screenheight;

Any help from you math guys would be awesome.
Reply With Quote
  #19  
Old 05-15-2012, 04:41 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by DustyPorViva View Post
Any help from you math guys would be awesome.
I'll see if I can get a friend to help ya on that math.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #20  
Old 05-15-2012, 04:57 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
This is mind blowing! Amazing work dusty.
Reply With Quote
  #21  
Old 05-15-2012, 04:59 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Why don't you just flip the verts along the center of the screen and then translate them down? Also, I'm not sure how you're able to increase performance with the technique you discussed, unless it enables you to render in horizontal strips? But then how would you handle rotation?

It also looks like you have the same problem that everyone else has; if you were to change the viewing angle/view distance to properly look like a SNES racer's horizon, you'll find either horrific artifacts or if you increase the resolution to remedy that, really poor performance.
Reply With Quote
  #22  
Old 05-15-2012, 05:28 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Hezzy002 View Post
Why don't you just flip the verts along the center of the screen and then translate them down? Also, I'm not sure how you're able to increase performance with the technique you discussed, unless it enables you to render in horizontal strips? But then how would you handle rotation?

It also looks like you have the same problem that everyone else has; if you were to change the viewing angle/view distance to properly look like a SNES racer's horizon, you'll find either horrific artifacts or if you increase the resolution to remedy that, really poor performance.
I sorted out the distance issue, and here it is running at 20fps(a few frames lost while recording):

But I have yet to try it in a real "racing" level and I need to add gmap support before I can start tweaking FOV and how far to render out. A single level actually is pretty damn small for mode7.

As for how I'm accomplishing it, imagine I'm taking the level, rendering a flat image of it and slapping it on a single polygon. Now imagine I'm slicing that polygon up into multiple segments. Not visually, but mechanically. It's the same technique I was using from the start except now instead of grabbing level data in realtime I'm working off of a prerendered image of the level generated from the start. Then instead of one polygon per tile, I can render as many polygons as I desire, and just cropping the image into parts. I can lower or raise the quality of the plane with a single variable, so I suppose for those with more powerful machines they could crank even better quality. In the video I rendered I was processing 20x20 segments in the plane. Lowering it more and more 'causes all those seam issues with texture normals that Graal is so well known for. The segments help alleviate that issue.

Quote:
Originally Posted by Fulg0reSama View Post
I'll see if I can get a friend to help ya on that math.
That'd be cool. I got it figured out, but as you can see in the video I'm still having the same issue with the sort of barrel effect. I don't like it and would love to have the plane render straighter.

Last edited by DustyPorViva; 05-15-2012 at 05:41 PM..
Reply With Quote
  #23  
Old 05-15-2012, 06:06 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
hah that's awesome dusty, graal kart inc.
__________________
Reply With Quote
  #24  
Old 05-15-2012, 06:07 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
x' = x*h/z; h generally of your choosing.

hth

e:
x = orthogonal horizontal coordinate
x' = projected horizontal coordinate
h = "camera height"
z = distance along the axis that comes through your screen
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/

Last edited by Tolnaftate2004; 05-15-2012 at 06:11 PM.. Reason: i kan speel gud
Reply With Quote
  #25  
Old 05-15-2012, 09:23 PM
James James is offline
LOCAL DOUCHEBAG
James's Avatar
Join Date: Aug 2001
Location: Oregon
Posts: 3,132
James is a splendid one to beholdJames is a splendid one to beholdJames is a splendid one to beholdJames is a splendid one to behold
Send a message via AIM to James
nice work as always dusty
__________________

JAMES BAY PACKERS
2011 FANTASY FOOTBALL CHAMPIONS
2012 FANTASY FOOTBALL CHAMPIONS


“If I can slow it down in my mind... things will be fine."

-Aaron Rodgers
2011's NFL Most Valuable Player




Reply With Quote
  #26  
Old 05-16-2012, 12:51 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well I feel I'm crippling the potential of this by doing it on my own. I'm not that great at math and I have absolutely no experience with 3D projection. This is my first attempt and I don't feel like I'll be able to accomplish my end goals.

So if anyone familiar with 3D projection wants to hop aboard and collaborate, I would absolutely love it. My goals are to:

1) have a fully customizable camera with roll, pitch, height so users can easily adjust the view.
2) Make the 2D to 3D transition smooth and hassle-free. Ideally I'd love to see a command that takes any position in the 2D world(in this case a level or gmap) and return the values needed to render it to the screen in a 3D space.

The two above combinations would make it insanely easy to share this functionality with others, and I'd love to have this sort of thing easily available to other developers to play with.

If someone with the math skills can help me out here and pull this together into a proper mode7 effect(instead of a hacked together version) then I'd be truly grateful. The functionality and backbone is already there, I just need the 2D -> 3D projection and camera smoothed out. I know there are at least a few scripters floating around with the experience to do this.
Reply With Quote
  #27  
Old 05-16-2012, 01:49 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Also, future mockup!


This sort of effect would be insanely easy to pull off. Basically I'd take water(in this case from pics1) and give it a semi-transparent fill(like 80% opaque or so). Then I'd take the sky/npcs/players and duplicate them under the horizon, vertically flipped and render them under mode7. Very, very easy to do and I can't wait to get to it. I want to do an entire water course with this. This effect, with some nice parallax sky scrolling... suhweet.

Also, sky was just ripped from New Super Mario Bros for mockup purposes and the noob in a kart was pulled from someone elses attempt at mode7 in Graal(I think obviously edited from Super Mario Kart).
Reply With Quote
  #28  
Old 05-16-2012, 02:39 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Now that would be pretty great to see. Mario kart style.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #29  
Old 05-16-2012, 02:42 AM
Unkownsoldier Unkownsoldier is offline
Ignorance has no future
Join Date: Sep 2008
Posts: 1,287
Unkownsoldier is on a distinguished road
That would be great, and you would do other things other than just Graal Kart right? It could have some great possibilities if you get it working properly.
__________________
Look beyond the monitor.
Reply With Quote
  #30  
Old 05-16-2012, 02:53 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by Unkownsoldier View Post
That would be great, and you would do other things other than just Graal Kart right? It could have some great possibilities if you get it working properly.
Yeah, you could also venture into a whole different perspective based experience for Graal in general lol.

Graal Nukem Online, anyone?
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #31  
Old 05-16-2012, 03:11 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Unkownsoldier View Post
That would be great, and you would do other things other than just Graal Kart right? It could have some great possibilities if you get it working properly.
Me? Probably not. I intend to do a little kart-game with it but that's it. But I will release the script(hence the need for it to be user-friendly) and what others do with it is up to them. You could use it for old RPG-style overworlds. Use it to create LttP-style map interfaces. But mimicking Duke Nukem? That's an entirely different type of 3d casting, as that would be raycasting instead of floorcasting.
Reply With Quote
  #32  
Old 05-16-2012, 03:26 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by DustyPorViva View Post
Me? Probably not. I intend to do a little kart-game with it but that's it. But I will release the script(hence the need for it to be user-friendly) and what others do with it is up to them. You could use it for old RPG-style overworlds. Use it to create LttP-style map interfaces. But mimicking Duke Nukem? That's an entirely different type of 3d casting, as that would be raycasting instead of floorcasting.
Yeah, I was off with the duke nukem bit, but you could very easily make an interesting kind of survivor shooter regardless with enough planning.

Also could make one of those dodger games (like skiing and avoiding the trees)
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #33  
Old 05-16-2012, 03:47 AM
Hiro Hiro is offline
\(^∀^)メ(≧∇≦)ノ
Hiro's Avatar
Join Date: Jan 2005
Posts: 1,965
Hiro has a spectacular aura aboutHiro has a spectacular aura about
Send a message via AIM to Hiro
Almost like Graal3D, right? Right?


Right... ;_;
Reply With Quote
  #34  
Old 05-16-2012, 04:59 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
PFA(Tolnaftate2004 up there) is taking a stab at the maths now. I trust his skills so I can't wait! In the mean time I will be having at the graphical side, doing some graphics, working no the parallax scrolling and such.
Reply With Quote
  #35  
Old 05-16-2012, 07:56 AM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
I don't know who would know, but have you asked Thor or Fowl?
I feel like you are trying to seek for help through this thread,
not sure if you've advertised elsewhere, and everyone is
commenting with spam / not providing useful information
like myself.

I'd like to use this, only walking, in one quest. Mini quest...

I'm not sure who is good at math though, I've gotten only to trig and that was it.. I just tweak with things until they work also. :/

Even when I do find out equations that work, 1-2 weeks later I've forgotten what I've done and the whole thing confuses me, like my pet system. >.>;

I've love to help though. D:


I know ZeroG made a 3D Cube on Graal... doubt that helps though..
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #36  
Old 05-16-2012, 08:14 AM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Duke Nukem doesn't use ray casting, it's just polygons being traced out through a BSP tree and rasterized with a software rasterizer. You can't pull something of that calibur out of Graal, but you can do something like Wolf3D with floor casting if you use ray casting and this floor casting method in tandem.
Reply With Quote
  #37  
Old 05-16-2012, 03:44 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Quote:
Originally Posted by Devil_Lord2 View Post
or Fowl?
Let it forever be known that mentally challenged Crono's math is better than FP4's.
__________________
Reply With Quote
  #38  
Old 05-16-2012, 05:32 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Devil_Lord2 View Post
I don't know who would know, but have you asked Thor or Fowl?
Quote:
Originally Posted by Crono View Post
Let it forever be known that mentally challenged Crono's math is better than FP4's.
No good asking me either it's WhiteDragon's job to do the mathematical thinking.
Reply With Quote
  #39  
Old 05-17-2012, 07:34 AM
linkrulz4 linkrulz4 is offline
A decade of fun~ 'w'
linkrulz4's Avatar
Join Date: Sep 2002
Location: erectin a dispenser
Posts: 25
linkrulz4 is on a distinguished road
Send a message via AIM to linkrulz4
This mode.
It has a flavor.
Attached Thumbnails
Click image for larger version

Name:	seeintoforever.jpg
Views:	303
Size:	825.9 KB
ID:	54636  
__________________
sanvich?
Reply With Quote
  #40  
Old 05-17-2012, 07:50 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
PFA went ahead and completely rescripted it into a PROPER 3D projection mode... and it is awesome

I'm still tweaking what he has, but so far it looks great! Ignore the temporary Mario graphics(sky)

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.