Using text (Optimization)

Hi everyone.

I’ve been developing my thesis product in unity, It’s an interactive infographics about Scouting. A couple of weeks ago I posted in here that I had problems with 3D texts (ALL the project got corrupted two times and I don’t even know why). I just updated my Unity to the last version and I’m using textures with all the text instead using 3D text (GUI text doesn’t work for what I need) but, as you know, it needs to be a large one for making it being readable and not get pixelate or blurred, so it’s a bit expensive for low-end PCs (the ones I’m targeting most).

I thought of using the text meshes from blender (you know, the tool in “ADD > TEXT”) in just one file that could replace ALL the textures but I don’t know how much would this cost in performance. I don’t know much about programming or optimization (still learning) but AFAIK the number of vertexes have to do with it and I see that the blender texts have many of them (Well they are made via Curves) so I don’t know what should be better for performance: 3D text from blender or continue using the textures with text. I don’t want to use the 3D texts from unity because I’m really timeless and have re-done this 2 times since I used that tool and want to avoid that risk. You can see how I want the text to be in:

https://dl.dropboxusercontent.com/u/2786312/Web.html

(Click on the “TARDE” button and then use the Arrow keys for moving the CAM)

In advance I thank you for any possible response.
Davey.

I am not sure what issues you are having with the 3D Text provided from within Unity, as I have used them in a number of prototypes and never had any issues with crashing or loss of data. Using Blender to produce the text as a mesh if also a viable alternative, and if you are worried about the vertex count, you could always use the Decimate modifier that is built into Blender.

You could use FlyingText3D, which allows you to dynamically set the resolution of text, and would be far more efficient than using Blender, since you can just do code like “var textObject = FlyingText.GetObject (“Woo”, Vector3(5, 0, 10), Quaternion.identity)”.

–Eric

Was the 3D text in a prefab? I find if you add or remove components from a prefab created in a prior Unity session, then all prefab edits since loading Unity can be corrupted. That manifests itself as the prefabs being a mix of the prefabs in the updated and original states (including a mix within each prefab). 3D text is often the easiest way to spot this corruption.

If this is how you got corrupted, then it isn’t 3D text that is the problem, but your working practices exposing a Unity bug.

The problem with 3D text was in previous version I had (4.1.2) but I don’t want to take the risk because deadline is this monday but I should try then. If vertex count is a problem using blender text then I’ll keep using textures for text, is that “Flying3DText” using the current Unity 3D Text or makes its own? Thanks.

I think the text is the least performance hungry thing you have to worry about. How many draw calls do you have when scrolling over the grasses/trees? Also Unity terrain is far more costly than using a mesh fyi. It’s fine in browser but would die on mobiles and you mention performance on low end machines being key…

Also I have 1 computer at work that kept corrupting, crashing, or losing unity projects that we believe is from a failing hard drive. The computer works fine though, but since getting a new one I haven’t had anything go wrong with unity. Don’t forget to export backups at key points so you can restore as needed.

If you throw out lots of 3d texts unity should only draw the ones being seen in the camera frustum, so it really shouldn’t be a performance problem in a top down game, at most you see a handful or two at any one moment.

edit:: if your deadline’s monday I wouldn’t worry about the terrain. Just something to pay attention to when building a scene… also your scene runs great on my 5 year old computer.

Yep, in fact, I put a bit more effort in Visual aspect because the coding is too simple so it won’t be any problem with performance (just camera moving and some “buttons” made by plane objects with textures and done). I’ll try to optimize the terrain more, also doing some other stuff but, right now I’d like to know what is heavier for performance: Text from Blender or those Textures with text.

Else, I have another last question for you: Doesn’t Unity drawscalls anything that isn’t being showed by the Cam? Thanks a lot for your responses guys :slight_smile:

There wouldn’t be any point if it was just using the Unity 3DText. :wink: I’d recommend clicking on the link I provided, which explains a lot more details.

–Eric

The main disadvantage using textures for the text is it adds directly to your build size, each texture, while text in a guitext, 3d text, or the flying3d text adds almost nothing. You can use the same background for each box, and render text over it. I couldn’t say about the blender text, maybe make a box with it and check the performance in play mode to compare them… also unity stops drawing what’s outside the camera view, except for the unity terrain, if any of it is in view, it draws the entire thing. With pro unity there’s occlusion culling which I believe solves that problem.

Ummmm I see, well the final size is not really an issue because It’s gonna be distribuited via DVD (not online until I optimize it all). Thanks to everyone for the response, I will take every word you said in count :slight_smile: