Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  ? Consuming light rays after striking a surface...  (Read 1396 times)
0 Members and 1 Guest are viewing this topic.
zahl2001
Guest
« Posted 2004-02-12 03:00:01 »

I'm trying to learn the very basics of lighting now, and I have a diffuse light in one corner of a room, a large sphere in the middle of the room, and another object in the corner oposite the light source.  The last object should not be getting any direct light from the source due to the sphere blocking it, but it seems to come right through and light the other object anyway.  Besides this, the scene looks fine.

Thanks, as usual Smiley
Offline kevglass

JGO Kernel


Medals: 163
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2004-02-12 04:55:06 »

OpenGL doesn't light with "rays", hence there is no blocking. What actually happens is each vertex on the geometry is evaluated against the lights in the scene and coloured approriately.

Hence, both the sphehe and the other shape are being illuminated, because they are both evaluated.

Shadow Volumes (google for it) seems to one way people are getting round this (see Xith3D). I imagine there are several otherways.

zahl2001
Guest
« Reply #2 - Posted 2004-02-12 20:27:13 »

Anyone else have any suggestion on how this can be done?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #3 - Posted 2004-02-12 20:32:13 »

The two current favorite methods of doing shadows are shadow volumes and shadow mapping. Both of which eat fillrate like crazy and require various bits of voodoo to make them robust.

You can find detailed explainations all over the net, try starting with nVidia's website.

http://developer.nvidia.com/object/robust_shadow_volumes.html

http://developer.nvidia.com/object/hwshadowmap_paper.html

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
zahl2001
Guest
« Reply #4 - Posted 2004-02-12 22:03:46 »

Are shadows the only way to accomplish what my original question asks?  I'm playing Gothic 2 right now, and they don't have fancy shadows in the game, yet, when there is a lamp out in the street it doesn't shine through the walls of the shops and into the interiors.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #5 - Posted 2004-02-12 22:19:35 »

Judging from screenshots, Gothic uses lightmaps for most of its lighting. Theses are usually pre-calculated at level compile time which means you can do lighting based on ray casting or whatever fancy method you want (like radiosity). The downside being that they're totally static so neither the lights or the geometry can change.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
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.

Dwinin (19 views)
2014-09-12 09:08:26

Norakomi (54 views)
2014-09-10 13:57:51

TehJavaDev (63 views)
2014-09-10 06:39:09

Tekkerue (31 views)
2014-09-09 02:24:56

mitcheeb (53 views)
2014-09-08 06:06:29

BurntPizza (37 views)
2014-09-07 01:13:42

Longarmx (23 views)
2014-09-07 01:12:14

Longarmx (27 views)
2014-09-07 01:11:22

Longarmx (26 views)
2014-09-07 01:10:19

mitcheeb (34 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!