Dear Friends at Epic,
Do you have any estimate on a UE4 Scripted Texture?
http://udn.epicgames.com/Three/ScriptedTextures.html
And to the community,
does anyone already have a way of doing this using current UE4 classes?
thanks!
Rama
Dear Friends at Epic,
Do you have any estimate on a UE4 Scripted Texture?
http://udn.epicgames.com/Three/ScriptedTextures.html
And to the community,
does anyone already have a way of doing this using current UE4 classes?
thanks!
Rama
I’d imagine it would be possible to do using a Slate based widget… I just don’t know how
Curious about this myself now.
Great to hear from you!
Rama
Hi Rama,
Scripted Textures were just an UnrealScript interface for C++ Render Targets - they haven’t gone anywhere, just this interface is no longer required.
Take a look at the sample code I posted in this thread:
https://rocket.unrealengine.com/questions/17191/questionrequest-render-textures-to-textures-1.html
Hopefully that should help you get started!
#Woohoo!
This is awesome!
Thanks Luke!
#Luke’s Code
I am reposting your code here for others faster reference
// Create a Render Texture and initialise it.
RenderTexture = CastChecked(StaticConstructObject(UTextureRenderTarget2D::StaticClass()));
RenderTexture->ClearColor = FLinearColor::Black;
RenderTexture->InitAutoFormat(RenderTargetRes, RenderTargetRes);
RenderTexture->UpdateResourceImmediate();
// Create a Canvas and assign the render texture resource to it
FTextureRenderTarget2DResource* TextureResource = (FTextureRenderTarget2DResource*)RenderTexture->Resource;
Canvas = new FCanvas(TextureResource, NULL, 0, 0, 0);
Canvas->Clear(FLinearColor::Black);
//Your drawing code goes here
Canvas->DrawWhatever(StuffIWant);
//Assign render texture to material
MyMaterial->SetTextureParameterValue(TEXT("Target"), RenderTexture);