GPU-RAD: Make lightmaps using your gpu

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

GPU-RAD: Make lightmaps using your gpu

Post by omaremad »

This project is at a very early stage and was mainly written for me to generate indirect lightmaps rather than to create a full artist proof commercial level lightmapper.

It generates lightmaps or indirectmaps(the real intenion) on the GPU and saves them to a texture. Its based on the instant radiosity principle but with a few diffrences from most implementaions to allow it to make savable lightmaps.

here is the evolution of the system:

Image
Image
Image

Here is a demo for you guys to play around with and test your systems.
edit will upload in 10 minutes
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Thanks to blindside for the xeffects core (though it uses ESM's which are not currently in xeffects) and pcode for the test mesh.

http://irrlichtirc.g0dsoft.com/omaremad/rad.zip
edit:btw it most likely will fail on ati, bc of my dirty code

SHADER 2.0 cards and above.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

if the exe in the zip doesnt work (ati people) use this one

http://irrlichtirc.g0dsoft.com/omaremad/rad.exe
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Post by ACE247 »

Neat work.
But whats whats horrible lens bending from/for??
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Its a left over from the hemicubetests, it can be changed without affecting the algorithm.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Ah I've been waiting to see progress on this, will comment once I've had a good look.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

I have added RGAD HDR when processing the lighting so lights can be greater than 255 per component and the radiosity compuations work accrodingly. I also added area weighting so the user can control how many indirect lights are processed for the surface area of the meshes.

Right now its working fine on my hardware, i have no idea how it runs on diffrent machines speed wise and errorwise, therefore i have no incentive to release the source till i know it will work on other machines, meshes etc.... without artefacts.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
d3jake
Posts: 198
Joined: Sat Mar 22, 2008 7:49 pm
Location: United States of America

Post by d3jake »

Forgive me if this was said somewhere in this thread and I cannot find it, but with this application, are the lights generated by point\directional light sources, or from faces casting light?
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

It work fine on my system. The camera lens are extra-wide but the rendering of the lightmap is rendered properly.

How many lights could you render with your current system? It look pretty neat right now! Is there a special thing to do with the scene (meshes) so the render occur?
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

All it requires is a mesh with two uv layers with the 2nd layer already unwrapped in a lightmap layout. This program only does radisitity, unwrapping is left to the user, blender has nice scripts for it.

Also the mesh must have a lightmap file assigned to it, even if its a empty image, it just needs to be the resolution and filename you want the output to be.

The algorithm generates radiosity by bouncing light saved in UV space, the light is biunced by creating small virtual lights.

Here is the source, its more for the intrested programmer/ code oreinted artist since it is not a user friendly application, just a radisoity generator.

http://irrlichtirc.g0dsoft.com/omaremad/src.zip

I am planning to use this to create an amazing irrlight TECH DEMO and by tech demo, i mean a proof of concept with artist pipeline to show how people can make amazing realtime scenes with irrlicht.

I already started working on the art assets ill put in the level.
Image
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Holy Crap :shock:
This will be awesome!
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

niceeeeeeee
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Here is an updated source as requested by 3dmodlerman

New Features:
UV tree optimisation for faster model processing
Gamma and improved HDR
Better random sampling(better generator and new seed for every bounce layer)
User definable occlusion angle.
Better edge padding
Memory management and comments
Dynamic scaling(the less light to bounce the faster the calculation)
All shader model 2.0+ suppourted (NV,ATI,Intel)

As always this requires a mesh with 2 uv layers and and assigned textures (including a blank lightmap of the wanted resolution), this is better for the artist anyway since they can unwarp the meshes in whatever way they want for best lightmap desnity.

irrmesh and b3d are good formats for this.

Image
http://irrlichtirc.g0dsoft.com/omaremad/bin.zip
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

it looks amazing, of course 8)

Unfortunately I only have shader model 1 :cry:
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

just keep in mind Xeffects is pretty slow, and ofc if you want to have Real Good quality lightmapping, generate spherical harmonics :)
Post Reply