TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

GameGuru MAX - Request for the Future - Decal Projection #4620

Open MonkeyFrogStudio opened 1 year ago

MonkeyFrogStudio commented 1 year ago

I apologize, I don't recall the correct words for what I am requesting here, but other game engines have decals that have "depth" to them. Instead of a polygonal plane that the decal sits on and is rotated into position, a decal is PROJECTED a specific depth and effects everything that is within that projected area. This is often represented by a 3D wireframe cube to show how big and how "deep" the decal projection goes. The reason this is great is because the "decal" is no longer flat, but can be projected onto surfaces, even around corners, and even on both a wall and a floor at the same time.

Here is a video of a quite advanced system similar to this used in the remake of Deadspace:

https://www.monkeyfrogstudio.com/uploads/deadspace_shader_decal.mp4

Here's an example from the Unreal documentation on Deferred Decals:

https://docs.unrealengine.com/4.27/en-US/Resources/ContentExamples/Decals/1_1/

And in Unity:

decal-projector-scene-view

https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.0/manual/renderer-feature-decal.html

I don't know if the Wicked Engine supports these types of decals but if it does, these sorts of decals would be a very nice addition to MAX in the future.

When these types of decals are combined with PBR and/or even shaders, they become very powerful (as seen in the Deadspace video), allowing the end-user to place custom decals and re-use them in various places to enhance their level appearance. When re-used, this would use very little memory and have a massive visual affect throughout one's level.

bond1mjb commented 1 year ago

@MonkeyFrogStudio Yes indeed Wicked has this, and yes it's very cool. The decal can wrap around curved surfaces and rotated to change the projection angle. I think sometimes this is referred to as "splatting" decals?

Here I'm playing around with it in the Wicked Editor, notice how it also conforms to the normal map of the underlying surface!

https://user-images.githubusercontent.com/87768878/236999489-333cfe33-a95b-49cc-b6fb-7af3699027a7.mp4

bond1mjb commented 1 year ago

@MonkeyFrogStudio And another vid where it's being projected onto both the wall and floor:

https://user-images.githubusercontent.com/87768878/237000519-a6722d83-7957-4839-aba4-96bd721c5caa.mp4

MonkeyFrogStudio commented 1 year ago

@bond1mjb Thanks for sharing these! Since this is already in Wicked, then it should be pretty simple to implement this in MAX. It would be a lot better than the current "decals" that MAX is using ... certainly a lot more flexible. And if, like in the Deadspace example, we can combine this with shaders, it would open up an entire world of possibilities.

Granada1 commented 1 year ago

Also help with bullet strikes in corners and on edges 👍

mav3r1ck198-1 commented 1 year ago

this would be awesome, roll on the wicked update please!

bond1mjb commented 1 year ago

Yes it's the default way Wicked uses decals, no complex user setup required, so I would think it would be easy to implement into MAX. But I really don't know for sure. I thought these would be in MAX from the get go, but I guess it got overlooked.

You can also assign the entire PBR texture set to them as well just like any other assets. So like in the Dead Space example you could use them for added dirt, glistening frost, damage from bullet hits, blood splatters, etc.

fearlesswee commented 1 year ago

It appears I was well ahead of the curve with suggesting this lol!

711

So obviously I am in full support of this. It would allow blood splatters to finally make their long-awaited return from all the way back in FPSC, could be used for "scorch marks" from explosions, and just plain-old level detail (such as graffiti, grime, spilt liquids like oil, etc.)

Depending on how expensive projected decals end up being, they could also be used for more accurate bullet holes. It would also be really nice for projected decals to be used on characters to show a "bullet wound" at the point of impact on the character model, akin to how the Source engine does it in games like L4D2, CS:GO, TF2, etc.

Here's an example of what I mean taken from Garry's Mod; a sandbox mod for Half-Life 2:

image

When a bullet hits a character, it creates a "bullet wound" decal directly at the point of impact on the character.

Atm combat in MAX does feel a bit more like a calm game of laser tag rather than a visceral gunfight, what with the complete lack of blood or any kind of aftermath (except for the weak floaty-feeling blood particle, but that effect not only looks pretty mediocre, but is hard to see from even a couple of feet away, completely doesn't render whatsoever at longer distances, and doesn't leave any lingering impact on the world after the immediate fight.) Having blood stains on the environment, and bullet wound decals on the characters would go miles to improve the feedback imo.

MonkeyFrogStudio commented 8 months ago

I wanted to add to this request. Decal projection, in and of itself, would be great to have. But many engines go a bit further with it by allowing the decals to be full PBR materials. This means that the decal could have, not only color information, but also normal, metallic, roughness, and AO information as well. This is important for a wide variety of reasons. For example, a decal doesn't have to be just a texture image on a wall or floor, like some kind of wall poster. A decal could be damage, such as cracks or chunks missing due to age, etc., with 'depth' via the normal map; deeper exposed surfaces (like plaster removed from a wall) via color, normal, etc. This means that the end-user could use decals to add things like broken plaster, cracks, etc., to tiling wall textures to further break up the pattern and add details.

damage

damage2

damage3

Not only that, but things like blood splatter would react to light correctly due to the metallic and roughness settings and, due to a normal map, not just be perfectly flat against the object upon which they are projected.

synchromesh62 commented 8 months ago

But many engines go a bit further with it by allowing the decals to be full PBR materials.

Am i misreading this ? I was creating PBR textures for my own created decals long ago and they react great ? This is just a quick exaggerated example but is this what you mean.

https://github.com/TheGameCreators/GameGuruRepo/assets/35708217/afe6c121-085a-4a3b-b225-b8b48b7258e8

MonkeyFrogStudio commented 8 months ago

@synchromesh62 No, you're not misreading this, but you need to read it in CONTEXT. The context here is DECAL PROJECTION, so that decals conform to all surfaces and not just flat ones. I just don't want to end up with the developers creating decal projection that only uses a color channel.

OldFlak commented 4 months ago

Yeah, just do it already :)