LED Question

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: Ade, prospero

User avatar
Trinitron
Dragon
Posts: 307
Joined: Sat Jul 12, 2008 5:53 pm
Location: Russia

Re: LED Question

Postby Trinitron » Sun May 14, 2017 11:42 am

LED lags. Did someone had such problem? 3D-view lags a lot in some parts of map, but in game all run well.
You see lags like what? Can you show lag as IMAGE.

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Re: LED Question

Postby Tomash » Sun May 14, 2017 2:33 pm

FPS drops

livid
Whelp
Posts: 17
Joined: Sat Jun 03, 2017 11:00 am

Re: LED Question

Postby livid » Sat Jun 24, 2017 3:20 pm

Hi, I have a couple of questions related to LED:

Since I added a second set of textures to a map via "Import textures..." (maybe this is the problem), LED works extremely slow in that map. With that I mean, taking up to 20 seconds to load the 3d view in a map which is just a couple of rooms, 5 seconds to open different LED windows, close LED, save...

Also, how exactly do the Lights tab work? No idea for Flat or Ambient. And for exterior light, is it like the sun? If so, can I just ignore it if I add a SetSun function to the map? I have not found a tutorial that talks about it thoroughly.

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Re: LED Question

Postby Tomash » Sun Jun 25, 2017 12:25 pm

About lights

Flat Light seems doesn't work

Ambient Light is color of shadow. The air in shadowed places has that color and the air in enlighted places has sum of Ambient Light color and color of source of light.

External Light is color of light casted from skybox (NULL texture). The position of External Light determines the orientation of shadows. External light has some values in every sector but it actually appears only in sectors which can be enlightad from skybox

PS. tricky thing in External Light. The sectors in LED have coords X,Z,Y so the 2nd is Z(height). But External Light has coords -(minus)X,Y,Z so the 2nd is Y and X has opposite sign

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Re: LED Question

Postby Tomash » Sun Jun 25, 2017 12:43 pm

I have rather big open area on the map. In game with "character shadows=off" all run well. But with "shadows=on" game lags a lot. How can I optimised map in LED to fix it? Should I reduce the number of sectors/portals or use different External Light positions in different parts of that area? Or may be just screw the idea of sunlit area and make it foggy?

livid
Whelp
Posts: 17
Joined: Sat Jun 03, 2017 11:00 am

Re: LED Question

Postby livid » Sun Jun 25, 2017 6:58 pm

