UFO:Alien Invasion

Development => Mapping => Topic started by: ShipIt on November 30, 2011, 11:44:02 am

Title: need advice
Post by: ShipIt on November 30, 2011, 11:44:02 am
Here are some problems I met while testing my map. Maybe these are already pointed out or even solved somewhere. Maybe its too simple to be worth mentioning or maybe its the wrong place to ask. If so, please feel free to flame.

1. Some of my func_door are mirrored at 0,0,0 looking like this ingame.
(http://www7.pic-upload.de/thumb/30.11.11/seqquei6jrq4.png) (http://www.pic-upload.de/view-12149329/ufo04.png.html)

2. If I set the reverse-flag to a door this works fine, but ingame my soldiers will not walk through these doors. Reseting the flag maybe causes problem 1.?

3. For my soldiers it is possible to open doors located on the other side of a wall?

4. The undergrund/cellar of the building should be dark. I havent set any lights yet. But it looks more like Miami Beach at noon.
(http://www7.pic-upload.de/thumb/30.11.11/3pebfap92z3t.png) (http://www.pic-upload.de/view-12149228/ufo06.png.html)

Reason for editing : attached map
Title: Re: need advice
Post by: H-Hour on November 30, 2011, 12:22:41 pm
1. Some of my func_door are mirrored at 0,0,0 looking like this ingame.

My first guess is that you copied and pasted the doors. I believe this might cause problems in the game. You may need to either try Edit > Duplicate instead, or rebuild each door from scratch. Another guess is that you're missing an origin brush or something like that...

4. The undergrund/cellar of the building should be dark. I havent set any lights yet. But it looks more like Miami Beach at noon.

If you post your map I'll compile and see if I can replicate.

Sorry, can't help with the other questions.
Title: Re: need advice
Post by: ShipIt on November 30, 2011, 01:26:49 pm
I put the map into my first post. Would be nice if you could check my sun-problem.

Following the advice in the forum I try to not duplicate any func_ or parts of it. So it should be build up from scratch always.

Maybe this is a problem with my ufo2map? When I switched to 2.4dev, iirc, the ufo2map there didnt work at all. So I still use the one from 2.3.1, wich starts as -ufo2map 1.2.5-.
Title: Re: need advice
Post by: H-Hour on December 01, 2011, 11:57:16 am
I compiled and got the same lighting results. I tried tweaking some of the levelflag settings to see if it helped, but on recompilation the bottom is still lit up. I'm not sure why this is happening. Hopefully mattn or someone has some ideas...

Also, I noticed you have a lot of windows as func_breakables. This is, of course, very cool. Unfortunately, for now func_breakables cause considerable lag in our pathfinding. This is why your map takes so long to load. And if you try to shoot them out, you'll probably notice a signicant pause as the pathfinding is recalculated.

Maps can take a few func_breakables, but not so many as you have. I would recommend using windows that don't break for now. If we ever get the pathfinding/func_breakables issue worked out, we can always turn them into func_breakables later.

Title: Re: need advice
Post by: H-Hour on December 01, 2011, 12:09:24 pm
Couldn't load textures/tex_mansion/wall064_a

Still missing that one. If the file has a compatible license, can you tell me the license, attach the file, and I'll add it to the repo here:

textures/tex_buildings/wall064_a

That means you'll need to change the texture location in your map file. (Tools > Find/Replace Texture)
Title: Re: need advice
Post by: ShipIt on December 01, 2011, 04:06:09 pm
I compiled and got the same lighting results. I tried tweaking some of the levelflag settings to see if it helped, but on recompilation the bottom is still lit up. I'm not sure why this is happening. Hopefully mattn or someone has some ideas...

Thank you for putting your time into this. There is always hope, so ...
Had you a similar problem with the doors as me after compiling it?

Also, I noticed you have a lot of windows as func_breakables. This is, of course, very cool. Unfortunately, for now func_breakables cause considerable lag in our pathfinding. This is why your map takes so long to load. And if you try to shoot them out, you'll probably notice a signicant pause as the pathfinding is recalculated.

Maps can take a few func_breakables, but not so many as you have. I would recommend using windows that don't break for now. If we ever get the pathfinding/func_breakables issue worked out, we can always turn them into func_breakables later.

Will fix this before my next update. (The time the map took loading I´ve always used to do my job, so it was not completely wastet. ;D)

Couldn't load textures/tex_mansion/wall064_a

Still missing that one. If the file has a compatible license, can you tell me the license, attach the file, and I'll add it to the repo here:

textures/tex_buildings/wall064_a

That means you'll need to change the texture location in your map file. (Tools > Find/Replace Texture)

I made this by simply cutting a piece off of base/textures/tex_mattn/wall64 and didnt replace it yet. Sorry, but its still wip. If it can be used, good. Maybe the naming isnt very smart because of _?

Thank you.
Title: Re: need advice
Post by: H-Hour on December 01, 2011, 07:20:11 pm
Had you a similar problem with the doors as me after compiling it?
yes
I made this by simply cutting a piece off of base/textures/tex_mattn/wall64 and didnt replace it yet. Sorry, but its still wip. If it can be used, good. Maybe the naming isnt very smart because of _?

All of our textures must be scaled at divisions of 2 (16/32/64/128/256/512/1024). Try the attached. Shoudl work identically to yours except it will line up on grid better. Place it at the following location:

base/textures/tex_mattn/wall064st.png

I have just committed it to that location so n futuyre versions of the game it will work fine.
Title: Re: need advice
Post by: ShipIt on December 01, 2011, 07:24:44 pm
I really hope I can give something back soon.

Thank you.
Title: Re: need advice
Post by: ShipIt on January 07, 2012, 10:29:13 am
Just want to bump this, because i still have the same problems.

And, while testing and improving, looking at this

(http://www9.pic-upload.de/07.01.12/4q965g6ssnm.png) (http://www.pic-upload.de/view-12545385/ufo02.png.html)

or this

(http://www9.pic-upload.de/07.01.12/9g3udzt2smym.png) (http://www.pic-upload.de/view-12545402/ufo04.png.html)

really wants to make me cry.
Title: Re: need advice
Post by: Sandro on January 17, 2012, 04:37:54 pm
Another guess is that you're missing an origin brush or something like that...

Indeed. Careful inspection shows that entities 163 and 164 do not have the origin brush.
Title: Re: need advice
Post by: ShipIt on January 17, 2012, 06:12:10 pm
http://sourceforge.net/tracker/?func=detail&aid=3463848&group_id=157793&atid=805242

http://astraljava.kapsi.fi/a_door_in_grass.png
Title: Re: need advice - weird lighting
Post by: ShipIt on January 23, 2012, 08:02:49 am
First picture you see the top level (eight - not seven!) of the main building :

(http://www7.pic-upload.de/23.01.12/k7b8fu5n3suh.png) (http://www.pic-upload.de/view-12723245/ufo30a.png.html)

Second picture you see the shadows from picture above, drawn on level two (not one!) Same goes for level one (not zero), but no pic of this.

(http://www7.pic-upload.de/23.01.12/rya3q3ifq3j.png) (http://www.pic-upload.de/view-12723278/ufo31a.png.html)

Putting a lightclip-brush on level 2 does not anything about this.
Title: Re: need advice
Post by: H-Hour on January 23, 2012, 06:47:34 pm
Idea for testing. First, back up your map (or use GIT to revert if you're comfortable doing that).

1. Try removing the big glass poly that covers all of those, then recompile and see if the problem is there.

2. Try removing all level 8 brushes, then recompile...

3. Try removing all func_groups, then recompile...

Basically, try stripping out things to see what might be causing it. I've never seen so many func_groups in a map, so that could be something to remove. The fact that the level 8 brushes are casting shadows is wierd, so try removing them.

If you manage to get the shadows casting properly, then you can start narrowing down from there...
Title: Re: need advice
Post by: ShipIt on January 23, 2012, 07:34:30 pm
Thanks, H-Hour. I will check this out asap, but I have a similar problem with the Heli hangar (mansion_craft_ufo_empty.map), wich has only 3 levels.

Also it seems like the lights I have put in at levels 1 and 2 of these maps do not work at all. Weird.
Title: Re: need advice
Post by: ShipIt on January 23, 2012, 09:14:57 pm
I think it is all about the func_doors/origin brushes. Look at mansion_coast_east_u.map.

From above it looks good. No problems.

(http://www7.pic-upload.de/23.01.12/dqbmaon7vt7o.png) (http://www.pic-upload.de/view-12731168/ufo08.png.html)

Second level, all right :

(http://www7.pic-upload.de/23.01.12/fog9fcfltjxn.png) (http://www.pic-upload.de/view-12731199/ufo09.png.html)

Level 1 you see the "weird lighting problem". There is a door ( too dark to see maybe, but still there).

(http://www7.pic-upload.de/23.01.12/w2e9qm89wuet.png) (http://www.pic-upload.de/view-12731133/ufo10.png.html)

I removed the door, problem solved.

(http://www7.pic-upload.de/23.01.12/sh97bluhmf5.png) (http://www.pic-upload.de/view-12731255/ufo07.png.html)

Title: Re: need advice
Post by: ShipIt on January 24, 2012, 09:11:56 am
I made some further investigations, first removing doors from all tiles. There is one exception though, as mansion_craft_drop_empty.map has doors on level 1, but no weird lighting. So I did not remove the doors there.

Success. The seams are part of an other problem by the mapcompiler.

(http://www7.pic-upload.de/24.01.12/3k5wncwytgrb.png) (http://www.pic-upload.de/view-12734498/ufo11.png.html)

(http://www7.pic-upload.de/24.01.12/b2w19ycxhd.png) (http://www.pic-upload.de/view-12734533/ufo12.png.html)

Third pic shows the doors from one tile mirrored on the center of the assembled map.

(http://www7.pic-upload.de/24.01.12/4p7eu3sp5s2x.png) (http://www.pic-upload.de/view-12734561/ufo13.png.html)
Title: Re: need advice
Post by: ShipIt on January 24, 2012, 10:23:01 am
lights are affected, too.

first Pic : heli-hangar in UFORadiant, showing the lights.

(http://www7.pic-upload.de/24.01.12/bi164ahhinh3.png) (http://www.pic-upload.de/view-12734678/ufo00.png.html)

Second picture : the night version of the map. Not so good.

(http://www7.pic-upload.de/24.01.12/tkglmgtoayk.png) (http://www.pic-upload.de/view-12734716/ufo01.png.html)

After this I replaced all origin textures. No effect.
Next I removed the func_door in level 3. No effect.
I put the door in level 3 back and removed the func_door in level 2. This looks as it should now, I think.

(http://www7.pic-upload.de/24.01.12/lae8uqhtfeu2.png) (http://www.pic-upload.de/view-12734799/ufo02.png.html)

I put the door in level 2 back and remove the func_doors in level 1. Again lighting seems ok, as in the third pic.
Putting doors on level 1 back for cross-checking again shows the problem I started with.
Title: Re: need advice
Post by: H-Hour on January 24, 2012, 11:37:28 am
Tip for getting rid of light bleeding on the edges of the tile seams: Create a lightclip brush that covers the edges by extending into the space where another tile will be. The lightclip will not effect any other tiles (it is only used when the map is compiled).
Title: Re: need advice
Post by: ShipIt on January 24, 2012, 12:31:02 pm
Tip for getting rid of light bleeding on the edges of the tile seams: Create a lightclip brush that covers the edges by extending into the space where another tile will be. The lightclip will not effect any other tiles (it is only used when the map is compiled).

You are right. I will do this once the func_door problem is solved by the devs.

It still is a bug in the mapcompiler. The same happens on e.g. walls, causing a small strip of light that should not be there.
Title: Re: need advice
Post by: ShipIt on February 03, 2012, 01:12:19 pm
@sandro

I attached the sample map from above here.

Thanks.

Title: Re: need advice
Post by: DarkRain on March 22, 2012, 04:01:25 am
I found - completely by accident - a secondary (or maybe primary?) cause for this lightning problem: levelflags, yes levelflags.

Using your sample map, setting all (1-8) the levelflags for level 1 brushes (they have only level 1 in your map) seems to fix the problem (see the first screenshot attached) no need to remove the door, furthermore 'fixing' the levelflags for some brushes only, fixes the lightning for that brushes only as well (see the second screenshot).

I have not the slightest clue of how func_doors (and possibly lights?) and levelflags interact to cause this, but here it is, in case it helps (either as a workaround or to find a fix).
Title: Re: need advice
Post by: ShipIt on March 22, 2012, 07:04:10 am
Hopefully this will help to bring darkness into the light.  :)
Title: Re: need advice
Post by: Mattn on March 22, 2012, 09:30:38 am
i didn't had a chance to try this out yet, but running either ufo2map -fix or using the attached patch for ufo2map might fix the problem if it's really levelflag related.
Title: Re: need advice
Post by: ShipIt on March 22, 2012, 03:26:48 pm
I have no idea what to do with a .diff file. Sorry, I need some advice for this.
Title: Re: need advice
Post by: DarkRain on March 22, 2012, 09:58:53 pm
@ShipIt: You apply it to your git checkout
Code: [Select]
git apply /path/to/fix.diff
^^ while in your ufoai checkout, then you recompile ufo2map and try it

Unfortunately the supplied patch doesn't fix the problem - at least for me -, also ufo2map -fix will not change the levelflags in this case as they are valid.

In this case the level 1 brushes that show the problem have only the level 1 flag set - which seems fine as they end up being hidden by other brushes in upper levels - but it seems the lightning breaks in brushes optimized that way when there is a func_door in the same level anywhere on the map.*

Incidentally I think ShipIt is the first one to try and optimize hidden brushes that way, afaik other mappers set the levelflags of the level where the brush is and all the levels above that, even if they are hidden in the upper levels (so an interior wall at say, level 3 would have levelflags 3-8 even if it isn't visible from levels above 3)

*edit: except on mansion_craft_drop_empty.map, maybe because the only brushes in the upper levels are lightclips in this one... all this evidently needs more testing.
Title: Re: need advice
Post by: ShipIt on March 23, 2012, 06:51:12 am
*edit: except on mansion_craft_drop_empty.map, maybe because the only brushes in the upper levels are lightclips in this one... all this evidently needs more testing.

At the time I was writing this ^ the _craft_drop_empty.map was like all the others. It was split later on.
Title: Re: need advice
Post by: H-Hour on March 23, 2012, 09:28:52 am
Incidentally I think ShipIt is the first one to try and optimize hidden brushes that way, afaik other mappers set the levelflags of the level where the brush is and all the levels above that, even if they are hidden in the upper levels (so an interior wall at say, level 3 would have levelflags 3-8 even if it isn't visible from levels above 3)

No, there is a lot of optimization like this in other maps. If it is done right, you should never notice in-game. But doors are a fairly recent invention, so very few maps had them.