x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Animated Decal Material with Opacity not working

Hi

So, I'm struggling with the next problem. I'm creating a Deferred Decal Material, it's basically a shield hit effect that will be added on top of a shield mesh.

This is my Emissive Color:

alt text

This is my Opacity Mask:

alt text

This is my basic setup:

alt text

And this is the final result I'm getting:

alt text

Some weird stuff going on there.. Any thoughts?

Product Version: UE 4.15
Tags:
more ▼

asked Jun 05 '17 at 11:03 PM in Rendering

avatar image

marianomdq
8 6 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Well, the problem is the following:

The InputParameter "ImpactPosition" default value is (0,0,0). When testing the decal (without injecting some value into the input) the material doesn't work. That's because the value of the center of the sphere is always (0,0,0) and is way too far from the world position of the material pixels, therefore the sphere mask radius never reaches its target.

The Solution:

Replacing the "ImpactPosition" InputParameter node by a ActorPosition node fixes the problem right away. Another solution is to inject into the input parameter the current position of the decal, but that forces you to inject through code or BP to have a preview on real time in your game.

For either case, the real-time preview in the MaterialEditor doesn't show the right effect, it only flashes. I think that's because it cannot calculate the ActorPosition yet.

alt text

more ▼

answered Jun 07 '17 at 07:25 PM

avatar image

marianomdq
8 6 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi, marianomdq.

How do you setup your Decal Material.

I make this decal material with flipbook without problem.

alt text alt text

more ▼

answered Jun 06 '17 at 10:03 AM

avatar image

J0000J
176 5 3 11

avatar image marianomdq Jun 06 '17 at 02:55 PM

Hello J0000J. This is my setup

alt text

I've made the emissive color solid for the sake of graph simplicity.

avatar image J0000J Jun 07 '17 at 03:51 AM

Seems good.. It should work with proper parameter values.

World Position is used. How does It look like in your scene, with ImpactPosition is set?

avatar image marianomdq Jun 07 '17 at 07:02 PM

Well, thanks J000J, you have contributed to the solution. The thing was that I was using ImpactPosition as a default (0,0,0) and of course, every time I tried to test the decal on a surface, the value for the center of the sphere was waaay too far. I've replaced ImpactPosition with ActorPosition and that's it, now it works like a charm.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question