Thanks Tomash :)
Let's hope Prospero knows the answer to your problem because I'm a LED newbie. Anyways I'll say something that might or might not be useful. I've read that non-convex sectors will lag your map because the compiler will try to split the sector and it may do so badly, so the light has to go through a lot of portals, effectively causing lags (I guess it's the same if you have a lot of portals from convex sectors). Check if you have made a non-convex sector by accident, or if you have a really big amount of sectors.

I have a new question. From time to time, the LED toolbars dissapear for no reason. However, I fix it by deleting the folder and extracting a new one from BladeTools. It looks like this.
Image
As you can see, it's impossible to work with that. It hasn't been a big problem because I would solve it quickly by creating a new one as I said, but now it doesn't work... It's always like that. I hope someone has had (and solved) that problem and can help me.

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Re: LED Question

Postby Tomash » Sun Jun 25, 2017 8:51 pm

I usually fix that problem by deleting a single file Led_d.INI somewhere in WINDOWS folder.

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

Re: LED Question

Postby prospero » Mon Jun 26, 2017 2:44 am

The LED blanks out now and then. I have never been able to figure out why, I think it's something to do
with closing the file and not saving. :?: Just remember where the .ini file is. :D

The sun flare is purely cosmetic. Won't affect the performance at all.

btw. All the RAS maps create the sun with the sol.py file. It's best to put the code in DefFuncs.py.
Next time you play a RAS map with the sun in it, save the game and reload and you will notice the
sun is gone. :roll:

As for performance issues, it's a question of design. The more portals (sector faces that join) the light has to pass though
the more work to calculate the shadows. There are tricks to improve performance. Steps are bad laggers. If you do a flight
of 20 steps by making sectors that go up to the 'ceiling', then you have a lot of portals for the ext light to pass though. If you
a make each step so it only goes up the hight of the bottom of the next step up and the slope each step downwards, you can
put one big sloped sector to cover them all. :wink: Doesn't matter so much in inside rooms.
Arches in sunlight are best avoided. On the whole, avoid too many 'fiddly' bits. Textures have no affect on performance.

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Re: LED Question

Postby Tomash » Sun Jul 02, 2017 4:14 pm

Thanks Prospero. I optimised the map so now it works well.

Kn1MS
Whelp
Posts: 20
Joined: Sun Apr 08, 2018 6:26 pm

Re: LED Question

Postby Kn1MS » Sun Apr 08, 2018 6:47 pm

Hello there. There are a few problems I can't find any solution for. So... I'll be glad if there were someone who could help. :D
1. 3D viewer (OpenGL) doesn't work no matter what I try to do. There's nothing to do with atmosphere (it has 0.002 density) or textures. I'm 100% sure of it because I can run the map in the game and there are absolutely no problems, everything works fine.
2. How do you make any non-flat surface (or slopes, I don't know if there's any difference). I tried to do some awnings by making elliptic floors, but it's extremely inconvinient and there's no way to calculate at which height the top point of that "slope" will be.
3. When I put some scripts into the map folder and then try to run it from BOD, the game tells me that "player1" is not defined in pj.py. Well, I couldn't find any tutorials about it so I took such file from other map (the first one for the knight campaign), changed coordinates (I think those 3 numbers are coordinates...) to 0,0,0 and... nothing changed. The error still appears and crashes the game. I tried executing this script from cfg.py but it didn't work. So far this problem concerns me the most.

Thanks for attention! I hope this forum still lives... at least a little bit. :D

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

Re: LED Question

Postby prospero » Sun Apr 08, 2018 7:18 pm

Hi Kn1ns.

The OGL viewer is extremely tricky, but it does work.
When you recompile the map you must first run it in the game before you can use the viewer
in the LED. If you don't do this the viewer is referencing an older version. So if you change something
in the .mp file these changes will not show in the viewer until the map has been compiled and run in
the game. Yeah, it is confusing... :o

If you get a black screen the camera will be in the solid area. The coordinates can be quite hard to work out.
I've been doing it for years and it's still mostly trail and error. When you do get a free view, make a note of the
coords so you can do it again.


Slopes: Select a sector you want to slope. Remember the sector number. Then pick the Edge Selector tool. Click on
an edge in the sector. You may get a pop-up list of sectors to pick from. Tick the one you wish to slope. The edge will
turn a bit thicker than the rest. R-click on the edge and pick 'Slope'. You have an option of 'Floor' or 'Ceiling'. Then click
a vertex in the sector that isn't on the selected edge. You can then change the height of this vertex and all the others
will adjust to form a plane. You can't slope surfaces that have elliptic or circular modifiers applied to them. Also, if you
move anything in a sloped sector later it will revert to flat.

The "Player1 not declared...." message is a catch all error. Nothing to do necessarily with Player1 or the pj.py file.
It's the result of a code error somewhere. These take a bit of hunting down, which is why it's not a good idea to do a
lot of editing in one session. Sometimes the console will give you the answer, or at least a clue.

Have you got Debug mode enabled? Console? You can work without them, but it's very difficult. :roll:

Hope that's some help. :D Any other probs, shout up.

Kn1MS
Whelp
Posts: 20
Joined: Sun Apr 08, 2018 6:26 pm

Re: LED Question

Postby Kn1MS » Sun Apr 08, 2018 7:36 pm

The OGL viewer is extremely tricky, but it does work.
When you recompile the map you must first run it in the game before you can use the viewer
in the LED. If you don't do this the viewer is referencing an older version. So if you change something
in the .mp file these changes will not show in the viewer until the map has been compiled and run in
the game. Yeah, it is confusing... :o
Ugh, that's really tricky. I think it's easier to check the map in-game if it is small enough.
If you get a black screen the camera will be in the solid area. The coordinates can be quite hard to work out.
I've been doing it for years and it's still mostly trail and error. When you do get a free view, make a note of the
coords so you can do it again.
Yeah I always get a black screen (https://puu.sh/zYWTG/1c4e131a3f.png, this). That's pretty strange, because I tried lowering the floor below 0,0 coordinate and it didn't help. Moreover, the viewer works with other maps (I checked the one that was packed with LED, called "chess"). I found it more simple to just look at the map in the game.
Slopes: Select a sector you want to slope. Remember the sector number. Then pick the Edge Selector tool. Click on
an edge in the sector. You may get a pop-up list of sectors to pick from. Tick the one you wish to slope. The edge will
turn a bit thicker than the rest. R-click on the edge and pick 'Slope'. You have an option of 'Floor' or 'Ceiling'. Then click
a vertex in the sector that isn't on the selected edge. You can then change the height of this vertex and all the others
will adjust to form a plane. You can't slope surfaces that have elliptic or circular modifiers applied to them. Also, if you
move anything in a sloped sector later it will revert to flat.
Awesome, thank you a lot! I probably would've never figured this out myself. :D
Have you got Debug mode enabled? Console? You can work without them, but it's very difficult. :roll:
I don't really know how get these things enabled. :roll: Is it written somewhere? I could've missed that, I guess...


Kn1MS
Whelp
Posts: 20
Joined: Sun Apr 08, 2018 6:26 pm

Re: LED Question

Postby Kn1MS » Sun Apr 08, 2018 8:19 pm

Thanks!
It seems that there's something wrong with folder destination.
Image
Ugh, the full path to that file would be "c:\Games\BladeofDarkness\Maps\FirstMap\Pak\pf.dat". Should I add one more "..\\" at the beginning?

Upd: It didn't work...

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

Re: LED Question

Postby prospero » Sun Apr 08, 2018 8:29 pm

:P When you get the console working you will find this useful....


http://www.petrbnsfineart.com/bladestuf ... utfile.zip

Replace the existing file Lib/ConsoleOutput with theis file and the console output will
be saved as DeBug.txt in the map folder (The one in the main game folder, not the Bodloader)

The console is sometimes hard to follow when a lot of info is streaming though. This allows you to
examine the info even after the game is closed.


Also..... When building a map it is essential to delete the Pak folder in the map every time you make changes.
You can do this manually, or use this code added to cfg.py.

Code: Select all

import os try: os.remove("../../Maps/MyMapName/pak/BODPak.dat") os.remove("../../Maps/MyMapName/pak/pf.pak") print"Pak removed" except: print"Pak NOT removed" pass

***edit. You beat me to it. :D Could be missing import os that is the trouble


Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 3 guests