Help ! Dynamic lighting

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Help ! Dynamic lighting

Postby Sirius » Mon Jun 09, 2014 4:34 am

Hi there.

With Doobes' magnificent new pub released, I feel like modeling again. However, I have a few problems with lighting in Blender.

Right now, my Age does not contain any texture, I'm mostly experimenting with light.
So, I set up a single sun, lighting a half-sphere like dome. This dome does not have specularity, no ambient light, no vertex color, nothing. The sun shines approximately at 45 degrees from vertical.
Results are as follow:
test1.png
test1.png (76.89 KiB) Viewed 4009 times

As you can see, this dome is divided in 3 parts by the light. A black zone (1), a mid-gray zone (2), and a bright gray zone (4).
It's weird because there is no smooth transition from part 1 to part 2 and 4 (except the vertex transition, of course). Plus, there is a bright line in 3 which is not specularity, and there are two lit zones: 2 and 4. Since I have only a single light in the scene which is the sun, I really don't understand that.

Because of that, I decided to erase most of what's in my Age, set up a new sun and a new sphere with a new material (still no vertex color or specularity, but a bit of ambient light).
test2.png
test2.png (73.37 KiB) Viewed 4009 times

It might be a bit hard to see on the picture, but again there is a bright line in 3. The bright side behaves fine (maybe because it's too bright to see anything). But now the dark area is divided in two. Part 4 is gray, which is fine. Part 1, however is darker, and is located on the lower hemisphere. Which doesn't make any sense since my sun shines at 45 degrees from vertical.


I already ran away screaming after experimenting with how point lights work a while ago, but now I really feel tired of all this. Any idea what might be wrong ? I can't see any additional light hiding anywhere in my Age. I think my version of PyPRP is up-to-date (it seems I can't access the wiki right now).

And this is the reason I don't like building on Uru. We're using an old version of Blender, a very old game engine, and no matter what you do, it seems there is always an additional error getting in the way.


EDIT: Also, I'm wondering: there is no way to use vertex color on shaded objects, is it ? I would like to add AO to vertices, but it seems it only works when no light is affecting the object.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Help ! Dynamic lighting

Postby dendwaler » Mon Jun 09, 2014 11:51 am

Lightning,

I agree its very very difficult.
I think i have tried everything i can imagine, but still have not found the clue.
Until now i use ao for absolutely every object!
Besides that i use some vertex painting.
And i multiply on important objects an additional texture with painted grey and some color on an fresh texture using the same uv map as the ao texture.
One of the main problems i encounter is that in the cathedral i use many arrayed areas. But the placing of the lights is different ,so i cannot reuse those additional painted textures because i have hundreds of lamps and lights all on different places inside an array element.
Furthermore in spaces with high spacing between vertices , vertex painting does not work, thats where i use texture painting instead.
So all together lightning becomes artwork.
I prefer however a more technical, procedural way , like it is in other engines or even in blender itself.
Unfortunately there seems not to be an easy way.
So writing a quality age easily takes several years for a single person.

I know these remarks do not help you, but at least you know ,
Your not alone!
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Help ! Dynamic lighting

Postby Sirius » Tue Jun 10, 2014 1:31 am

Thank you DenDwaler. Lighting really is a pain when you want more than simple vertex light. But failing to set up a very simple sun is quite disappointing.

I made a while ago a test scene that would be lit only by animated point lights, but encountered weird issues, such as the light becoming weaker depending of how wide the Age was, regardless of whether faraway objects were lit or not. I never managed to fix it, which was very frustrating.

Modern engines have Screen Space AO and pixel shaded shadows, which look great and are computed every frame. Some engines like Unreal, however, still use the lightmap baking system. But as long as you set your UV map correctly, the process is entirely automated, and it looks quite nice in the end.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Help ! Dynamic lighting

Postby Doobes » Wed Jun 11, 2014 6:33 pm

