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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to get many actor locations in material?

I was wondering if there was a way to get the location every instance of a specific actor and use this info in a dynamic material I am trying to find a way of quickly creating 100+ spheremasks in a a PP material to make fake shadows

Thanks for any help

Product Version: UE 4.18
Tags:
more ▼

asked Aug 16 '18 at 10:04 PM in Rendering

avatar image

Cogganator
10 1 4

avatar image redbox Aug 17 '18 at 04:01 AM

Dynamic arrays are supported only in dx12. However it is not a "quick" way.

https://docs.microsoft.com/en-us/windows/desktop/direct3d12/dynamic-indexing-using-hlsl-5-1

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

1 answer: sort voted first

You should write locations to a texture/render target to get that large data into the shader.

more ▼

answered Aug 17 '18 at 07:06 AM

avatar image

Deathrey
7.8k 130 31 292

avatar image Cogganator Aug 17 '18 at 12:53 PM

Thanks for the response I appreciate the help But If I am understanding that right- you think I should manually write RGB for texture coords, which I could do, but it would end up being very tedious and time consuming- which I was trying to avoid with blueprints

avatar image redbox Aug 17 '18 at 01:54 PM

No, @Deathrey mean that you should write a code, that will write required actors positions into RenderTarget texture, and read it in material.

avatar image Cogganator Aug 17 '18 at 05:29 PM

Oh I see I'll look into that then

(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