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"

Construction script: Is it possible to create an instance of Texture2D or aa RenderTarget2D dynamically?

My BP has a variable of type RenderTarget2D and anoterh of type Texture2D. I DO NOT want to set them to default values. Instead I want to create those in memory at initialization phase. The idea is I waant ot manipulate the Texture2D and RenderTarget manually per instance of the Blueprint. So I cannot point them to existing assets in content browser.

What I want to achieve: My blueprints has a SceneCapture2D component. This should render its output onto a RenderTarget, whcih will be used later on. I know I can create a rendertarget in content browser and put it as target for SceneCapture component. But the problem is I will have more than 1 instance of this BP and they will overwrite the RenderTarget. I need 1 render target per BP. So that is why I created a variable of type RenderTraget2D within the blue print. My aim was to instantiate it within construction script. But I dont know how

Is there a way to achieve it?

Any alternate methods are also apreciated.

Product Version: Not Selected
Tags:
more ▼

asked Jun 01 '14 at 04:25 AM in Blueprint Scripting

avatar image

mindfane
3.4k 154 51 271

avatar image Dadlord36 May 06 '16 at 07:43 AM

I wan to save RenderTarget2D instance with picture from SceneCapture2D, so I can use it for material in UMG and have different Brushes. Answer pleas!

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

2 answers: sort voted first

Youre on the right track though construction script is the way to have things changeable during level or layout design.Scene

Ok so quick step through this process.

  1. drag your scenecapture or any component in to the construction script and click on GET.

  2. drag off that node and for this example start typing SET and then select Set TextureTarget

  3. right click on the drop down in the texture target and choose promote to variable

  4. at this point you should have a variable of the right type which you can name whatever you like then CHECK the box that says EDITABLE.

now if you drag this into your level you will see in its detail panel a way to change it value and if you have more than just one each one can have a different value.

textcontruct.png (203.6 kB)
more ▼

answered Jun 01 '14 at 04:43 AM

avatar image

DJMidKnight
1.2k 50 24 50

avatar image mindfane Jun 01 '14 at 04:48 AM

Thanks mate!

I did not notice the promote to varible option

UPDATE: There is still one problem. I still have to chose a value for this rendertarget resoucre from the Content Browser. What I need is to create it in memory and keep it there instead of accessing physical resource. - I guess that is not possible then.

avatar image DJMidKnight Jun 01 '14 at 04:47 PM

Ok you can in the initial blueprint set the DEFAULT value to the YOURVARIABLE that will always be there and if need to you can still change it in the level design without having to change the blueprint

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

here is the way doing it dynamically:

alt text
screenshot-2.png (99.3 kB)
more ▼

answered Nov 24 '17 at 04:47 PM

avatar image

Arty-McLabin
858 19 41 60

(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