Die to Survive - Railshooter

Thank you @TechLord. The models i build are a little to much because in a rail shooter you will bearly notice this. But i love games with such little details and i hade fun while doing this.

I tried this also, with the use of blendshapes. But this only works with SK meshes (and did not work with polypaint), so you would bake a SM model out of this anyway (because of the poly count is way to high for SK). Just feelt not worth the afford.

I got some feedback about performance on lower computer specs, this was basicly why i started to inspect the demo level in deep to see how i can improve this. One of the main things i noticed was the use of textures.
Here are 2 pictures where to see how the use of a few textures can change a whole setting for a level and used a lot of times if needet. Looks to me at the moment the best way to use masks only for details so you can save a lot of textures.


Here is a first test scene for the story telling level. It is more a test to see what i still need to create for this.

More pictures inside here




Edit:
This looks more like a cemetery wall now. All set up with modular meshes i build for other places, but i figured out this can also work very well for a wall. I tried to get away as cheap as possible with this. Only 2 albedo textures and 2 orm map used, no normals.

1 Like

An environment test where i tested the use of new modular high poly nanite meshes. I also placed some shrouds and bodybags in there just to see if this can work to get some sort of creepy feeling.

3 Likes

Lookin quite good.

If it’s meant to scare people you need to think about it in a different way than placing “creepy” objects like bodybags. Fear comes from not knowing what’s coming. Once you’ve seen a bodybag and know what it is and does it’s not going to scare me. This is especially true because I have already seen bodybags in other games and I have a certain expectation that they are not going to move or do anything.

Twist that, and you have fear. moving bodybags, the sound of one ripping in the next room. The next room holds a ripped bodybag, but where is the body? Sounds of ripping in the rooms behind you. What is in them? where did they go? what is the danger? Should I get my shotgun or hide? Panic.

Also I think you should work with “detail textures” more, the type you load into a material mapped to world coordinates. You use those to procedurally add details such as moss or changes in color to objects. This helps both in visual quality and for the scary effect because you get free pareidolia and the modular level blocks then look different from eachother.

2 Likes

Yes i was already testing to use rigged versions and blendshapes for the bodybag so they can move a little. But this needs to be a very low version because it is not static and non nanite.
Here is a more in game like scene. Basicly the start of the game. Pretty hard to do storytelling in such a short amount of time. But this will kick off the story of the game that is why i struggle a lot with the start. And i am not sure if somebody could tell what this really is meant for or trying to say. Maybe some half eaten bodys laying around could be a good idea.

Thank you for the tip will try this. Was thinking about masking but this would be a hell lot of work to do.

2 Likes

Storytelling is very difficult from environment design alone at the beginning because as a player you don’t have much info to work with.

Uhmm well I can try but most likely I am totally wrong, but it might give you some feedback.
I see a bunch of ambulances and open graves, which weirdly made me think that the people were dug up to be saved (were the bags moving? zombies digging up?) But there are no people around. As if they ran off. The coffins are very clean so they were definitely not underground. The body bags are bloody but the carts are clean, where they dug up and staked like vampires? Did the ambulance people do it? where did they go without the cars? I am clueless sorry

2 Likes

Thank you @Roy_Wierer.Seda145 for the feedback, really appreciate it. I like what you see in the scene but it is really meant another way. So it seems like i have to build it more clear.
I will try to change the scene a way it is more obviously to see without telling to much about now.

2 Likes

It is really hard to start a story within a few seconds and only a few meshes. So as i am stuck now with this i will try this later, maybe i get as always just an idea for this and come back to it.

But as i tried and set up the cemetery more i noticed all the tombstones i created does not really make sence gameplay wise. I need more like coridors build with mausoleums. Places to hide enemies for spawning in.
I have build around 50 meshes for tombstones only and will barly use a few of them. So i started to prepare them really for the marketplace as @TechLord mentiont. Was looking and only found a few of them there, nothing modular. Only need to change the UV´s and offset them to get simple differences with the same texture. It could be used as in the picture, there are a lot of combinations possible with only a few textures.
Still not sure about the text, but i guess the most would not even use it.

