Is Sun in game like the Sun or is it spotlight?

Talk about Severance Blade of Darkness modifications and maps here. No tips or tech support questions please, use the forum above. Note that the game is rated 18 so some content may be unsuitable for younger readers.

Moderators: prospero, Ade

User avatar
cieply
Dragon
Posts: 330
Joined: Wed Jun 26, 2013 3:43 pm

Is Sun in game like the Sun or is it spotlight?

Postby cieply » Mon Aug 12, 2019 5:42 pm

Is sun in game (Sol, to avoid confusion, as Bladex.SetSun() is put in many maps in sol.py) like the Sun or is it spotlight?
I mean, are the Sol's rays parallel like the Sun's rays or they are radial like in spotlight and parallel rays effect is achieved by putting it in large distance so rays appear relatively parallel?
Reason I'm asking is I wanted to use it (emulate) as the Sun and/or spotlight/floodlight on the scene. Well, I'm not good in 3d modelling, I managed to make some very simple models and it would be much easier to do such job in game rather than render a scene in 3ds/blender. It's kinda mod but not for game purpose.
l'aria fresca,
vino puro, ...

User avatar
Sryml
Dragon
Posts: 131
Joined: Tue Aug 28, 2012 12:50 pm
Location: China
Contact:

Re: Is Sun in game like the Sun or is it spotlight?

Postby Sryml » Mon Aug 12, 2019 7:35 pm

In fact, Bladex.SetSun is just a special effect, it does not have lighting effects. You can understand it as an ornament.
Turning off "Sun" with the code Bladex.SetSun(0, 0.5, 0.5, 0.5) does not affect any lights.

As far as I know, there are only two kinds of light in the BoD game, sunlight and floodlights, and no spotlights.
Sunlight can only be set in LED map modeling:
1. You need to select all the areas, then set the properties -> Lights -> Exterio, select the color and direction (x, y, z). If your map does not have a sky environment, then this "Exterio" attribute will not take effect.
Image


2. The light bulb button, which only works for one area. It is a floodlight that you can place very far and set a very high intensity to form parallel light. For example, the map "Ice_M11", this window is divided into three areas, each with a light bulb.
Image


I opened the "ice_back.MP" file, which is its floor plan and bulb properties.

Image


When the MP file is compiled into a BW file, all the lights (exterior lights and bulbs) have been rendered fixed and you cannot modify them in the game.

-------------------------------------------------------------------------------------------------------------

The floodlight is an entity in the game, and its code is "Entity Spot". Create a light:
luz = Bladex.CreateEntity("Light1","Entity Spot",0,0,0)
luz.Color = 200,100,0
luz.Intensity = 6
luz.Precission = 0.1
luz.CastShadows = 0
luz.Visible = 0
luz.SizeFactor = 0
luz.Flick = 0


This is the setting of two kinds of light, I hope this will help you. :)
Last edited by Sryml on Tue Aug 13, 2019 3:20 am, edited 1 time in total.

User avatar
Sryml
Dragon
Posts: 131
Joined: Tue Aug 28, 2012 12:50 pm
Location: China
Contact:

Re: Is Sun in game like the Sun or is it spotlight?

Postby Sryml » Mon Aug 12, 2019 7:38 pm

--- Duplicate content, I empty it.
Last edited by Sryml on Tue Aug 13, 2019 3:15 am, edited 1 time in total.

User avatar
prospero
Ancient Dragon
Posts: 1725
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Re: Is Sun in game like the Sun or is it spotlight?

Postby prospero » Tue Aug 13, 2019 2:40 am

