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"

Texture parameter not updating for material drawing on the same texture

Hello everyone!

I have a question regarding texture parameters in UE4. I'm trying to make a brush material to paint on a texture render target using Blueprints. I want the brush to do a max value on every pixel between the previous and the next color, meaning painting twice or thrice at the same location will not have any effect. I hope I made myself clear. It is crucial that the new color is a maximum between old and brush, and not just painted over or added using the opacity of the brush.

The flow of the rendering should look something like this: Imgur The red cross in the picture indicates that which I can't seem to get to work. Circles indicating Materials, Square indicating texture render target.

Before I go into explaining what I have done so far, I ask if this behavior is even possible to achieve in the first place?

Since this did not work for me, I went ahead and extended the flow map to the point it actually works. This is what I got to work: Imgur Since I thought that the feeding of the same render target to the drawing of that texture target was the problem, I went full out to avoid it. This requires triple amount texture render targets and double amount of dynamic materials for every mesh I want to use this on.

A great flaw with my current method (the one with 3 render targets), is the fact that the problem at hand arises anyways if I want to draw twice on locations where the brushes would overlap during the same tick. To overcome this I would have to use a separate texture render target for each of the locations I want to draw the brush, and then combine them one at a time. To clarify, I want to be able to draw twice within reach, so this is not an acceptable solution for me.

This is the part of the brush which doesn't seem to work: Imgur

This is the result I want to achieve (and already have, but in an undesired way): Imgur

This is the result of the not working flow: Imgur

This is the result of the not working flow if I don't pass the render target to the dynamic brush material when I create it: Imgur

The difference between the last two pictures is crucial, the gray squares are the red channel of the engine default texture sample for texture parameters, which means that the first (of the two bad results) receives the texture target as a parameter and uses it, but the parameter is then never updated. The same texture target is used in the material that displays it onto the mesh on the screen - which means that the render target itself is updating, but only one of the 2 parameters is updating correctly.

I tried both on 4.17 and 4.19 but the results were the same.

Thanks for any help!


Product Version: UE 4.19
more ▼

asked Feb 27 '19 at 01:52 PM in Blueprint Scripting

avatar image

6 1

(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