Announcement

Collapse
No announcement yet.

Render to texture

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Render to texture

    Hi,

    I look for render to texture, or just make a "screenshot" with another camera and use this capture as texture.
    This is for doing a portrait of a character and display it in HUD

    #2
    Hi Nexam,

    You can do this in the following way:

    1) Go to the Content Browser and right-click somewhere in the empty space of the content view of your package and select 'New TextureRenderTarget2D'. You could name it 'texture_screenshot_cam'. This will add a green element in your package. Double click it to change its default size to e.g. 1024x1024.

    2) Now click the 'Actor Classes' tab at the top of the Content Browser window

    3) Expand the 'SceneCaptureActor' in the list

    4) Select 'SceneCapture2DActor'

    5) Now right-click somewhere in the viewport in front of your character and choose 'Add SceneCapture2DActor Here'

    6) A 3D camera will show up in your scene

    7) Make sure the 3D camera is selected and then click F4 or select the menu View > Actor Properties

    8) Scroll down to 'SceneCaptureActor' in this list. If you can't see it at the bottom then close the properties in the top by clicking on the dark horizontal bars

    9) Make sure your green 'texture_screenshot_cam' TextureRenderTarget2D is selected in the Content Browser

    10) Now click the arrow right to 'Texture Target' in the Actor Properties of your 3D camera

    11) If you now roll your mouse over the green 'texture_screenshot_cam' TextureRenderTarget2D in your Content Browser, it will update what the 3D camera in your scene is seeing. Isn't that cool?

    12) Now place your camera in front of your character as you like

    13) You probably want to adjust the Field Of View of your 3D camera to get rid of the wide-angle look

    14) Select your 3D camera and click F4. Now find the Field Of View option under 'SceneCaptureActor' and enter the value 40.

    15) Assuming you are using the screenshot in Photoshop, double-click the 'texture_screenshot_cam' TextureRenderTarget2D in the Content Browser (this opens the Texture Viewer), press ALT + Print Screen on your keyboard and paste it in Photoshop.

    (I tried to use right-click on 'texture_screenshot_cam' TextureRenderTarget2D in the Content Browser and selecting 'Export to file', but that didn't work for some reason.)

    Hope that helps!
    Charles

    Comment

    Working...
    X