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"

Creating a cutting plane effect creates a spherical cutting plane.

I made a cutting plane effect using a material in UE4. However, when I move the plane around it cuts in a slight spherical shape, not a perfect plane like I want it to. The effect The selected white device on the right dictates the orientation of the plane. I used the up vector as the plane definition.

LevelBPI keep the position and up vector of the plane using a MaterialParameterCollection.

The material I calculate the vector between the position of the fragment and the position of the plane, and dot that vector with the up vector. Both are normalized so I can use the cosine value to find out on which side of the plane the fragment is and thus mask it away if it is on the do-not-render-side.

However, the cutting plane bends as you can see in the first image. I have no idea why.

The second problem is that I want to be able to select an actor and use the cutting plane on that actor only; essentially turning the effect on and off on any material. For example, I have a hologram material and a cloth material. I want this masking effect to apply to the result of the underlying material. I tried making it a material function and override the mask or do it the other way around, but no mixing and meddling made it work. I either had to not get the cutting effect on the hologram or I didn't get the transparent effect.

Is there a way to make it easy to apply the cutting plane to any material as described above?

The only other question regarding something similar.

Thank you for your help.

Product Version: UE 4.12
Tags:
more ▼

asked Jun 25 '16 at 12:08 PM in Rendering

avatar image

NoobsDeSroobs
2.7k 106 34 176

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

The answer was that my assumption that anything greater than zero would be treated as non-zero like booleans are in C++. However, this is wrong. Once I changed the material to return a zero OR a one using an IF module it works flawlessly. Change the clamp above for the if module.

more ▼

answered Jun 26 '16 at 10:05 AM

avatar image

NoobsDeSroobs
2.7k 106 34 176

avatar image Osok Aug 18 '16 at 05:33 AM

Do you have a screenshot by chance. Slightly confused on your solution. EDIT: This seems to work

alt text

capture.png (31.0 kB)
avatar image NoobsDeSroobs Aug 18 '16 at 10:55 AM

The mask treats everything below 1 as 0, so you have to use the an if statement to return 0 when below or equal to zero and 1 when above. Like your solution there.

(comments are locked)
10|2000 characters needed characters left
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