2 Likes

The Blueprint for the setup is ready now.
Instead of using random world position i build a more advanced version to have more control if needet.

Key features:

  • Activate meshes to display (4 in total at the moment)
  • Offset/Size/Rotation of the meshes
  • Datatable for the meshes to easy change for whatever mesh you want to use with the BP
  • 2 masks to use dirt/moss or any kind of textures you want as overlay
  • Masks are stored in an array for easy updates.
  • Each mask use R/G/B channel
  • Masks can be selected directily or as random random
  • Full access to all important functions of the material
    and much more.

This way you can do whatever you want and if using the random values you get a ton of variations with only 1 base, 1 dirt and 1 moss texture. Basicly it is only 1 material needet for all of this.

1 Like

Part of me thinks it is a bit overkill to have the settings manager but I realize that if you have an area with hundreds of these this type of manager gives you a ton of control from the level editor without requiring new blueprint assets, which is pretty cool. Looks very good.

2 Likes

Yes absolutly right, i feelt the same after finishing this. All new things i build i have only performance in mind. It is a tradeoff for realistic perfekt looking models and much more perfomant models.

The way it is set up now it need only needs 2 base Textures (Stone / Metal), 1 for dirt and 1 for moss (as i use it right now). But you can use every texture you like to use.

Why i absolutly love this way is simple, you can build with basicly 4 textures a whole cementery and if used enough different random masks you will barly see the same looking models.

I know It is almost impossible to have the same realistic look as if you would dofor each part 1 texture because i have done it. But this needs a lot of gpu power to run.

At the moment i do some textures and test how to archive this. Not finished but it goes the right direction.

That is just beautiful :slight_smile: .

I think see what you mean, possibly the individual components of the stone blend too much? If I think of color theory again

  • There must be sufficient contrast and difference between colors to be seen well;
  • Details must not be too small to be seen;

This beautiful curve is either too small or has the same colors as the surroundings so you can’t see the curve. Given that a player looks from X distance and has Y time to look at it, likely it won’t be seen or remembered. If you look at it first person, very closely, like RE Village style then you are right with this amount of mesh detail but in that case all the other models must have this level of detail as well or the other models will look “less quality” even though they are not.

And some more psychology related theory, such as how humans perceive object grouping then the first points of improvement to make components look different from the other is to group and differentiate.

  • By shape (circles next to circles, squares to squares);
  • By distance (add empty space, add depth);
  • By color (red next to red, blue to blue, different from background it is “inside” of);

Draw attention to the important bits, drop the less important ones:

There are also shapes and colors people have learnt to expect, such as the red explosive barrel. A purple apple might be mistaken for a dog toy. I think you are right with the colors, they all have this earth palette and stone shape + color. I think it fits best in an old cemetary where the stones are not modern / clean (glass planes, sharp / modern / minimalistic or even designer shapes). If you were to have new stones which don’t fit the stone + mossy design you have now you would have to add textures again. Of course you could swap these in and out through soft references to the assets, so they won’t be in memory if they are not loaded by yourself on request. They don’t have to be in a master material the moment the material loads.

Inside the shader you can procedurally change saturation, hue, contrast etc for certain areas on the stone, or for components through a material instance with such parameters.
Shaders can also read world position and depth, which you can use to change colors on details which point outward of the stone or use it to darken edges and areas around the components. For the latter a post processing material fits best, but don’t throw these into the game too early since it’s a bit dirty. With post processing you can do edge detection though and use that to darken or sharpen certain details. Much like the “sketch post processing material” examples you can find on youtube.

https://www.youtube.com/watch?v=x9uJkP4kcWY

Another note, I wonder if you could get positional data relative to the tombstone in the world, say “Bottom of the stone == 0, Top of the stone == 1” Then you could darken a muddy wet area on the bottom of the stone procedurally and so on without the need for post processing. If that sounds exciting let me know if it’s possible, have only done similar things in post. I did see water puddle material demos online in which puddles fill and dry at a relative height to the ground and being a shader I guess it’s possible.

1 Like

