Game Development Community

Outlining a model

by Jason Farmer · in Torque Game Engine · 07/05/2004 (8:54 am) · 7 replies

My game is a kind of RPG/Adventure game. Point & Click interface, Investigating objects, Talking to NPC's that sort of thing.

All of the games of this type I've seen from Diablo to Neverwinter nights use some sort of object highlighting when the mouse is moved over them. NWN has a particularly nice glow to their 3D objects. Diablo & Siege of Avalon use some sort of pixel level outlining.

Does anyone know how I can get this sort of highlight? I don't mind if it's an outline or a glow just as long as it shows the object can be interacted with.

Has anyone seen a resource or anything that does this using Torque?

The only way I can think of at the moment is to use a FXLight near the model, but that's not the look I'm after... however I may have to settle for that in the short term.

#1
07/05/2004 (1:20 pm)
You will have to do some rendering modifications, namely scale the shape a little bigger than it's size, render it and then render the original shape on top without depth buffer. Or render the one behind with only backfaces.
#2
07/05/2004 (1:29 pm)
Just an idea,not for a glow effect but you could always mount an image or shape on the object when it has been selected?

Or you could increase the luminosity of the object? which could simulate a glow, it wont have a glow outline but it would be brighter, on that note how would you go about doing that?? anyone know?
#3
07/06/2004 (4:33 am)
This is looking like a fair amount of work, editing the object rendering code..

I wonder if anyone's used CelShading techniques for this?.. or at least the outlining code.

I'll do some research.
#4
07/06/2004 (4:46 am)
It looks like Tutorial 37 on the nehe.gamedev.net could provide a solution... Altering the render code to draw outlines when the object is selected. Sounds simple eh :-D
#5
07/06/2004 (4:53 am)
You could look at the code in the Stencil Shadow resource. It does model edge detection/creation. Modify that to create a glow effect around the model. Check the code that generates the silhouette and then look at the silhouette debug rendering code.

Or, for a really simple effect, take the model and apply a new skin to it (the glow). Scale it up about 1.25 or 1.5 the size of the original. Finally, reverse all the normals in the mesh.

- Brett
#6
12/27/2007 (4:08 pm)
Brett ' Could you provide a sample code as you state in simple effect. Can this be done in script or does it have to be done in the engine
#7
12/27/2007 (5:59 pm)
Check out the afx resource. It has what you need already inside.