Author Topic: How is the sun done in PS?  (Read 1124 times)

AryHann

  • Veteran
  • *
  • Posts: 1244
  • WonderWoman
    • View Profile
How is the sun done in PS?
« on: January 13, 2005, 11:03:23 am »
Hi!

I hope the question is in topic.
I am going to do the lighting of my VE (Virtual Environment), and I am using the PS exporter guide, since I am using 3dsmax.

First of all, I was thinking to create the sun over the open spaces like a OmniLight (a positional one), but I got a bit confused when I was reading the guide.

From the guide:
the controller light must be named \'crystal\' and should be dynamic. This light will be affected by other factors like rain. So depending on its intensity value will control the on/off of other lights

From what I understand the controller light should be the \"sun\" of the situation, right?

If I try to see how to create a dynamic light, I read this:
Dynamic Lights:
Lights can have a dynamically changing color. If this is the case, read the \"Export Lights\" chapter or more info on how to define hue changes.

I got to the \"Export Lights\" chapter and....
This command allows you to export the light information that will be used by PS engine to render lights at different times in the day.

Select PlaneShift->Export Lights.

Please note that:

You must set the total frame number to 24 (from 0 to 23) or to 48 (from 0 to 47)
Every frame represents a certain time of the day: 1 frame for each hour starting from 0:00 am (midnight)
You can add an OmniLight called \"ambient\" that represent the ambient light. This light will not be exported as a normal light, the coordinates it has are not relevant.
The lights will be exported to a separate xml file, but those MUST be the same ones present when you exported the level.
The first 24 frames are used to get the light colors when the sun shines and no rain is present. The frames from 25 to 48 are used to get the light colors when the is heavily raining so the sun will be obscured by clouds and rain. The engine uses those extreme values to find the good ones when it\'s raining at 20%, 50%, etc...

If you set the animation length to be 24 frames, then shining sun condition and heavy rain condition will have the same light color values

I really don\'t understand where is the dynamic light referred.
How is it done in PS? The sun is a dynamic light or it is a positional one?
If it is dynamic (I don\'t have any other light depending from the \"controller\", since in Bronze Age there was no illumination of the outsides.. they were eventually using just torches) how should I create it?

Thanks in advance, and I am really sorry if this message is not appropriate, just tell me where to move it eventually.

Ary
AryHann

http://www.reflex.lth.se/culture/annelov - Virtual Annelöv -
Engine Dep. - One of Talad's Angels - Aka ww & Ahrijani's Goddess

zinder

  • Hydlaa Resident
  • *
  • Posts: 193
    • View Profile
(No subject)
« Reply #1 on: January 13, 2005, 06:55:56 pm »
I would suggest posting this in Development Deliberation or try to get a hold of a dev in the IRC channel (dont know offhand, search in the forum, has been repeatedly posted).

On your problem i can only say IIRC for the graphic engine used by PS every light, which should be able to change in an aspect, be it position,colour, brightness, etc, needs to be a dynamic light source. The opposite here is static lights which dont change at all.(if you change a static light you need to recalculate the lightmap for the scene or you get wierd effects.)

What now follows is mostly guessing from the excerpt you posted:
In PS setting a crystal is the sun. So im pretty sure you are right with the light source \"crystal\" as the sun. As for creating it as dynamic light i think all you need to do is to create this light source and the 24 frames for it, then export it with the export lights option and the script does the work of creating it as dynamic light in the mapfile.

AryHann

  • Veteran
  • *
  • Posts: 1244
  • WonderWoman
    • View Profile
(No subject)
« Reply #2 on: January 13, 2005, 07:32:01 pm »
Thanks!

I think I have understood a bit better how to do: the trick probably is in setting, on the 48 frames, the hue changes of the dynamical light depending from the frame.
I should create anyway an Omnilight, but with name crystal and with the hue changement.

Just one question: which is the role of the omnilight called ambient, considering that in the settings I have already the \"ambient\" light?
Is it for exporting the ambient light to light.xml? But, shouldn\'t PS read anyway the world file and see the
with the light?

Thanks,
Ary
PS: I am daily on the IRC channel of PS, but it\'s not easy to catch a not busy dev :-)
AryHann

http://www.reflex.lth.se/culture/annelov - Virtual Annelöv -
Engine Dep. - One of Talad's Angels - Aka ww & Ahrijani's Goddess

AryHann

  • Veteran
  • *
  • Posts: 1244
  • WonderWoman
    • View Profile
(No subject)
« Reply #3 on: January 17, 2005, 04:30:04 pm »
Problem solved, it was more an \"art\" issue, actually!

Ary
AryHann

http://www.reflex.lth.se/culture/annelov - Virtual Annelöv -
Engine Dep. - One of Talad's Angels - Aka ww & Ahrijani's Goddess