Are you using lightmapping?
Hi murphy
Quite a simple scene, but not as cornel box. blender 2.37a, as is latest oficial, I think.
I think there are several interesting examples of how light will react, but is yet simple. there's two version, with and without certain spehere (the only thing with smoothing normals, there)
quick and crappy render too of part of the scene.
it was all done in seconds, lol.
But i guess is more useful than the huge one.
Also, i think is very good you added a basic fly by or walk camera
Eager to test it, but go at your pace!
welll, finally just one version, just delete the sphere if you don't need it
well, yup.added the without sphere one, too.
http://www.sendmefile.com/00148803
Quite a simple scene, but not as cornel box. blender 2.37a, as is latest oficial, I think.
I think there are several interesting examples of how light will react, but is yet simple. there's two version, with and without certain spehere (the only thing with smoothing normals, there)
quick and crappy render too of part of the scene.
it was all done in seconds, lol.
But i guess is more useful than the huge one.
Also, i think is very good you added a basic fly by or walk camera
Eager to test it, but go at your pace!
welll, finally just one version, just delete the sphere if you don't need it
well, yup.added the without sphere one, too.
http://www.sendmefile.com/00148803
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
So I got several hours done on it this weekend. I may not get that much time for quite a while.
But, I got quite a bit done.
I think the hemicube code is pretty close to working right.
This is my test scene. What you're seeing is light coming out of a doorway on the right (the light is a biggish rectangular prism near the ground just inside the door) and hitting the opposite wall on the left. It's also hitting a box on the floor -- you can see the silhouette of the box as well as the shadow it casts on the wall. You can also see the light hitting the ceiling. No idea why it's not currently working on the floor.
This is just one hit -- direct lighting based on emitters. From here, it starts bouncing by rendering the scene over and over. This pass took about half an hour to render. Yikes! Need some optimizing!
So, anyway. Visible progress!
But, I got quite a bit done.
I think the hemicube code is pretty close to working right.
This is my test scene. What you're seeing is light coming out of a doorway on the right (the light is a biggish rectangular prism near the ground just inside the door) and hitting the opposite wall on the left. It's also hitting a box on the floor -- you can see the silhouette of the box as well as the shadow it casts on the wall. You can also see the light hitting the ceiling. No idea why it's not currently working on the floor.
This is just one hit -- direct lighting based on emitters. From here, it starts bouncing by rendering the scene over and over. This pass took about half an hour to render. Yikes! Need some optimizing!
So, anyway. Visible progress!
-
- Posts: 313
- Joined: Tue Nov 01, 2005 5:01 am
-
- Posts: 237
- Joined: Thu May 27, 2004 3:18 pm
- Location: Canada
Correct, EK -- no culling or anything yet. It will help, but this test scene doesn't really even have that much geometry. I think it's more likely that the slowness is due to the fact that for each lumel takes more than half a million floating point multiplications, and another half million floating point additions. It's a lot of math. Culling will help too, especially as scenes get larger. I'm still mulling over caching visibility info, which would seriously speed up subsequent passes (light bounces).
Here's a screenshot from today's version. This image rendered in just shy of three minutes. Only 150,000 multiplications per pixel and 150,000 additions. This is the difference between a hemicube with 256 pixel faces (yesterday) and with 128 (today). No huge loss of quality. I also found that two faces of the hemicubes were totally wrong. This is why the floor wasn't getting lit yesterday. It's fixed now, and it also evens out the lighting a lot. Looks much better.
This is a shot of the same scene as yesterday, but viewed from above. You can see the door (very foreshortened). There's actually a step up to the door, which is why the light doesn't start spreading out immediately in front of it -- it's in the shadow of the step. You can see the same box as yesterday catching some light and casting a shadow on the top and right walls. You can also see the column in the lower right catching some light.
Here's a screenshot from today's version. This image rendered in just shy of three minutes. Only 150,000 multiplications per pixel and 150,000 additions. This is the difference between a hemicube with 256 pixel faces (yesterday) and with 128 (today). No huge loss of quality. I also found that two faces of the hemicubes were totally wrong. This is why the floor wasn't getting lit yesterday. It's fixed now, and it also evens out the lighting a lot. Looks much better.
This is a shot of the same scene as yesterday, but viewed from above. You can see the door (very foreshortened). There's actually a step up to the door, which is why the light doesn't start spreading out immediately in front of it -- it's in the shadow of the step. You can see the same box as yesterday catching some light and casting a shadow on the top and right walls. You can also see the column in the lower right catching some light.
-
- Posts: 313
- Joined: Tue Nov 01, 2005 5:01 am
Three minutes is not too bad, and I cannot notice a degradation in lighting quality. Of note is the fact that with more passes - the quality will improve and as such, the possibility of a 64x64 hemicube is not unfeasible.
What is the import format for your processor? I have an altered (for speed) FSRad we could use as a speed/quality comparison.
--EK
What is the import format for your processor? I have an altered (for speed) FSRad we could use as a speed/quality comparison.
--EK
EK, both the lights and the model are OBJs.
Here's a shot done with the same version as the earlier shot today, but with two lights. You can see the new light on top of the little room -- it's outlined in pink.
And here's a zip containing the lightmap texture, the lightmapped OBJ, and the OBJ with the lights in it if anyone wants to take a 3D look.
http://www.constantthought.com/junk/twolights.zip
Here's a shot done with the same version as the earlier shot today, but with two lights. You can see the new light on top of the little room -- it's outlined in pink.
And here's a zip containing the lightmap texture, the lightmapped OBJ, and the OBJ with the lights in it if anyone wants to take a 3D look.
http://www.constantthought.com/junk/twolights.zip
yay!!
Murphy, this is getting real good color...
I am downloading that zip to check it right now !
Don't worry bout optimization.. besides rendering is know to be freaking slow, specially radiosity or the like, you can do that later...
Well, who am I to speak about what is better, if I can't write a single line of code, lol...
Murphy, this is getting real good color...
I am downloading that zip to check it right now !
Don't worry bout optimization.. besides rendering is know to be freaking slow, specially radiosity or the like, you can do that later...
Well, who am I to speak about what is better, if I can't write a single line of code, lol...
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
if is more easy for the code, keep with that scene, but the simple one of the 2 I made is made of separate objects.You can easily deleted the non horizontal objects simply selecting and hitting del...
But I don't mind wether you even not use at all any of the scenes, I am just surpirsed you've come along with that so soon !
grrrreat
But I don't mind wether you even not use at all any of the scenes, I am just surpirsed you've come along with that so soon !
grrrreat
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
Well, the important thing to consider, puh, is that it's three minutes PER PASS. So if you want to have the light bounce around 10 times, you're talking half an hour. An hour for twenty bounces. I'd like it to be faster.
In the zip I posted, I was using a 128x128 hemicube, I think. Those weird stripes on the walls are caused by that. I rendered it with a 300x300 hemicube (I'll post it later) and they were almost entirely gone -- results were much better, but it took quite a bit longer to render.
The stripes and other artifacts are worse the smaller the hemicube is. This is especially problematic when the light is very sharp, like on the first pass when it's entering the scene. The light will get more and more diffuse the more it bounces, so it might be reasonable to decrease the hemicube size (and, thus, speed up rendering) on subsequent passes.
Also, I could enable GPU antialiasing on the first pass which would decrease the artifacts when light is entering the scene (subsequent passes can't be antialiased).
At this point, I've really got two options of what to do next.
It's either try to implement more of it on the graphics card and hope for some speed improvement.
OR...
Implement bouncing.
Anyone have a suggestion?
In the zip I posted, I was using a 128x128 hemicube, I think. Those weird stripes on the walls are caused by that. I rendered it with a 300x300 hemicube (I'll post it later) and they were almost entirely gone -- results were much better, but it took quite a bit longer to render.
The stripes and other artifacts are worse the smaller the hemicube is. This is especially problematic when the light is very sharp, like on the first pass when it's entering the scene. The light will get more and more diffuse the more it bounces, so it might be reasonable to decrease the hemicube size (and, thus, speed up rendering) on subsequent passes.
Also, I could enable GPU antialiasing on the first pass which would decrease the artifacts when light is entering the scene (subsequent passes can't be antialiased).
At this point, I've really got two options of what to do next.
It's either try to implement more of it on the graphics card and hope for some speed improvement.
OR...
Implement bouncing.
Anyone have a suggestion?