Game Development Community

Marble blast -like shading

by Ari J · in Torque Game Engine · 03/24/2005 (12:29 pm) · 29 replies

I really like the cartoony, bright graphics of marble blast, and i was wandering if there was anyone here that knew how i could accomplish this (I am a total newbie when it comes to tinkering with the graphics engine itself.)

Or maybe if someone had previously posted it as a resource, or forum, it would be helpful if someone pointed that out, but i have searched these forums again and again and i find nothing =/

Thanks in advance,

Ari J.
IceSea Entertainment
Page «Previous 1 2
#1
03/24/2005 (12:40 pm)
As best I know... there were no special rendering tricks used for the PC version of MarbleBlast. THe bright cartoon-like graphic textures were simpley made in a graphics editor.
#2
03/24/2005 (12:44 pm)
I was actually asking more about the shading technique, simpler shadows and brighter environments than in the standard torque.
#3
03/24/2005 (1:24 pm)
Actually Marble Blast implemented gourad shading specificaly to get that brighter crisper feel for the game.
#4
03/24/2005 (1:50 pm)
Really?

How can i do the same, to make my game as spiffy looking as Marble Blast?

Thanks,

Ari J.
#5
03/24/2005 (2:52 pm)
Gourad shading has been around for quite some time and theres probably 32,000 different articles on the web about how to implement it :) Do some searches.
#6
03/25/2005 (1:31 am)
I will, thanks :)
#7
03/25/2005 (2:13 am)
So, i got my nifty little Gourad code, that is supposed to work.

But what file do i implement it into?
#8
03/25/2005 (8:30 am)
Erh, using gouraud shading with textures is completely counterproductive : gouraud is vertex interpolation to find the particular color of a pixel to "shade" a poly's face, this being triangles in OGL.
Textures, by nature give you more information, even though it's rarely a one on one ratio between texel and the pixel on screen.

OpenGL uses gouraud shading when you use vertex coloring instead of texturing. There is nothing to do or implement to have gouraud shading on untextured polies in OpenGL, except using it :)
Marble Blast uses textures, so I'm not sure what John means when he says they implemented gouraud shading for Marble Blast.

As far as I know, the PC/Mac version of Marble Blast simply uses highly saturated textures. It's an artistic direction accomplishment, not so much technical.
If I'm wrong, Mark or Alex should pipe up, since they worked on the game :)
#9
03/25/2005 (9:09 am)
Well, I have tried making really bright textures, still it does not give the crisp, cartoony look I want, and even if that worked, that still leaves the problem of smooth shadows.
#10
03/25/2005 (9:13 am)
Quote:
Rendering changes:

*

Gourad shading:

We implemented gourad shading on our level geometry. Torque previously supported flat vertex shading, but we wanted full gourad support for Marble Blast. We thought that this shading model would provide the brighter, more detailed look we were after. Our gourad implementation analyzed level geometry during mission load, and averaged nearby vertex normals, yielding exactly the look we wanted.
*

Stencil shadows:

The soft shadows used in standard Torque didn't have the crisp, clean look we wanted for Marble Blast either. In order to get the look of shadows in the game right, we decided to try implementing stencil shadows. This was a great fit-- the fact that our geometry was simple, and that our levels had only one light source made the game well-suited to this technique. The stencil-shadowed look provided exactly the kind of crisp detail we wanted.

Taken from this url
#11
03/25/2005 (9:19 am)
Interesting url, thanks John.

Wonder how i could accomplish this... *grabs a pen and paper*
#12
03/25/2005 (9:22 am)
Some of what you are seeing is the result of an array of normal pointers is being used to give smoother lighting across surfaces of the polys. Basically if the normals of vertices shared between two polys are close enough then they are averaged together and use the same normal value.

These two screen shots of the minigolf cup show the difference in looks:

regular cup rendering:

www.topmeadow.com/plans/regularcup.jpg
------------------------------------------------

smooth cup rendering:

www.topmeadow.com/plans/smoothcup.jpg
#13
03/25/2005 (9:37 am)
Thanks for the answer.

So, is that the smooth shading in Torque?

Then I have been talking about the wrong thing, I was meaning that i wanted simple shadows, such as in Marble Blast. (Plus the bright look, of course)
#14
03/25/2005 (9:50 am)
Yes, that is an example of smooth shading over part of a DIF in Torque.

As John said above, the crisp looking shadows in Marble are just stencil shadows. (I have stencil shadows turned off in these two sceen shots)
#15
03/25/2005 (9:54 am)
So, how do I turn them on 8) ?

Like I said, when it comes to rendering technology, I am almost a complete newbie.
#16
03/25/2005 (10:30 am)
To be clear, this is Torque, but not stock Torque. In my case, after loading the interiors, they are preprocessed to handle quite a few other effects that I wanted in my game. One part of this preprocess is setting up vertices for smooth shading. I built on top of earlier work that MarkF had done (for Marble Blast) which made things easier, but it really isn't that difficult to learn and implement if you're willing to dig in to the code and research how openGl works.

Additionally, changes were made to the interior rendering - replacing the default renderer in interiorRender.cc. So, unfortunately, its not a matter of just turning it on.

Perhaps when I get my game out the door I can write a few resourses explaining how I implemented a few things.
#17
03/25/2005 (10:53 am)
So, Kevin, you've (and Mark) basically faked gouraud shading with phong lighting on high tesselated surfaces on low poly meshes by tweaking around the normals used by shared vertices ?
Nifty :)
It really fools the eye :)
#18
03/25/2005 (10:58 am)
Well, then i am going to dive into the OpenGL.

However, this still leaves the matter of a bright environment unsolved.

Thanks for your replies Kev,

Ari J.
#19
03/25/2005 (12:55 pm)
Nic, that's basically it. All kudos to MarkF - I didn't even look at this area of the code until I moved onto minigolf and extended what it was doing.

Ari, if its any help we make a call to our special prepareSurfaces() funtion from InteriorInstance::onAdd() - goes through all the vertices in an interior and decides if it wants to do anything special with any of them.

The bright look is just a matter of the lighting values and also has a lot to do with the actual textures themselves.
#20
03/25/2005 (1:00 pm)
Marble Blast also uses lighting values over 1.0, it uses yellow light to add a lot of contrast, shadows are slightly blue.

Ari, you don't need to do any OpenGL work, just make good textures. You are spending time on the wrong thing.
Phase 1: get game done
Phase 2: ...
Phase 3: Profit
Page «Previous 1 2