Hey Sirius! I'm sorry you're having troubles with lighting. I can say, without a doubt, that that was the hardest part of making the Pub...or any Age for that matter. In the end, it is a combination of both lightmaps and vertex shading for the more simple objects. The only thing you can really do is play around with different lamps and see what works best.

When it comes to outdoor locations, you're going to want a few sun lamps, actually: the main sun and a couple of diffuse light sources at different angles with less energy. You'll also want to play with the world's ambient lighting as well and make things a bit brighter too for an overall increase in brightness to sides not fully lit by the sun. That way, one side isn't completely black and the light is (usually) more even.

You can find this by pressing F5 and clicking the icon that looks like a globe ("World buttons").

The Pub's lighting was a LOT of trial and error and nearly endless patience...but as you can see, patience can pay off in a big way.

Another example:
Show Spoiler


Good luck with your project! :)
KI #s: MOULa - 6302, Minkata - 35287, Gehn - 14291,
TOC - 82340, DI - 44387
Image
User avatar
Doobes
 
Posts: 216
Joined: Thu Aug 07, 2008 6:08 pm
Location: Savannah, GA, USA

Re: Help ! Dynamic lighting

Postby Sirius » Wed Jun 11, 2014 10:38 pm

Nice cave you've got there ! :)

Yeah, ambient light is obviously necessary in 3D where it simply won't bounce on objects... Personally, I dislike using more suns for ambient light, because unless you have more than 5-6, it won't look 100% perfect IMHO. Here I removed all ambient light to make sure nothing was interfering with the main sun.

Anyway, I guess this crappy light will have to do for a few rotating objects. I'll just put a bit more of ambient light on these, which should make the issue less noticeable... :?

BTW, I'm also hoping to simulate cloud shadows in the Age... I want to use an animated lightmap on the terrain to fake cloud shadows, and darken groups of close objects when there are clouds over them. A bit like what you'd see in Tomahna in Myst IV.
Since it's going to be a bit tricky, I wanted to use an animated sun, which would be the best solution. But instead I'll have to stick with shadeless objects and animate the "Amb" slider of their material... which is going to be a pain.

I have no idea whether I'll manage to set it up, and no idea how good/bad it'll look. But still, it would be great if it worked ! :P


EDIT: Oh, and want another challenge ?
Model the Age in Blender 2.69 (because the interface is so much better). Then, backport it to Blender 2.49, using CollaDA (otherwise you lose all faces). Then, finish the Age setup, with Blender's max view distance capped at 10,000 units, which prevents you from seeing the whole thing at once.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Help ! Dynamic lighting

Postby Deledrius » Thu Jun 12, 2014 12:02 am

Sirius wrote:Model the Age in Blender 2.69 (because the interface is so much better). Then, backport it to Blender 2.49, using CollaDA (otherwise you lose all faces). Then, finish the Age setup, with Blender's max view distance capped at 10,000 units, which prevents you from seeing the whole thing at once.

I did something similar, but I saved it as a .blend in 2.7 with compatibility mode checked, and then imported (not open, but import) it into 2.49. It kinda works. :cry: Collada's probably the better option, but I haven't tried it yet.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

Tangent Shading

Postby Sirius » Sun Jun 29, 2014 3:52 am

YAAAAAAAY !

Just now, I accidentally ticked the wrong button in Blender - "Tangent Shading", just next to "Shadeless" (in Blender 2.6). The material preview window showed me a funny thing...

Here is a Blender render with it:
tangent.png
tangent.png (283.62 KiB) Viewed 3862 times


...Which is exactly what I got in Uru !

Conclusion: PyPRP uses a wrong default setting which results in Plasma using the face's tangent instead of normal ! That, or people who made Plasma had no idea how lighting works...

Let's see... Is there a setting in PyPRP to correct this ? Or a setting in the PRP, maybe ?
Or maybe PyPRP asks Blender for the faces' tangent instead of normal when exporting... Dunno, but I'll have a look at this !
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France


Return to Building

Who is online

Users browsing this forum: No registered users and 0 guests

cron