The Daily Click ::. Forums ::. Klik Coding Help ::. GTA style buildings
 

Post Reply  Post Oekaki 
 

Posted By Message

nim



Registered
  17/05/2002
Points
  7233
14th April, 2011 at 11:53:43 -

This pseudo-3D effect reminds me of Red Zone on the GenesisMegadrive. Anyone remember that?

http://www.youtube.com/watch?v=NS41gxi0dTU&t=384

 
//

Alonso Martin



Registered
  29/12/2010
Points
  294
14th April, 2011 at 14:37:14 -

That game looks amazing! I never even knew it existed

 
www.hfalicia.com
www.alonsomartin.mx

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
14th April, 2011 at 14:59:53 -


Originally Posted by Chris Burrows

I'm pretty sure though GTA actually uses real 3d buildings. Not real 3d. But kinda like in Doom, raised and lowerd floors, a few angles too. Probably more like Duke 3d. But it couldn't have a 3d object floating around in the air somewhere. The cars and pedestrians were all 2d sprites. The overpasses were too from memory.



In GTA, the scenery was 3d and grid-based - composed almost entirely of cubes (plus a few slopes). Different textures could be applied to each of the 5 sides of each cube (not including the bottom).

I think your best bet for something like this, would be to find/create a pixelshader similar to the Perspective shader, but also capable of skewing the image. You could then use that for each of the 4 side walls; and another normal active for the roof.
That way, you could have very detailed, textured 3d buildings using just the 5 objects.

Edited by Sketchy

 
n/a

vetmora120



Registered
  07/01/2010
Points
  273
19th April, 2011 at 04:56:59 -

Hey Sketchy,

Thanks for the advice. Can't seem to find any pixelshaders like this around. How would I go about creating my own?

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
19th April, 2011 at 09:02:19 -

If you could make an example that would be amazing!

 
n/a

vetmora120



Registered
  07/01/2010
Points
  273
19th April, 2011 at 10:01:48 -

Actually I found a 3d shader located here in this example: http://www.mediafire.com/?bse0i0nbyuv

Still trying to figure out how to use it and apply it to a top down game like mine.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
19th April, 2011 at 12:27:55 -

Nice find! Looks like it should do the job.
I'll see what I can come up with...

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
20th April, 2011 at 10:37:15 -

I've been experimenting, and it's definitely do-able (I'll have a demo for you by tomorrow hopefully - too busy again today).

btw: Do you know who made that 3d pixel shader?
I'd like to report a bug I found (don't worry, I found a workaround, so it's not critical).

 
n/a

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
20th April, 2011 at 11:18:25 -

What was the bug?

I played around a little with it myself and I must say, damn, how cool it is!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
20th April, 2011 at 11:27:18 -

It doesn't work quite right unless you either:
* Set RGB coefficient to something other than pure white (254,255,255 works fine),
or
* Set Blend coefficient to something other than 0.

You'll be able to test it yourself when I upload the example...


 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
21st April, 2011 at 01:23:44 -

Okay, so I put together a rather shoddy and uncommented demo.
There's loads of room for improvement, including optimizing it to improve performance (eg. You only need either a left or right wall, and either a top or bottom wall, as you can never see both at the same time; plus the coding could be much better).
I may get around to finishing and commenting it eventually, but to be honest, I'm bored of it right now.

The download is here: http://cid-b1e7ee094271bbda.office.live.com/self.aspx/Public/3dBuildings01.mfa

If anyone other than Vetmora wants to take a look, you need to download and install the pixelshader that he linked to earlier in this thread.

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
21st April, 2011 at 01:32:49 -

how do you install the shader? cheers x

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
21st April, 2011 at 01:36:34 -

Just extract the contents of the zip/rar to:
.../Multimedia Fusion 2/Effects/

Image

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
21st April, 2011 at 01:48:41 -

I extracted "3d Shader.fx" and "3d shader.xml" to Multimedia Fusion Devloper 2/Effects and it still doesn't seem to work for me.
There was no Effects folder already, I had to create one?

Image

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
21st April, 2011 at 01:54:33 -

You are using the HWA version, right? It won't work in the standard build.
The fact that there wasn't already an Effects folder makes me think you probably haven't installed it yet?

Download:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=220648#Post220648

Edited by Sketchy

 
n/a
   

Post Reply



 



Advertisement

Worth A Click