Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by quazeryon · Jun 13, 2017 at 07:44 AM · texturememorygpumemory managementmemory usage

Reduce GPU Memory usage from textures

i have a huge scene with a lot of high detailed textures. As a result the scene currently needs about 2GB GPU Memory. Since i can't expect everyone to have so much GPU Memory, is there a way to reduce the memory usage?

A few ideas i have already tried:

  • Only a small part of the scene is visible at any time. Splitting it in smaller scenes should therefore be a possibility, but when loading the additional scenes in the background, i get framedrops or the game is frozen for a few moments. Besides that, i can't be sure a part of the scene is loaded in time.

  • Using AssetBundles had similar issues, besides additional code.

  • I have nearly no RAM usage, is there a way to move unused textures temporarly to it?

  • The textures are compressed and mipmaps are turned off.

  • Different Quality-Settings didn't change anything notable.

Sidenote: CPU, GPU and RAM usage are no issue.

edit:

A bit background information, in case this helps: I'm creating a 2D-RPG with HD graphics and big levels. Think of it a bit like older Final Fantasy or Pokemon Games, but i'm not using tiles, instead a more natural/artwork-like style. Therefore the textures are bigger and require more space. The level-size is usually somewhere between 20000x20000 and 60000x60000px, on multiple layers and split on multiple parts (to bypass the 2048x2048px texture limit on some devices). Huge sizes of assets-files are expected, but i'm searching for a way to reduce the size in the GPU memory.

Comment
Add comment · Show 11
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image revolute · Jun 13, 2017 at 09:08 AM 0
Share

Can you provide more information like what device setup you have and which texture compression you are using?

And try checking memory profiler for info on textures. A wrong setup with asset bundles can blow up memory usage without noticing.

Furthermore, are your textures all set to some kind of ultra size?

Last, are you packing the textures correctly?

avatar image quazeryon revolute · Jun 13, 2017 at 09:36 AM 0
Share

The game is developed for PC/$$anonymous$$ac. Textures are DXT5 and BC7 compressed. (depends on the texture) Different compression-quality-levels have been tested without much difference. I'm not using crunch compression.

The texture size it self isn't an issue, but that all textures of a scene are loaded at the same time.

Background-infos in case it helps, were added to the question.

avatar image revolute quazeryon · Jun 13, 2017 at 11:54 AM 0
Share

Well, if its something you wish to do, then you need to split images a bit more.

Old classic 2d scroll games similar to Super $$anonymous$$ario, used extra buffer area where tiles were prepared and kept hidden unless the user goes to that region.

I have no idea how large your world map is, but I'm sure you can divide them into at least a few groups, and in the background, async load resources for linked maps.

Some games do struggle to keep up with user's actions, moving too fast, poor read times and etc.

Show more comments
avatar image hexagonius · Jun 13, 2017 at 10:08 AM 0
Share

You can:
- reduce texture size
- pack textures into atlases - use same textures more often

Other than that your really can only load level peaced one after another. With a good strea$$anonymous$$g system, that's possible. LoadLevelAsync is your friend

avatar image FunIsDangerous hexagonius · Jun 13, 2017 at 10:48 AM 0
Share

Or, if you're having frame problems as you mentioned, change the level design a bit. Add more doors or pathways that lead to a new scene

avatar image quazeryon FunIsDangerous · Jun 13, 2017 at 11:20 AM 0
Share

Frame issues appear only at the point were a new scene is set active/asset bundle is added to scene (usually a frame-drop a small freeze) after that everything runs as normal. Probably since a lot of textures are loaded in the GPU memory.

avatar image quazeryon hexagonius · Jun 13, 2017 at 11:14 AM 0
Share

Reducing the texture size is always a possibility, but then the game looks blurry on high-resolution-screens. Therefore this is only the last option.

Reusing textures isn't possible, since levels are based on an artwork. (See additional info added to the question at the bottom)

LoadLevelAsync was already considered but i got framedrops/the game is frozen for few moments at points were the sublevels are loaded and set active. (See question)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by henry_jvx · Jun 14, 2017 at 07:35 AM

i think there is nothing to do, because the engine is well optimized to save memory usage by default (ram and g-ram) .

i think you are working with too exessive texture sizes even if you want to show a single texture in the whole screen. most of HD games uses 2048 x 2048px textures max, even HD4k games. besides. dissabling mipmaps with 6kpx textures may overload the gpu and throw down the framerate, so your players will need a powerfull graphic card anyway.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

90 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

What does Profiler.GetReservedMemory() return? How is it determined? 0 Answers

Is this memory usage too much for a mobile game? 1 Answer

How can I tell how much grahics memory is available? 1 Answer

Unity Sprite Memory Usage Is Huge 1 Answer

Unity memory thirst 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges