Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (686)
Games in Android Showcase (198)
games submitted by our members
Games in WIP (758)
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  
  Creating a light attenuation effect  (Read 1169 times)
0 Members and 1 Guest are viewing this topic.
Offline ribot

Junior Devvie




Ribot - mobile UI specialist


« Posted 2004-06-11 21:32:14 »

Hi all,

I'm just wondering what would be the best solution to recreating an effect like the image below



I will only need to light the floor and no other objects in the scene, so maybe I don't even need to use the OpenGL light state machine?

I've been thinking that a possible solution may be to split the floor into a large number of quads,  and calculate their distance from the light source given the standard equation.  Is this just extra work and should I just let OpenGL calculate it for me by using a spot light type function?

http://ribot.co.uk - design agency focused on mobile
http://www.retrospecs.co.uk - online vintage eyewear store
Offline cfmdobbie

Senior Devvie


Medals: 1


Who, me?


« Reply #1 - Posted 2004-06-12 17:51:06 »

OpenGL lighting is not what you want - it's not generally optimized and would require a very high poly count to get that kind of effect.

You probably want to look at lightmaps - basically where you project a spotlight texture onto your surface.  First hit on Google looks good:

http://www.3ddrome.com/articles/dynamiclightmaps.php

Hellomynameis Charlie Dobbie.
Offline ribot

Junior Devvie




Ribot - mobile UI specialist


« Reply #2 - Posted 2004-06-12 21:32:12 »

Thanks cfmdobbie,

that looks exactly like what I was after!  I'd never heard of lightmaps, so I didn't know what to google.  Smiley

I'll post back when I have implemented an answer.

http://ribot.co.uk - design agency focused on mobile
http://www.retrospecs.co.uk - online vintage eyewear store
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 
roseslayer (553 views)
2016-08-06 11:43:29

roseslayer (509 views)
2016-08-06 09:43:11

xTheGamerCodes (582 views)
2016-08-04 15:40:59

xTheGamerCodes (577 views)
2016-08-04 15:40:24

orrenravid (923 views)
2016-07-16 03:57:23

theagentd (999 views)
2016-07-11 14:28:54

Hydroque (1097 views)
2016-07-06 05:56:57

Hydroque (1061 views)
2016-07-03 08:52:54

GrandCastle (877 views)
2016-07-01 09:13:47

GrandCastle (645 views)
2016-07-01 09:09:45
Rendering resources
by Roquen
2016-08-08 05:55:21

Rendering resources
by Roquen
2016-08-08 05:52:42

Rendering resources
by Roquen
2016-08-08 05:50:38

Rendering resources
by Roquen
2016-08-08 05:49:53

Rendering resources
by Roquen
2016-08-08 05:32:39

Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42
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!