Are you using lightmapping?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

fo0z wrote:Sorry to beak this thread with a basic coding question ... however ... how do you paint the background lightmap image with a custom color ( other than black ) ?
( I am working on fsrad too ... )
Well, in my case it's easy. I have an if statement which is true if a lightmap pixel falls inside a polygon and false if it doesn't. If it doesn't, I just fill in the pixel with whatever color I want. FSRad is probably similar, but I've never really looked at the FSRad code except to fix bugs and the import/export stuff.

But... why would you want to?
Guest

Post by Guest »

I wanted to see how the lightmaps are packed. As I seen, the fsrad packer is very well, then I dont have to worry about that :
Image

In fact, it is this post that harmed me ... sorry, I did not understood that you are making a independent lightmapper.
But I wonder ... why did you not start from fsrad ?
( Your work looks impressive though )
Eternl Knight
Posts: 313
Joined: Tue Nov 01, 2005 5:01 am

Post by Eternl Knight »

I can think of several reasons not to start from FSRad.

First one for me would be the "gaining knowledge" point - I have implemented two (slow) radiosity calculators before so I knew HOW they operated. Simply working off of someone elses code somewhat stunts the learning in some cases (I learn better by doing not watching)

Second one being that FSRad is good, but limited. For example - it states quite bluntly in the documentation that the beam tree & octree code is not really useful. AS such, FSRad (in it's current state) is only useful up to a certian number of polygons, after which is starts to choke.

--EK
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Anonymous wrote:But I wonder ... why did you not start from fsrad ?
I have at least two reasons for wanting to implement it from scratch:
Implementing it from scratch provides a better learning experience for me -- I know a lot more about a lot of things now than when I started.
I am the sole author and have complete control over it.

But the primary reason for not wanting to reuse FSRad code is simply because it doesn't make sense. I planned to do the actual lighting in a way very different than FSRad (rendering hemicubes using OpenGL vs. an analytical solution), I didn't care about the model formats supported by FSRad, etc. I wouldn't really be using any portion of FSRad except for the texture packer.

I already had a working obj reader class of my own, and obj is the file format I was most interested in supporting. I have my own imaging libraries, so why use what's in FSRad?

I also wanted to do my lightmapper in VB6 -- both so I could reuse my own code and because it's easier to prototype with (if I decide to release the source, I'll probably rewrite it in C++ first).

And now I may be diverging even more from FSRad. My immediate work will be focused on trying to get more speed by putting more work on the GPU. Indeed, making use of GPU features which weren't even available when FSRad was written, unless I'm mistaken.

FSRad is great, but there are more ways than one to skin a cat. My aim is to do it differently, and my decision not to base my lightmapper on FSRad reflects that.
fo0z
Posts: 1
Joined: Wed Nov 30, 2005 11:14 am
Location: France
Contact:

Post by fo0z »

I really like the GPU based calculation. However, is your GPU method need some features only available on decent cards ? ( like advanced gpu programms ).

If yes, it is not so interesting in *practice* ATM because all the game devel. does not have the last video card ( I mean : a video card that supports some advanced features like ps. & vs.).
However, the GPU calculation will be a standard in a near future.

If your system does not need absolutely these features, and can work without these, then it is VERY interesting.

Thus you can guess my question ... what GPU features do you use ?

I hope my comments do not bother you :wink:.
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

My current thinking is that it will require the framebuffer object extension (should be supported on not-latest-and-greatest cards but with recent drivers) and HDR rendering/floating point textures (this may require a fairly recent card). But I don't really know. I've just barely scratched the surface of this aspect. My original design wasn't going to need anything fancy.
Eternl Knight
Posts: 313
Joined: Tue Nov 01, 2005 5:01 am

Post by Eternl Knight »

Well, to get the most from a GPU - one has to make the most of what makes it fast - which is SIMD (Single Instruction, Multiple Data) processing. This tends to be through the use of fragment shaders & vertex programs.

For example, the research paper that I am going to send Murphy (once he sends me his email address :P ) can render a scene in radiosity on the GPU in just over 1 second, for geometry that took a professional package 96 seconds to calculate in software (260,000 elements).

What Murphy does is up to him of course - just providing background to why people are moving alot of processing to more capable 3D hardware (because it's MUCH faster).

--EK
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

For my initial test, I'm planning to put many billion operations through the GPU per scene. We'll see what kind of difference that makes before seeing where else I'm going to go with it.

But this can only be done with hardware and drivers that do floating point, which rules out older hardware. The GPU does me no good for anything besides form factor calculation without support for a fairly large range of values.
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Any news, Murphy? I'm eager to test your lightmapper...
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Nope, sorry! Been busy. This is finals week, among other things. Hopefully I'll get some work done on it over the winter break...

Glad to hear you're still interested, though. :)
cmoibenlepro
Posts: 237
Joined: Thu May 27, 2004 3:18 pm
Location: Canada

Post by cmoibenlepro »

Glad to hear you're still interested, though.
Me too I'm interested :wink:
But I understand you, I've lot of exams too.
Good luck! 8)
Joe Lesalo

Post by Joe Lesalo »

Pas d' peur Ben, tu est "Le Pro" :wink:
Bonne chance!
cmoibenlepro
Posts: 237
Joined: Thu May 27, 2004 3:18 pm
Location: Canada

Post by cmoibenlepro »

Any update during the holidays vacations? :P
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Nothing much new to report yet. I didn't work on it at all over my winter break (worked on a couple projects which will hopefully make me some money instead -- sorry! :) ). I did about two hours of research over the past couple weeks, but had no time to do anything last weekend. I'm hoping to get some actual coding done this weekend.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

I keep a wide open eye for this thread, you know it :)
Tell us whatever teh update :)
Finally making games again!
http://www.konekogames.com
Post Reply