Light direction

Ask questions, discuss ideas, get answers
Zapp
Posts: 18
Joined: Thu Aug 29, 2013 2:42 pm

Light direction

Post 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 :'(
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Light direction

Post 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
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
Zapp
Posts: 18
Joined: Thu Aug 29, 2013 2:42 pm

Re: Light direction

Post 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 ?
Zapp
Posts: 18
Joined: Thu Aug 29, 2013 2:42 pm

Re: Light direction

Post 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 ?
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Light direction

Post 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
Last edited by Vilespring on Wed Sep 11, 2013 7:48 pm, edited 1 time in total.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Light direction

Post 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
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Zapp
Posts: 18
Joined: Thu Aug 29, 2013 2:42 pm

Re: Light direction

Post 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 :)
Zapp
Posts: 18
Joined: Thu Aug 29, 2013 2:42 pm

Re: Light direction

Post 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)
Zapp
Posts: 18
Joined: Thu Aug 29, 2013 2:42 pm

Re: Light direction

Post 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.
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Light direction

Post by Vilespring »

BF 1942 has it's coordinates use X/Z/Y for whatever reason....
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
Post Reply