Page 1 of 2

Light direction

Posted: Tue Sep 10, 2013 7:37 pm
by Zapp
Ok I passed over a lot of troubles and my map's almost ready. But I still have a problem with the last cuts :
I don't understand the "light direction" settings.

I ask it because it's pretty long to generate the shadows, object lightmap... And I wouldn't like to lose 45 minutes every time I want to try something.

I understood the light effects settings in battlecraft, but I still don't understand the "light direction".
I've put the skybox's sun in the West, and I thought the light direction should be "0 ; 100 ; 450" (the map is 1024x1024) in order to have the light origin at west/south-west.

But after generating all light n' shadow effects, it seems that the light still comes from north, pure north. It makes it strange, the light comes from another point that the sun... :?:

What would you suggest for a "sunset light" (west sun) ? The locations of "light direction" are the origin or the aim ? How to handle those numbers ?

Please help :'(

Re: Light direction

Posted: Tue Sep 10, 2013 8:44 pm
by Vilespring
in ED 42 you can drag the sun around. I've heard the best idea is to use BC and ED at the same time, using each of their strong points when needed. Together, you can make amazing maps that cannot be done with just one of them! :D

Re: Light direction

Posted: Wed Sep 11, 2013 1:11 pm
by Zapp
Ok thanks, but I'd like to be used to ED42 before using it on a map I already finished. That's why I'm just asking for advices to have the light starting from the skybox's sun.

I'll use ED42 on my next map... Other answers ?

Re: Light direction

Posted: Wed Sep 11, 2013 5:37 pm
by Zapp
Well well well.

Just consider me as someone who wants to improve, but who's had a too bad connection to look at the videos (using my phone as a e-box)

I've installed editor42, but I can't find the light settings that u're talking about. Where is it please ?

Re: Light direction

Posted: Wed Sep 11, 2013 7:46 pm
by Vilespring
If I remember correctly, in the editior, there is a white/yellow circle in the sky that can be dragged around. Also, this is at the bottom of the SkyAndSun.con file in the Init folder in the map;

Code: Select all

Sky.setSun sun
sky.changeOfsSkyHeight 50
Sky.setRotAngle 0
sky.sunLightDirectionVec -0.75/0.46/0.46
TextureManager.mipmaps 1
I believe the changeOfsSkyHeight changes were the sun's elevation is in the sky, and the setRotAngle is the rotation of the sun around the map, I think.
yay or nay? :D

Re: Light direction

Posted: Wed Sep 11, 2013 7:48 pm
by Swaffy
Hold down the "L" key to move the sun. Drag it where you want then let go.

I forgot the key for a second there, so I hopped in the program to make sure. XD

Re: Light direction

Posted: Wed Sep 11, 2013 8:10 pm
by Zapp
ok I found the tip with "L" key, and I found the "sun". Now I can put it where I want, thanks a lot guys it's great.

But now I wonder of some things :
-Once the sun is on the right position, can I use battlecraft again, after repacking ? And will I have to regenerate the different light n' shadows' effects ? (it seems that Editor42 finds the light/shadows effects itself without the 1 hour process of battlecraft)
-Once repacked, the sun is put whatever I do (if I don't edit the sun or light direction effects) ?
-If I repack, the different colors I used with battlecraft won't be lost ?

Anyway thanks for your help until here guys, I know I can answer to all these question by trying, but I just want to earn some time. I can't wait publishing my map :)

Re: Light direction

Posted: Wed Sep 11, 2013 8:50 pm
by Zapp
...

I encounter problems with ed42 :

-Saving is very very very long (doesn't answer)
-Packing impossible, a message of VBS or something like that (visual basic)

Re: Light direction

Posted: Fri Sep 13, 2013 4:55 pm
by Zapp
I'm really really really sorry to re-up this topic, but I still have the same trouble. I think I should keep trying with battlecraft cause at least I know it.

But I still have the same problem. Every set of numbers I try, the result is the same : The sun comes from north after generating the shadows.

Could you please confirm that in battlecraft, "light direction" is : x ; y ; z ???
And the position are the source of the light ?

I mean in a 1024*1024 map, if I put : 0.5 / 512 / 120 then the light should come from pure west ? And if I set : 512 / 1024 / 120 then the light should come from pure north ???

Please help, here are 4 days I'm breaking my nerves on it. Nobody can help ? I can't use editor, saving & packing don't work and I don't understand the problem.

Re: Light direction

Posted: Fri Sep 13, 2013 8:13 pm
by Vilespring
BF 1942 has it's coordinates use X/Z/Y for whatever reason....