Announcement

Collapse
No announcement yet.

What's the best way to render dynamic text on a material?

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

    What's the best way to render dynamic text on a material?

    I've got a paper material which is blank and I want to render text onto the paper (as if someone wrote it by hand).

    Currently, my technique is to just create a new texture in photoshop and bake the text into the texture. Obviously this isn't a good technique because any time I want to create additional instances of text, I would have to create a new texture and if there are a ton of textures, it will eat up video ram.

    What's the best way to render dynamic text onto a blank piece of paper which can move around?

    Here are two screenshots of my current implementation:

    Paper on table with text
    Click image for larger version

Name:	Letter2.jpg
Views:	2
Size:	571.4 KB
ID:	1168735


    Paper being read:
    Click image for larger version

Name:	Letter1.jpg
Views:	2
Size:	665.6 KB
ID:	1168736

    Note: The paper is slightly curved, so I'd like to avoid a text render component if possible since that causes clipping. Also, I don't really know how to change the fonts in the text render component (I tried to create a new one and nothing showed up).
    Note 2: What if I also wanted to include pictures and diagrams?

    #2
    Simple:

    - Create a widget with your text and the page background. Place it somewhere in the world, unreachable.
    - Put a SceneCapture2D in front of it and render it to a texture.
    - Put that texture on the material for your piece of paper / book / whatever writing you need.

    Comment


      #3
      Originally posted by DamirH View Post
      Simple:

      - Create a widget with your text and the page background. Place it somewhere in the world, unreachable.
      - Put a SceneCapture2D in front of it and render it to a texture.
      - Put that texture on the material for your piece of paper / book / whatever writing you need.
      Sorry, while that would work, I don't think that's the right approach. SceneCapture components are too computationally expensive. The other issue is that if there are more than one viewable document, you'd have to create separate scene capture components for each one.

      There's gotta be a better way... I'm looking for something like this:

      Click image for larger version

Name:	maxresdefault.jpg
Views:	1
Size:	218.0 KB
ID:	1097089

      Comment


        #4
        Nah, you'd need only two for all of those. And you don't capture it every frame, you trigger the capture only when the text changes. With a two-capture setup in the scenario you just posted, the first capture would be holding the two pages that are currently being turned (each page taking up half the UV space). The second capture would be the two pages being turned to. Once the player flips the page, the currently "hidden" capture updates to the pages required. Again, you don't capture every frame, only when updated.

        Comment


          #5
          This is what do you want.
          https://forums.unrealengine.com/show...nvas-Render-2d

          You need only change the string variable text and build again the texture on runtime
          Last edited by knack; 12-16-2015, 09:59 PM.
          pd: excuse my english.

          lfw/paid modeling, painting, texturing.

          Comment


            #6
            This is perfect! Exactly what I was looking for, thank you so much!

            Comment

            Working...
            X