Sorry, I thought I had posted an answer but it seems to have vanished. :(

Fortunately Symrl has done the same but better. :D


You must place the light in a sector and then drag it to a point quite far away to a point where the light is supposed to come from.
It will continue to light that sector where you originally placed it, thus lighting the stained glass (in this case) and making the glass
appear lit from outside - which it isn't. It's solid behind the 'glass'. But the origin of the light will cast as if it were far away, shining
through the non-window and creating the shadows.

It's a neat feature that took me years before it figured it out. 8)

User avatar
Sryml
Dragon
Posts: 131
Joined: Tue Aug 28, 2012 12:50 pm
Location: China
Contact:

Re: Is Sun in game like the Sun or is it spotlight?

Postby Sryml » Tue Aug 13, 2019 2:47 am

Yes, prospero. I seem to have encountered the same situation, slow web pages and posting duplicate content. Sorry, I can't find the delete button. :?

User avatar
cieply
Dragon
Posts: 330
Joined: Wed Jun 26, 2013 3:43 pm

-

Postby cieply » Tue Aug 13, 2019 4:24 pm

I have been influenced by "Entity Spot", that's why I said "spotlight". Now I know that it's not exactly the same. So, since now, I will refer to it as entity-spot.
Is Sol just entity-spot light placed in distance to the map? If so than how far is it, so I know whether rays are, at least roughly, parallel?
What actually Bladex.SetSun(...) does? My tests show that it moves it and I can only guess what parameters are.


What I want to do is simulate something similar to this:


Apparently these coordinates are representing that situation:
lighting vector: w = [3, -2, -1]
camera: P = (0, 1, 0)
direction vector: u = [0, 0, 1]
pole 1:
h = 10
A = (5, 0, 40)
B = (5, 10, 40)
C = (20, 0, 25)
(...)

I won't pretend I get them. It's easier for me, and 99% of lay persons, to make it the less "3d expert" way - there will be source of light at some angle to the ground (Sun) and there will be single light (entity-spot) at same height, giving same angle of rays.
That's why I need to know if Sol gives parallel rays.
Last edited by cieply on Wed Aug 14, 2019 12:05 am, edited 1 time in total.
l'aria fresca,
vino puro, ...

User avatar
Sryml
Dragon
Posts: 131
Joined: Tue Aug 28, 2012 12:50 pm
Location: China
Contact:

Re: Is Sun in game like the Sun or is it spotlight?

Postby Sryml » Tue Aug 13, 2019 5:09 pm

What I want to do is simulate something similar to this:
https://zapodaj.net/images/8b6a1472e1fe9.jpg

Emm... :roll:
I can say that Bladex.SetSun(...) is completely useless, it is just a position fixed in the sky forever, it is a decoration in the map, like a table/chair/box... The first parameter is set 0 to make it off.

I think I understand the image you are showing. This effect can only be set in LED map modeling. It is the external lighting property of the sector, it is like the sunlight in reality.

So I said in the previous reply:
You need to select all the areas, then set the properties -> Lights -> Exterio, select the color and direction (x, y, z).

Note: All sectors are set to the same value, so that the angles of sunlight in all areas are the same, parallel. :)

User avatar
Sryml
Dragon
Posts: 131
Joined: Tue Aug 28, 2012 12:50 pm
Location: China
Contact:

Re: Is Sun in game like the Sun or is it spotlight?

Postby Sryml » Tue Aug 13, 2019 6:16 pm

The shadows generated by the external light of the sector(and sector bulb) are compiled in the BW file, and the shadow switch in the game menu cannot affect them "OPTIONS -> VIDEO -> Character Shadows".
So the performance of the sector lighting is very good, it compiles fixed shadows for the sectors.
It's different from real-time dynamic shadows in the game, because too many real-time shadows on objects will make the game slower.

Image

Because my pillars are objects, they are not sectors, so there are a lot of real-time shadows. With the shadows turned on, there are only less than 10FPS left in this scene. :? :?

User avatar
cieply
Dragon
Posts: 330
Joined: Wed Jun 26, 2013 3:43 pm

So

Postby cieply » Wed Aug 14, 2019 12:13 am

So, I have to create map and set exterior light that will work as my Sun.
l'aria fresca,
vino puro, ...

User avatar
Sryml
Dragon
Posts: 131
Joined: Tue Aug 28, 2012 12:50 pm
Location: China
Contact:

Re: Is Sun in game like the Sun or is it spotlight?

Postby Sryml » Wed Aug 14, 2019 3:48 am

Yes, cieply. You will feel how amazing this is. It was not until last year that I understood how sunlight works. :D

In the game, in order to simulate reality. The sunlight that appears out of thin air may be incredible because there is no sun in the sky.
So there is a way to add a sun decoration Bladex.SetSun(1, x,y,z). x,y,z are consistent with the direction of the external light in the LED modeling. The end result looks like the sun in the sky is illuminating the entire map.


Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 3 guests

cron