perspective drawer

Post your own tutorials, guides and demos.

Post » Fri Oct 10, 2008 7:34 pm

all this does is draw boxes in 3D!!!!, yea really i wasted my time making this lol. well its not done yet, i plan on adding raytraced lighting and z buffering so its actually usefull, i even plan on making more primitives like triangular prisms and cylinders ,stuff like that.

it basically works by using 2 point perspective and alot some linear beziers ect ect.

download and tell me what you think

i dont know if im going to use it or not, it might be cool to make a game using this, when the lightings implemented

move the canvas at the top down to see wireframe
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Oct 11, 2008 2:21 am

:O Thats pretty awesome! Sadly if you add textures to those shapes the texture becomes slightly distorted (as opposed to 3d box) because the distortion doesn't allow for texture z distortion. Its on my todo list to look into texture z manipulation because it would be nice if you could distort each corner of a sprite and it mapped the texture in such a way that it looked 3d. But anyways good job! I think I allowed distortion to adjust the filter of each vertex so you could do some kind of vertex lighting if you wanted :)
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sat Oct 11, 2008 6:04 am

That's slick :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Oct 11, 2008 7:32 am

Very nice. Looks promising.


[quote="David":25hcx42b]Sadly if you add textures to those shapes the texture becomes slightly distorted (as opposed to 3d box) because the distortion doesn't allow for texture z distortion. Its on my todo list to look into texture z manipulation because it would be nice if you could distort each corner of a sprite and it mapped the texture in such a way that it looked 3d. [/quote:25hcx42b]I've found that you can correct the texture distortion by having a map size of at least 2x2 (the larger your map size the more correct the texture becomes) and interpolating your X, Y, Z values between points (or just X,Y; I've been emulating my Z value).

I'm probably not explaining myself very well (I have a habit of doing that). Here is an .exe to show my results however.

http://www.fileshack.us/get_file.php?id ... ection.zip

Controls:
1 = Decrease map size
2 = Increase map size
Movement:
- W,A,S,D
- Up, Down, Left, Right
- Ctrl, Space

Note: The transparency is because it is still very much a work in progress, and as a result lacks a Z Buffer.
B
2
S
2
G
5
Posts: 108
Reputation: 1,866

Post » Sat Oct 11, 2008 12:38 pm

Ummm that broke my brain just glancing at the events. I'm not even going to pretend I know how that works. Nice job though mate. You guys make me feel super dumb when I look at this kind of stuff.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Sat Oct 11, 2008 2:07 pm

Nice! Seems everyone's in for 3D drawing these days :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Thu Nov 20, 2008 9:30 pm

[quote="Glamthaus":3qbn9of0][size=85:3qbn9of0]Very nice. Looks promising.


[quote="David":3qbn9of0]Sadly if you add textures to those shapes the texture becomes slightly distorted (as opposed to 3d box) because the distortion doesn't allow for texture z distortion. Its on my todo list to look into texture z manipulation because it would be nice if you could distort each corner of a sprite and it mapped the texture in such a way that it looked 3d. [/quote:3qbn9of0]I've found that you can correct the texture distortion by having a map size of at least 2x2 (the larger your map size the more correct the texture becomes) and interpolating your X, Y, Z values between points (or just X,Y; I've been emulating my Z value).

I'm probably not explaining myself very well (I have a habit of doing that). Here is an .exe to show my results however.

http://www.fileshack.us/get_file.php?id ... ection.zip

Controls:
1 = Decrease map size
2 = Increase map size
Movement:
- W,A,S,D
- Up, Down, Left, Right
- Ctrl, Space

Note: The transparency is because it is still very much a work in progress, and as a result lacks a Z Buffer.[/size:3qbn9of0][/quote:3qbn9of0]
Link is down.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Thu Nov 20, 2008 10:44 pm

man this thing was hell to program, i forgot about it lol
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests