Hi, I have a simple energy shield material which reacts on the impact. I simply create dynamic material instance on hit.
There’s one thing left I want to accomplish: I want only the zone of the sphere which was hit to be visible. May be 1/3 or 1/2 of the sphere with the hit location in center. So the other part of the sphere should be faded. The sphere is mostly represented by Fresnel corona.
Need help or some clues on how I can achieve the desired effect. Still quite new to Unreal so any help would be apreciated.
Hey there @panthernet! So I don’t have a tutorial directly for it, but I have one that does have a good setup for taking a position, and effecting a shield in a sphere pattern, you could take this and just mask off any portion that isn’t hit. The most pertinent part (the sphere mask based on world partition and a 3 color blend) starts around 6:10 in the video.
In his example he uses it to change the color of the shield in the area that’s hit, in your case you’d probably plug it directly into the opacity. Also side note: I like where you’re projects headed!
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
Absolutely understandable! I’m less inclined graphically as well so when I do shaders/materials with any form of complexity I have to sit down and preview each node and their changes to make sure it works as intended constantly. Understanding UV space is a great help with materials as well. If you’ve got the time, newer CGHow videos are actually much better at explaining his thought process. This one was a bit older, but fit the bill for what you were trying to do. Just needs a bit of reverse engineering and you’re golden. If you have any questions about it, don’t hesitate to ask!
Well, seems like I lack knowledge in the area to make it, has no success. Not a big deal though. I have another puzzle to solve. Looks like all the shield tutorials I’ve met are designed around world coordinates which is good only for static shields and not shields on moving objects. Would be nice to find out how to persist DMI at the same coordinate relative to the actor current position.
I’ve found that I have ActorPositionWS node but have to make some more math to get what I want I guess.
No worries! I’m not the strongest in materials, but I just happen to have a personal project I’m working on that needed shields. I have a decent pseudocode of how I’d do it in my head. Just the math to translate World Pos to UV pos is going to take a while to get right. Once UV space is linked properly, it should be cake to just have a sphere mask iterate over it for hits. Now the real question is how to do it with multiple hits without it being messy? I’ll cross that bridge when I come to it I suppose. If I end up getting it together I’ll come back and let you know!