Just to check you probably already use soft pointers for all your assets, if not, you need to do so or you will end up with a high memory usage anyway. If you happen to load a hard pointer or have a datatable reference hard pointers in any row, everything will be loaded at once even if you don’t use any.

1 Like

Wow this is a lot of informations, I appreciate that a lot, thank you.

I will look into this posibillitys step by step tomorrow.

This is the metal, i tested to create corroded bronze metal wich is often green. I dont like it myself to much as it looks right now. And it almost vanished if using moss.

This should be a kinda simple one, just need to measure the tombstone and set the start and end point then.
The changes that you meantiont i did not try till now. I know there should also be some tecnic to fill lower areas of the mesh a little darker but also not try this.

Not really sure what you mean whit this. So no i dont have done this :slight_smile:

Edit:
A last test for today, just testing this with a modular wall, this works not very well. This would need to use different masks if you would want to add more then one pice with the same BP. Light would help but still would be noticable.

Then you will be very happy to learn soft pointers exist :slight_smile: .
There are two types of references, hard and soft. The most common way to point to an asset such as a texture, model, material or any other is the hard way. a hard reference will always be loaded into memory if referenced by another hard reference. Meaning, if you have a tombstone in the world with a texture property (hard type) it will load the texture into memory regardless of if it’s ever used. This is the same for datatables. A datatable referencing any asset the hard way will load it into memory regardless of it it’s ever used. It will load every single row and its referenced asset’s hard references recursively regardless of any row is ever used.

The fix for that is to use soft pointers (if you make a blueprint property say of type texture you can pick the soft type in its selector). A soft pointer is nothing but a path to an asset, which you must specifically request to load before it might be loaded. This can be done asynchronous as well. Async loading ensures loading an assets will never halt the game (synchronous) but will be loaded parallel and pop in when ready.

You will get a massive performance boost. Technically, you can use as many soft pointers as you want to texture assets without loading any into memory until you want them to.

All about Soft and Weak pointers | Tutorial

https://www.youtube.com/watch?v=AVtBGXVR15Y

In C++ you should take a look at the other pointer types as well, such as the weak pointer (which is mostly about garbage collection optimization) and the shared ptr etc. if you ever need those.

1 Like

This is a very helpfull tip, thank you for this. I switch to soft for the meshes in the database without any problems. Just worked after switching.
Not sure how much better this will work with nanite because as i understand it already instanced all the same meshes. But this counts for visible meshes and soft pointing if i understand right dont load into memory if not displayed wich is great. Did not know models would load into memory if just stored into a database within a BP (Not sure what happens if the all use the same textures, i guess this would not be a problem).

As i stared to prepare the tomstones for the marketplace i did a simple add/select of the meshes. But as always i search after finishing on how i can improve this.

This really feels like a overkill for all and i dont even think someone would even use the options. I will finish this with the options there are in now.
After this i will do the c++ version of it for my own specific needs. Updating later is always possible if i learn an even better way.

One of the main reasons i dig in so much into this, this could change my whole approach to set up scenes. Like i figured out if i use seemless masks this also can work with modular pices like walls. You could build a whole skyscraper with 3 textures and have not the normal same looking textures.

It is just crazy how much you learn every time while searching for better performance …
This also negates the need of Polypainted meshes. Because this would need you to paint every single model and having the same resolution/clean top and so on for lots of different mesehes turned out to be a nightmare. Also, for a different looking texture you need a new mesh … could be work for bigger things like building Mountains where you would have 4-8k textures or meshes you dont use often tough.

You do have to check if a soft ptr is already loaded into memory or not, in which case you must load it either sync or async. It might still be in memory now because you just switched the property type but you need to implement loading in the code where you use it.

You can never really get this right because it is so project specific. I think it will be amazing in a game like RE Village where nothing really looks the same cause it’s so hyperreal. I wouldn’t want to make 200 tombstone blueprints for such game and would really benefit from a good editor extension to edit them.

Quite possibly it is more of an editor extension, or an automation feature, than a tombstone specific system and that is why it might feel overkill for the tombstone alone.
Technically, if you want every single stone to be different and have the most manual control then you could nest blueprints or meshes from the outliner panel on the level
afbeelding

