[STJFPOST]Love3D

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: [STJFPOST]Love3D

Post by Nixola »

coffee wrote:
Nixola wrote:I don't know, Jasoco's the expert here
I would say Jasoco's is the expert in 2.5d and fake 3d. Retrotails have also some touchable work in that domain. Patalo It's perhaps more connoisseur of a more really oriented 3D field.
I was answering to tv_user ;)


tv_user wrote:oh, you mean 2.5D?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: [STJFPOST]Love3D

Post by coffee »

Nixola wrote:
coffee wrote:
Nixola wrote:I don't know, Jasoco's the expert here
I would say Jasoco's is the expert in 2.5d and fake 3d. Retrotails have also some touchable work in that domain. Patalo It's perhaps more connoisseur of a more really oriented 3D field.
I was answering to tv_user ;)
tv_user wrote:oh, you mean 2.5D?
Yeah, sorry. I was also relating a bit about topic's title, previous discussion and the difficulty to clearly define a bit where are 2d/2.5/3d frontiers in LOVE.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: [STJFPOST]Love3D

Post by Robin »

I keep reading the beginning of the title of this thread as "STFU"...
Help us help you: attach a .love.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: [STJFPOST]Love3D

Post by Jasoco »

Distorting an image would be the least 3D thing I would want. And not just for doing 3D. It can be used for 2D effects too. We just need it.

Real 3D would require actual 3D calls complete with access to 3D OpenGL features like polygon clipping and sorting.

I've done a couple "3D" demos in my day. The first being simple polygons and a Star Fox tech demo, the other a Wolfenstein-style raycasting project I will definitely get back to at some point if I ever get tired of Minecraft and am able to concentrate. I've been screwing around with 3D since my QBASIC days.

The 3D polygon stuff is simple in that you just need to take points in 3D space, run them through a few math functions to figure out where in 2D space they should be based on the camera position and objects rotation and then draw triangles using those new 2D-ized points. I believe it's how 3D was done before the advent of 3D graphics cards and drivers. Triangles are sorted by their distance from the camera in the middle of the 2D flattening process. But without clipping, you sometimes get overlapping that just looks ugly. This is best used for simple uncrowded 3D. If image distortion existed in Löve, the polygons could be textured. The hard part is optimizing it so you don't destroy your framerate. For instance, precalculate whatever you can so you don't have to recalculate it during runtime, and only recalculate when needed.

The Wolfenstein stuff is completely different. 3D is an illusion formed by scaling images based on their calculated distance from the "camera". Their X location being based on what "ray" they are located at. i.e. the engine sends out rays across your vision to find out how far away the wall is, then figures out how far along a wall segment that is, then displays the proper wall tile slice at the proper X location at the proper scale based on the distance of the segment of wall. Everybody got that? Good. The rest is pretty simple. But the rest besides that rest is a bit more difficult.

I also modified my Wolf engine to make a Mario Kart style engine which works pretty well, but never could get the physics or AI to work.

Either way, neither is really 3D. Just some fancy complicated math and shape/image drawing.

I'll just say that if you really want to do real 3D, believe it not, HTML5 is very good at doing 3D now. If you want to learn JavaScript and WebGL. But really, I don't want to learn that if I don't have to and it'd be neat if Löve could do some of that stuff out of the box.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

Re: [STJFPOST]Love3D

Post by substitute541 »

Jasoco wrote:Distorting an image would be the least 3D thing I would want. And not just for doing 3D. It can be used for 2D effects too. We just need it.

Real 3D would require actual 3D calls complete with access to 3D OpenGL features like polygon clipping and sorting.

I've done a couple "3D" demos in my day. The first being simple polygons and a Star Fox tech demo, the other a Wolfenstein-style raycasting project I will definitely get back to at some point if I ever get tired of Minecraft and am able to concentrate. I've been screwing around with 3D since my QBASIC days.

The 3D polygon stuff is simple in that you just need to take points in 3D space, run them through a few math functions to figure out where in 2D space they should be based on the camera position and objects rotation and then draw triangles using those new 2D-ized points. I believe it's how 3D was done before the advent of 3D graphics cards and drivers. Triangles are sorted by their distance from the camera in the middle of the 2D flattening process. But without clipping, you sometimes get overlapping that just looks ugly. This is best used for simple uncrowded 3D. If image distortion existed in Löve, the polygons could be textured. The hard part is optimizing it so you don't destroy your framerate. For instance, precalculate whatever you can so you don't have to recalculate it during runtime, and only recalculate when needed.

The Wolfenstein stuff is completely different. 3D is an illusion formed by scaling images based on their calculated distance from the "camera". Their X location being based on what "ray" they are located at. i.e. the engine sends out rays across your vision to find out how far away the wall is, then figures out how far along a wall segment that is, then displays the proper wall tile slice at the proper X location at the proper scale based on the distance of the segment of wall. Everybody got that? Good. The rest is pretty simple. But the rest besides that rest is a bit more difficult.

I also modified my Wolf engine to make a Mario Kart style engine which works pretty well, but never could get the physics or AI to work.

Either way, neither is really 3D. Just some fancy complicated math and shape/image drawing.

I'll just say that if you really want to do real 3D, believe it not, HTML5 is very good at doing 3D now. If you want to learn JavaScript and WebGL. But really, I don't want to learn that if I don't have to and it'd be neat if Löve could do some of that stuff out of the box.
Err.
It's called the "illusion" of 3D.
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: [STJFPOST]Love3D

Post by Jasoco »

That's what I said! I just typed lots and lots of words because I like to do that. Lots and lots of words. It's a stream of consciousness. Words words words.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: [STJFPOST]Love3D

Post by Inny »

Semantics. Be it raycasting, polygon matrix transformation, raytracing, or what have you, it all gets mapped onto a 2d surface. Maybe it'll be a stereoscopic image that filtered lenses on the viewer will break down into a 3d-looking image, but supposedly like 10% of the population is stereo-blind (either by eye injuries or other depth perception medical issues) so the effect would be lost as Johnny Depp outside of a Tim Burton film.

As I was saying before, I'd love to see stuff like Raycasting, or SNES style Mode7 become a possibility. That's more accessible and probably a possible way forward for Love.
serge1peshcoff
Prole
Posts: 6
Joined: Mon Sep 03, 2012 12:34 pm

Re: [STJFPOST]Love3D

Post by serge1peshcoff »

I don't like 3D much. It is a bit complicated and lot more harder to learn then 2D.
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: [STJFPOST]Love3D

Post by GijsB »

Jasoco wrote:Distorting an image would be the least 3D thing I would want. And not just for doing 3D. It can be used for 2D effects too. We just need it.

Real 3D would require actual 3D calls complete with access to 3D OpenGL features like polygon clipping and sorting....
http://www.youtube.com/watch?v=Ccoj5lhLmSQ
And yay ^^ another person with a minecraft addiction xD

(sorry for the off topic'ness)
Last edited by GijsB on Sat Sep 22, 2012 12:01 pm, edited 1 time in total.
User avatar
tv_user
Citizen
Posts: 57
Joined: Sun Aug 12, 2012 4:39 pm
Location: Portugal

Re: [STJFPOST]Love3D

Post by tv_user »

IndieLib has some pseudo-3D features - it enables image distortion like this: you define a grid (with any 2^n number of vertexes) for an image. then you change those vertexes position thereby distorting the image. Its cool, but not essential, imo
Did my comment help/offended you? Use the Karma button!!
LÖVEing each day...
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests