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"

How can I make a 2D Material into a circle?

I have a 2D image that is a square and I want to make it into a circle.

Product Version: UE 4.15
Tags:
more ▼

asked Feb 19 '17 at 04:58 AM in Blueprint Scripting

avatar image

_eni
47 11 15 14

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

1 answer: sort voted first

Hi.

It depends what you are trying to do, but the easiest way to make a circle from a square is to use a mask like this and lerp the texture. If you need it to be transparent (like UMG for example) then plug the mask into the opacity.

Hope this helps, Tom.

alt text

circle.png (4.4 kB)
more ▼

answered Feb 19 '17 at 10:12 AM

avatar image

Illarvan
352 7 10 23

avatar image _eni Feb 20 '17 at 06:35 AM

Could you provide a visual example?

avatar image Illarvan Feb 20 '17 at 07:49 AM

Sure. It would look something like this.

alt text

You'll also want to change the material settings to masked if you want it transparent. If you don't, you can delete the "1-x" and plug a different texture into B of the Lerp. alt text

masked2.png (106.4 kB)
masked.png (11.8 kB)
avatar image _eni Feb 21 '17 at 12:42 AM

Thank you so much, Tom!

(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