If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
![]() |
|
|
#1 |
|
Crazy coder
|
I have a new demo which illustrates a simple but effective technique for dealing with aliasing on thin wires.
Results: Normal size: ![]() Zoomed: ![]() Download from my site |
|
|
|
|
|
#2 |
|
Senior Member
|
Nice. Going by the description on your website, that sounds very cheap computationally.
__________________
"Well, you mentioned Disneyland, I thought of this porn site, and then bam! A blue Hulk." —The Creature My (currently dormant) blog: Teχlog |
|
|
|
|
|
#3 |
|
Crazy coder
|
Yes, it's very cheap. To core of this technique is basically a handful of ALU instructions in the vertex shader.
|
|
|
|
|
|
#4 |
|
Senior Member
|
Is this clamping method applicable to any type of geometry, that nears the sub-sample boundary size?
__________________
Apple: China -- Brutal leadership done right.
Google: United States -- Somewhat democratic. Microsoft: Russia -- Big and bloated. Linux: EU -- Diverse and broke. |
|
|
|
|
|
#5 | |
|
hardly a Senior Member
Join Date: Jul 2008
Location: still camping with a mauler
Posts: 3,637
|
"A similar approach could likely be used on other aliasing prone geometry based on thin geometry, such as antenna towers, pipes and railings."
http://www.humus.name/index.php?page=3D&ID=89
__________________
Quote:
|
|
|
|
|
|
|
#6 |
|
Crazy coder
|
It should be quite straightforward to apply the same idea to anything cylindrical or spherical. So pipes and railings should be straightforward and if you build your antenna towers out of metal bars it should just work. I don't know how well the idea would extend to non-round objects, like rectangular shapes etc. You would probably need to take orientation into account. Intuitively my guess is that it should work, but I can't guarantee that before I've tried.
|
|
|
|
|
|
#7 |
|
Oz Yak
Join Date: Feb 2002
Location: US of A
Posts: 2,516
|
"Our new title does in fact support MSAA + FXAA and even SSAA for you PC fanatics!"
"Yeah but does it support WAA!?!??"
__________________
Is EA still bleeding cash like an executive doing an ED-209 demonstration.... - Grall |
|
|
|
|
|
#8 |
|
Diamond Viper 550
Join Date: Feb 2003
Location: U.S.
Posts: 1,189
|
I saw this demo linked at the Chinese technology site expreview.com. The translation used the term "Force of God" to describe how awesome it is
__________________
"I demand the constitutional right to eat my enemies" - RussSchultz |
|
|
|
|
|
#9 |
|
Artist formerly known as Acert93
Join Date: Dec 2004
Location: Seattle
Posts: 7,704
|
Awesome--and the solution sounds so simple that going forward there is no excuse. Kudos Humus!
__________________
"In games I don't like, there is no such thing as "tradeoffs," only "downgrades" or "lazy devs" or "bugs" or "design failures." Neither do tradeoffs exist in games I'm a rabid fan of, and just shut up if you're going to point them out." -- fearsomepirate |
|
|
|
|
|
#10 |
|
Member
Join Date: Mar 2007
Location: Wroclaw, Poland
Posts: 578
|
You wanted to SAY WHAA?! I guess.
__________________
Shifty Geezer: I don't think the guy really understands the subject. PARANOiA: To be honest, Shifty, what you've described is 95% of Beyond3D - armchair experts spouting fact based on the low-level knowledge of a few. This posting is provided "AS IS" with no warranties, and confers no rights. |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Jun 2005
Location: California, USA
Posts: 272
|
It seems like this can be generalized via contour detection similar to the cell shading methods, then expanding the edges and converting coverage to alpha.
Proper sorting will still remain a problem, but perhaps with DX11 there might be efficient ways to sort per fragment. |
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Oct 2004
Posts: 52
|
Interesting approach. We solved this problem by drawing the wires again as a linelist, this way nearby portions would get hidden by the actual geometry, and far away segments would never go below 1 pixel in size.
|
|
|
|
|
|
#13 | |
|
Senior Member
Join Date: Feb 2002
Posts: 2,019
|
Quote:
http://www.slideshare.net/hgruen/oit...1-linked-lists |
|
|
|
|
|
|
#14 |
|
Registered
Join Date: Nov 2006
Location: Denmark
Posts: 8
|
A quick idea : During development apply this to everything in your scene, and then only show (or highlight) the pixels that were affected, to detect good candidates to apply this technique to in the final product - rather than guessing what geometry it might be good for.
|
|
|
|
|
|
#15 |
|
Registered
Join Date: Nov 2006
Location: Denmark
Posts: 8
|
Humus, is the texture lookup in the pixelshader really necessary?
Since the phonelines are only 1 pixel wide, it seems to me that you could simply use an already defined color .. perhaps the vertex color. |
|
|
|
|
|
#16 |
|
Registered
Join Date: Nov 2006
Location: Denmark
Posts: 8
|
I did some tests on my own and you can indeed skip the texture lookup whenever In.Fade.x goes below 1, without being able to tell the difference.
However seeing is this is already such a simple shader it's bottleneck is the export and not the texture lookup on most platforms, so you really don't save anything by this. You'd have to not run the pixelshader at all, to do it faster - perhaps an alpha test might work? |
|
|
|
|
|
#17 |
|
Dangerously Mirthful
Join Date: Feb 2002
Location: Winfield, IN USA
Posts: 15,292
|
Well I've known all along Humus was a programming god, but it is nice to see the Chinese finally getting around to admitting it.
Good job Humus, thank you!!!!
__________________
Elite Bastards - Adminish “Be polite, be professional, but have a plan to kill everybody you meet.” - General James N. Mattis |
|
|
|
|
|
#18 | |
|
Crazy coder
|
Quote:
Sure. I'm not concerned with performance here though, so I stayed with a single pass. In a real game engine you may want to split the fully opaque parts from the translucent ones. Not so much for performance, just to better work with deferred rendering etc. May also want to sort the translucent parts if that makes a visual difference somewhere. If you do split you would probably do the translucent parts with a simpler shader, without texture lookups or lighting. Probably just a constant color. In the demo I used quite harmless half-lambertian lighting with no specular or anything to avoid getting shader aliasing introduced that way. If you do more fancy (or more correct) lighting you probably want to start fading out the lighting earlier, in particular specular, say at several pixels width, and transition to a constant color. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|