Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Phim · Aug 07, 2013 at 12:10 PM · memoryopengldirectxvram

Why does OPENGL use 4 to 8 times the vram compared to DirectX

We are working on a game with unity3D.

The past few weeks I have been polishing a game, adding textures, effects, particles etc. With the unity3D stats view I have managed to keep the mem usage around 4-8 MB.

When we wanted to export the game to an iPhone, we stumbled on the fact that the game used 20 to 40 MB of texture mem usage.

We already found out that this is due to the fact that the PC uses directX and the mac used openGL.

When we forced my PC in openGL mode, the mem usage of the mac was pretty much thesame as on the pc (20 to 40).

So my questions are:

 Why does openGL use so much texture mem usage? (its *8 at most points).
 How can we properly fix this?
Comment
Add comment · Show 3
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 Owen-Reynolds · Aug 07, 2013 at 03:28 PM 0
Share

Is it causing a problem? The file size isn't any worse? This is only while running? To me, it sounds like DirectX is not properly detecting available memory. In theory, OpenGL is running faster/cooler as a result.

avatar image Phim · Aug 07, 2013 at 03:36 PM 0
Share

No its not causing a problem (yet?), we just tested on iPhone 4 hardware.

The file size is the same.

I guess this is only while running. When running I can see the VRA$$anonymous$$ in the stats window.

DirectX not properly detecting available memory, is it possible to verify this so we can mark this as the cause of the problem?

avatar image RalphTrickey · Aug 07, 2013 at 08:27 PM 0
Share

I'd check to see how the textures are compressed in each case.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Owen-Reynolds · Aug 07, 2013 at 08:25 PM

I'm out-of-date on video hardware, but:

Regular computer programs list minimum memory required, and the ideal amount. If you have the minimum, the program needs to make more frequent disk swaps, etc... and is slower. If you have even more than the the ideal, you may continue to see minor speed-ups (like going from area 2 back to area 1 has no load time.)

If you really need to know the exact amount of memory required, you have to start with very little, and keep adding more and more until it feels "playable." But there is no real number.

A graphics card manager does the same thing. If you have extra texture-mem laying around, it will fill that up. If you have less than "needed" it will still run, but slower.

I don't know how Unity counts Video-Ram usage. Maybe by counting the size of textures used this frame, or during the most recent second (a more realistic measure.) On an iPhone, it may be switching to the amount actually used. So it probably still "needs" 4-8M, but it finds a way to run faster by using 20M more. Plus, iPhones have that crazy image format. It compresses amazing small, but it may just take more V-Ram.

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
avatar image
0

Answer by FulkoW · Aug 12, 2013 at 09:43 AM

Thank you all for your answers (I am replying this for Phim) @Ralph: The textures look fine in both directX and openGL @Owen: We tested it on mac AND PC in different versions of unity even, and it keeps on popping up thesame mem amount, so it would be strange if all the machines would detect thesame amount of mem faulty.

@Owen: So basically you are saying that it will work like old dosgames? mem bases, so it will be unplayable with a faster machine? However I do like the second part of ur post, but I find it strange if it really works like that, my PC has a LOT more mem than the 40mb it comes up with, and for testing purposes this doesnt seem like an ideal way for unity to implement this.

It would mean you can never get proper data out of it, so you will always have to keep on testing every little aspect along the route on all devices.

Thanx for everything though,

Fulko

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

17 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

Related Questions

When is a referenced texture actually loaded? 0 Answers

Dynamic batching not working with direct X? 0 Answers

How to switch graphics API by code? 1 Answer

runtime check for OpenGL 1 Answer

How to reassign buffer obtained from GetNativeIndexBufferPtr() from directX/opengl? 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