• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Level Design Issue of baking and map help

Bonedaddie

Member
May 31, 2015
5
0
Hello,

I am near completion on this map I've been working on and I have some questions regarding Baking and other SDK functions.

First, I am using some CHR_materials on certain static meshes and they don't bake properly. Here are a few examples

https://imgur.com/a/yO10A

There are many more littered around the map behaving the same way. A lot render and bake, while the majority don't. Is there any particular reason why?
Are there any post answering this and what can I do to help with this problem?
It seems everytime I bake, different objects bake each time. Almost all lights were not rendered, then a few, and now a lot more. But some other de-rendered too (I'm using other CHR_mats too that baked initially but now don't show up). Any rules to baking of what to do and what not to do?

Second, I've had a lot of what i call, "paranormal" activity on my map. Like invisible walls that would block areas for no reason. No matter what I did, i could never find out what was causing it. Then, it suddenly vanished, as if it never existed, giving me these headaches of wasted time and unsolved mysteries.

Lately, I have this "volume" of some sort that makes collision with weapons. It seems to have a slope, higher in some areas, smaller on others (maybe the top of a giant sphere?) I can shoot through it fine, but it stops thrown weapons

https://imgur.com/a/atDdn

This "volume" makes weapons stay in mid air as if it landed on something. That area never used to have that problem and I can't seem to find anything that is causing it.
Does anyone know what this is or why it is happening?

Lastly, I have some general questions about SDK.
Does precomputed visibility have to be rebuilt every single time I rebuild lighting? It takes a looong time to rebuild PCV for me. What does the "incremental build" option do?

Any way to optimize cpu/gpu on maps? I notice I get a massive lag spike at the start of the map, probably from loading certain static meshes and BSP. After that spike, it plays fine, but that makes me worried about possible performance issues with 6 players. Would it be fine? Are the Benchmark sequences that TW does on their maps for this reason? Is it worth doing?

I am adding custom music to the map (the music for kf1). I got the music working partially. It switches between waves and everything. Its just loud as hell. I can't change the volume ingame probably because the wem files and soundbanks I made arent directly being called by the actual KF2 Wwise soundbanks and set the volumes to "ingame" global state (or maybe something like that). Is there anyone that knows how to access that? Or any posts about making custom music on maps?(not replacing music)

Also, public opinion, I was debating if I should add music to the dance areas to possibly incentivize people to hold out in those deathtraps(but hey, might be easier in this game compared to kf1). Certain sections would play certain music genes by interacting with the turntables. Is it not worth doing at all, or maybe release a version of the map with the music? Its a Bedlam remake. I already have the ideas for the tracks, most of which is copyrighted music. Yay or Nay?

If anyone could reply with help or suggestions, that would be much appreciated. Thank you!
 
Bonedaddie;n2308277 said:
baking issues

It's hard to tell from the screenshots but the white and blue squares are usual an indication of materials not being cooked into the map. Map building falls into 2 categories from experience:

Baking - what we do 99% of the time to build lights, volumes, splat maps, etc (The Build All button)

Cooking - Final stage build step (its the little orange fire icon on the same line as the build icons). This is often not needed honestly for most mappers - and I believe the workshop upload tool does this when its uploaded. But if you are using custom Parent Materials (Not Material Instant Constants/MIC). Then you need to Bake and then Cook a map so the Shader Cache is included into the map.

If you are modifying chr materials it could be that the SDK/Game isn't liking you doing that and referencing those packages using them in that way. Or you may have copied and/or modified them unconventially. Ive had similar issues with the flashlight material for some reason.

If this is the case you will need to do a cook.

Now cooking is completely broken with the SDK from experience. Custom Parent Materials (PM) are rarely/never included into a map when cooking because it doesn't successfully include the shader cache. So when you play the map in the game they will still pop up blue and white. But it is still important for building that shader cache.

One guarentee way of including PM and those dodgy materials is to upload it with the workshop tool, download it and play it (just keep the map private). For some reason the SDK just doesn't know how to include shader cache into the map - but the Workshop tool can. I'd love to know why, and if anyone has further insight on it please speak up :p

Additionally (and yes this is convolted and confusing...), you should delete the shader cache after you upload and before you play. Otherwise weird stuff happens.

One other piece of advice - if it is a big build (I have ones that go on for 30mins). Let it build, dont do anything with the computer - let the SDK build without interruptions. Go for a walk or something - I have gotten varying results from using the comp while playing KF2 while a map builds (lol).

invisible wall stuff

Make sure to double check all sides of the area you are running into. I know its silly but sometimes this gets me because one face doesnt have normals to render lol.

If you know 100% there isn't anything, Click Quick flags menu (the little arrow next to the viewport mode) > Show > Collision Modes > Rigid Bodies. And have a look to see what the actual collision looks like for the mesh.

Also this one had me stuck for a good hour. Make sure there are no FOLIAGE ACTORS. Like jesus, these are terrible and hard to know what to look for if you didn't know it was there. They have invisible and basically hidden collision - like they will block projectiles (RPGS and the like). They are very easy to add by accident as well - when you click on Replace with "...." the foliage actor is right below the static mesh.

Lately, I have this "volume" of some sort that makes collision with weapons. It seems to have a slope, higher in some areas, smaller on others (maybe the top of a giant sphere?) I can shoot through it fine, but it stops thrown weapons

If it is a KFBlockingVolume (or regular blocking volume), it probably has 'block rigid bodies' enabled. Turn it off.

Does precomputed visibility have to be rebuilt every single time I rebuild lighting? It takes a looong time to rebuild PCV for me. What does the "incremental build" option do?