From there you can access the public / editor panel properties on all the attached items. Since it’s a stone normally holding no logic, this should be sufficient in most cases and you wouldn’t need to put the “editor logic” inside the stone or add components to that stone’s asset.

You might also have found various cases where you prefer your configuration system to be asset specific, maybe to do things in the construction script.

There’s no solution to fit every project but there are a few traps you can run into, mostly adding too much not fitting a project, or limiting a project with the new system. Best option is always to make things optional, plug and play. Or make one master blueprint which generates entire stones for you at a position as some form of editor utility, then you have only 1 blueprint asset.

Something totally different but I was fascinated by a relatively new technique used in design called Wave Function Collapse which is used to procedurally generate in 2D and 3D you might look into. I believe there is an experimental plugin in UE already which is not that good but it’s good knowing this exists. Maybe it can be of use to you when you need to generate a bunch of different assets:

GitHub - mxgmn/WaveFunctionCollapse: Bitmap & tilemap generation from a single example with the help of ideas from quantum mechanics

It is great at filling in smaller details

I will do this thank you for the tip. I was already searching for this but i did not find something BP related. Not sure if BP´s in UE5 load them without the need of a ptr. C++ i found informations i can try and use myself. But for the marketplace this would need to be as BP. Just cant find an option to load a/sync soft ref models in UE5 BP´s.

At the moment i still try to find a good way for rando masks. The closest i got to a normal 1 texture for each model with masks is something like this:


It is not perfect and will need more masks to create but it is pretty close to what you can get with the limit of masks and how they work but still have a pretty acurate looking model and still only needs 4 textures for all of the models you use(at least as far as i know atm).

Base without mask looks like this.

Edit:
After testing more i think this is a pretty good result for the base goal to use a less resourcess as possible.
All meshes based on

  • 2 materials (to seperate base from metal)
  • Only 5 textures in total used (Base:1 Color, 1 ORM, 1 Normal. Dirt: 1 Color, Moss: 1 Color. All materials share them)
  • 2 masks (1 Dirt, 1 Moss also seperatet for materials)
    Lots of variations already possible without random masks just with changing the sliders.

1 Like

In BP you pull a pin of a soft object / soft class ptr and type “load” which gives you the synchronous option, returning an object which you need to cast to what you need. I believe that outside of functions in the event graph BP also have the async option. BP functions don’t support async nodes sadly but the event graph does. If you write the logic in c++ yourself to load those ptrs you can expose a soft variable to BP users, shouldn’t be an issue then for marketplace users to use if they can’t do programming.

Async loading in c++ is done like this:

// StreamingHandle
// SomeSoftPtr
TWeakObjectPtr<USomeClass> WeakThis(this);
StreamingHandle = UAssetManager::GetStreamableManager().RequestAsyncLoad(SomeSoftPtr.ToSoftObjectPath(),[WeakThis]() {
	USomeClass* StrongThis = WeakThis.Get();
	if (IsValid(StrongThis)) {
		// Has finished loading async, get the content with // StrongThis->SomeSoftPtr.Get()
		// Do stuff with the retrieved content here.
	}
}, FStreamableManager::AsyncLoadHighPriority);

/* 
* Binding can only be done when async loading is in progress.
*/
if (StreamingHandle.IsValid()) {

	// On cancelled

	FStreamableDelegate CancelDelegate;
	CancelDelegate.BindLambda([WeakThis]() {
		// USomeClass* StrongThis = WeakThis.Get();
		// Do something with this if you want.
	});
	StreamingHandle->BindCancelDelegate(CancelDelegate);

	// On updated

	FStreamableUpdateDelegate UpdateDelegate;
	UpdateDelegate.BindLambda([WeakThis](TSharedRef<FStreamableHandle> InHandle) {
		// USomeClass* StrongThis = WeakThis.Get();
		// Do something with this if you want.
	});
	StreamingHandle->BindUpdateDelegate(UpdateDelegate);
}
1 Like