Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (426)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (466)
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  
  3D smoke artifacts (fixed)  (Read 1284 times)
0 Members and 1 Guest are viewing this topic.
Online Riven
Showcase Moderator

JGO Overlord


Medals: 612
Projects: 4
Exp: 16 years


Hand over your head.


« Posted 2004-02-29 13:09:41 »

Hey OpenGL gurus!

I'm a OpenGL-n00b and have a little problem with 3D-smoke. I have billboards with 32bit textures, all z-sorted ofcourse. Now the problem seems to be that when the billboards are very near to each-other, the blending gets messed up.

The following screenshot illustrates the problem:



I've done some drawing on it so explain what's happening.

I've played a lot of FPS-games, that use 3D-smoke where these artifacts are not occuring, so it is probably my fault Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline elias

Senior Member





« Reply #1 - Posted 2004-02-29 14:42:39 »

If you have enabled the z buffer (seems like you have, since you sort the smoke plates), the problem is probably a classical z-fighting issue. Try moving the near clipping plane away from the camera or the far plane closer, and see if it helps. What are they at now?

- elias

Online Riven
Showcase Moderator

JGO Overlord


Medals: 612
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2004-02-29 20:29:46 »

Ah, that makes me think about the z-buffer... (doh) it has a presicion of only 24 bits... (ATi-card)

Settings were: near 0.001F / far 8192.0F

Narrowing them solved it! Thx!

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel


Medals: 51
Projects: 11


Monkey for a head


« Reply #3 - Posted 2004-02-29 22:43:05 »

1. If you've already z-sorted your particles, then a z-buffer is unnessisary. Turn it off to avoid z-fighting.

2. 24-bit z-buffer is more than enough for most apps. Remember that a z-buffer is non-linear and that most acuracy is near the camera, therefore increasing the near plane has a dramatic effect (likewise, the far plane distance has a minimal distance). A near of 0.001f is overkill for practically every game. Push it as far out as possible.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Online Riven
Showcase Moderator

JGO Overlord


Medals: 612
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #4 - Posted 2004-03-01 06:38:01 »

Quote
1. If you've already z-sorted your particles, then a z-buffer is unnessisary. Turn it off to avoid z-fighting.


Hm, interesting. You see I'm a n00b here. Now I enable it for the terrain and disable it for the smoke. For this kind of smoke it turns out it doesn't matter at all whether I z-sort them or not (who cares which grey cloud is rendered first if they are all the same color and blended). For other kinds of particle-engines or 3d-blended objects the z-sorting is important so I guess I'll keep it anyway. The z-sorting isn't a real performance hit, but disabling the depth-buffer increased performance by 33% when the smoke fills the whole screen. (150fps -> 200fps)

Thanks again for all help. I guess I have to read that Redbook someday before doing anything serious in OpenGL.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (75 views)
2014-04-15 18:08:23

BurntPizza (68 views)
2014-04-15 03:46:01

UprightPath (80 views)
2014-04-14 17:39:50

UprightPath (65 views)
2014-04-14 17:35:47

Porlus (81 views)
2014-04-14 15:48:38

tom_mai78101 (105 views)
2014-04-10 04:04:31

BurntPizza (165 views)
2014-04-08 23:06:04

tom_mai78101 (261 views)
2014-04-05 13:34:39

trollwarrior1 (210 views)
2014-04-04 12:06:45

CJLetsGame (220 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org 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‑gaming.org
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!