Dont bother with the PCV - its a waste of dev time - very minimal FPS boost from the additional build time it adds. Additionally it has unwanted behaviour behind transparent meshes as well. I'm not saying that its completely pointless - but if you are constantly building your map, just remove it. Do it at the 100% final step (even then, its not even worth it imo).

Any way to optimize cpu/gpu on maps? I notice I get a massive lag spike at the start of the map, probably from loading certain static meshes and BSP. After that spike, it plays fine, but that makes me worried about possible performance issues with 6 players. Would it be fine? Are the Benchmark sequences that TW does on their maps for this reason? Is it worth doing?

Dont know why TWI benchmarks - probably to determine hotspots for fps drops to investigate why. If you are getting giant lagspikes its probably because you might be rendering the whole map - I would look into modifying Render distance for specific static meshes to optimize your map - for areas that are definately not visible.

Also, public opinion, I was debating if I should add music to the dance areas to possibly incentivize people to hold out in those deathtraps(but hey, might be easier in this game compared to kf1). Certain sections would play certain music genes by interacting with the turntables. Is it not worth doing at all, or maybe release a version of the map with the music? Its a Bedlam remake. I already have the ideas for the tracks, most of which is copyrighted music. Yay or Nay?
If its copyrighted, dont do it.
 
Last edited:
Upvote 0
Thank you so much for the reply. It was very helpful!

Delta69er;n2308281 said:
Cooking - Final stage build step (its the little orange fire icon on the same line as the build icons)

This is what I meant (didn't know the difference between terms). My mats still end up like that. I am going to try what you said and play it from being uploaded on the workshop and see if that helps

Delta69er;n2308281 said:
Make sure there are no FOLIAGE ACTORS

This was definitely my issue with invisible walls. I saw them in my Scene tab in the content browser and deleted them some time ago. Later realized the wall problem was gone and didn't know what I did. Thanks, this confirms that was the issue.

Delta69er;n2308281 said:
If it is a KFBlockingVolume (or regular blocking volume), it probably has 'block rigid bodies' enabled

This isn't a volume, or at least, I don't know if it is. I check every volume nearby and none had rigid body. I even deleted multiple volumes to see if it would work, but it didn't.

https://makeagif.com/i/W9V0w9
https://makeagif.com/i/vT6VCM

[Sorry for low quality gifs. Hope they work] If you notice between the first and second gif, the slope gets more shallow, eventually hitting the ground. Seems to by highest at the start of the first gif throughout the entire underground area, then tapers off into the other entrance/exit areas, shown in 2nd gif or picture prior.
I've check in different viewports, viewmodes, looked at all options on Flags and I cannot seem to find anything. Only suspicious object is an InstancedFoliage actor, but I think those are defaulted into maps. Maybe I am looking in the wrong areas or something. Maybe something bigger elsewhere. idk
 
Upvote 0
Bonedaddie;n2308339 said:
Thank you so much for the reply. It was very helpful!
Glad it was helpful!


This is what I meant (didn't know the difference between terms). My mats still end up like that. I am going to try what you said and play it from being uploaded on the workshop and see if that helps
Yeah even when you cook in the sdk and then play it in the game you will still get the blue and white stuff (or at least I do). The only solution I've found is to upload to workshop and download the map.

When you cook the map in the SDK and get yellow warnings - they will often be along the lines of 'failed to include localshadercache in file' or something. If that happens yeah you will get the default material popping up when you play. Sometimes you get lucky and it is included though.

If it doesn't, the workshop tool often manages to include the localshadercache - you'll see a message before it does the actual upload along the lines of 'including localshadercache'

Let me know if the upload to the workshop does work though.

This isn't a volume, or at least, I don't know if it is. I check every volume nearby and none had rigid body. I even deleted multiple volumes to see if it would work, but it didn't.

https://makeagif.com/i/W9V0w9
https://makeagif.com/i/vT6VCM

[Sorry for low quality gifs. Hope they work] If you notice between the first and second gif, the slope gets more shallow, eventually hitting the ground. Seems to by highest at the start of the first gif throughout the entire underground area, then tapers off into the other entrance/exit areas, shown in 2nd gif or picture prior.
I've check in different viewports, viewmodes, looked at all options on Flags and I cannot seem to find anything. Only suspicious object is an InstancedFoliage actor, but I think those are defaulted into maps. Maybe I am looking in the wrong areas or something. Maybe something bigger elsewhere. idk

I wouldn't have a clue mate, its really hard to tell from the gifs and even videos probably wouldn't tell me much more - if you upload it to workshop I can have a look into it for you if you add me as a friend - that is if youre okay with someone looking at your work before it being publishable.

My only other guess would be that there might be a hidden brush you may have added by accident or their might be broken collisions on some meshes.

Maybe someone else might be able to have a guess at what might be causing it.
 
Upvote 0
1. Try hitting ALT+C on your keyboard. It will outline the collision bounds of all meshes in your map, handy to quickly tell if there's strange collision going on.

2. Try hitting ALT+W to hide all static meshes in your map and make sure Volumes are visible (can be toggled on and off with the O key on keyboard). Are there any volumes in the troublesome area?

3. By default, blocking volumes will collide with Flex. In most cases you should disable this (Collision -> Collision Component -> Flex Asset) as it may cause things such as blood, gore and even some dynamic actors - including thrown weapons and dosh - to collide on the flex channel and float in mid air.

4. You should always optimize your map. No excuses. I know it's tedious work and not as fun as filling up your map with pretty things, but no matter how cool or beautiful a map you make, nobody will like it or play it if they have 20 FPS. Optimization is a big subject though, I'm working on doing a video guide but the most basic (and arguably most effective) is what Techuser suggests; start tweaking draw distance on things in your map. Ideally everything. Every, single, thing. It's a headache, I know, but players will love you for it and you should feel proud for doing it :)
 
Last edited:
Upvote 0