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"

Dynamic Gradient Mask?

First off, I'm not super knowledgeable on materials in general, so forgive me if I use any language that's not totally accurate.

So, I'm looking to make a material that uses multiple solid colors and masks said colors to be able to apply effects to each one, and one of the effects I would like is some sort of raising of the colored areas, with differently colored areas not connecting, instead having a decline back to the surface's "normal" height before raising again for each color independently. Essentially, something like either of these (side view): alt text

I'm currently using a plugin to drive the actual painting of the surface, and have achieved a (currently) passable effect using material layer blending to mask the painted colors from the "background" color using an alpha channel provided by the plugin's special node to selectively blend the paint on top of the background, with ALL painted colors sharing the same "layer" in the material attributes, thus allowing the colors to all overwrite one another and preventing any one color from taking priority over another aside from new paint strokes covering old ones. Obviously, this makes all of the resulting vectors dynamic, preventing the usage of texture samples for most purposes.

Because of the way the plugin's special nodes that allow the actual painting to work, displacement maps are impossible as they produce errors, preventing the material from properly rendering at all.

In order to achieve masks that are on a per-color basis, I'm currently using the maximum hardness for brush "strokes" from the plugin via blueprint node, as for potential gameplay and rendering reasons, opacity between multiple colors is undesirable. I am currently using a material function that I found somewhere else (currently can't remember where it came from, but it was somewhere here on the answers site) that is able to mask out solid specific colors with a configurable tolerance, as seen here alt text

But these resulting masks are binary, so creating any kind of raised effect with them as-is will result in strange behavior, and even if I wanted to / could use opacity, the masks resulting from paint effects using opacity could have unusual results (Such as blue and red creating purple, which may not successfully trigger either red or blue masks, depending on tolerance, which is troublesome as purple could for example need to be its own unique color). Currently, I am trying to find a way to "soften" these masks around the edges so that the edges between colors can hopefully be separated, something like the following: alt text

So I'm here to ask if anyone is aware of that being possible dynamically in-engine? As the painting is dynamic, using texture sample based masks is not possible, unless there's some method that I'm unaware of :(

Product Version: UE 4.22
Tags:
more ▼

asked Jun 11 '19 at 06:04 AM in Rendering

avatar image

NFinET
11 1 1

avatar image NFinET Jun 17 '19 at 09:33 PM

I've found a way around this for my purposes (at least as far as I can tell for now), so finding a way to do this isn't super important to me anymore, but if anyone figures out a way to do this (Though I honestly doubt there is without substantial overhead or coding prowess, if it's possible at all) I'd still love to know how.

Thanks for your time.

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

0 answers: sort voted first
Be the first one to answer this question
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