Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Outlining a Mesh?  (Read 1567 times)
0 Members and 1 Guest are viewing this topic.
Offline Longarmx
« Posted 2014-02-12 04:31:35 »

So, I have been googling this problem for a couple days but I can't come to a definite answer. What I want to achieve is render an outline of a mesh to create a look like Antichamber. I have found three possible solutions so far.

1. Use Sobel Operator to determine the outline of the mesh (This may not work with single color meshes)
2. Use Cel Shading to generate outline using back rendered faces of the mesh drawn a second time. (I don't know how costly this will be.)
3. Create the texture/outline meshes by hand. (This is the least preferred due to the amount of manual work involved)

So I was wondering what you guys think about this? Am I on the right track with one of these three, and if so, what one is the best option?


Online Longor1996

JGO Wizard

Medals: 115
Projects: 2
Exp: 8 years

The cake is probably a lie.

« Reply #1 - Posted 2014-02-12 16:01:55 »

-snip to get rid of quote quota-

Antichamber uses Sobel-Cel-Shading (Sobel-Operator as you call it).
Don't ask me, I don't know how it works.

- Longor1996

Offline matheus23

JGO Kernel

Medals: 138
Projects: 3

You think about my Avatar right now!

« Reply #2 - Posted 2014-02-12 17:41:48 »

1. I wouldn't use Sobel on the colors, when I have a depth buffer Wink You can 'simply' run the Sobel Operator on the Depth buffer and it works no matter what colour the meshes are. That version has trouble finding an outline, if two sheets of paper lie on top of each other in your scene, for example (when the depth value difference is small)

2. It's exactly as costly as rendering your object without doing fancy fragment operations (for example lightning). Depending on how costly your fragment operations are, it's from about 1.5 times to twice as costly Smiley

I'm by no means an OpenGL expert, but these are my thoughts, I hope, they're still helpful Wink

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Pages: [1]
  ignore  |  Print  

EgonOlsen (74 views)
2018-06-10 19:43:48

EgonOlsen (55 views)
2018-06-10 19:43:44

EgonOlsen (74 views)
2018-06-10 19:43:20

DesertCoockie (254 views)
2018-05-13 18:23:11

nelsongames (154 views)
2018-04-24 18:15:36

nelsongames (154 views)
2018-04-24 18:14:32

ivj94 (895 views)
2018-03-24 14:47:39

ivj94 (156 views)
2018-03-24 14:46:31

ivj94 (808 views)
2018-03-24 14:43:53

Solater (172 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!