Gamestudio Links
Zorro Links
Newest Posts
video memory and d3d_texfree
by Superku
9 minutes 58 seconds ago
priceClose() - How to use actual bar close in live trading?
by jcl
Today at 18:50
Exporting data from multiple timeframe
by gtell
Today at 18:46
Trading few minutes before market close
by GreenBoat
Today at 18:21
What are you working on?
by Ayumi
Today at 15:43
AUM Magazine
Latest Screens
Triton Wing
ZeaL
Computer Repair Simulator
Collider (working title)
Space Rider
Who's Online
22 registered (Dalla, Ayumi, ibne, Ch40zzC0d3r, Iglarion, GreenBoat, gtell, alibaba, firecrest, 2 invisible), 441 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
tonecosta, 3dgamelight, izybikawu, janversa, Unsane
17609 Registered Users
Page 1 of 5 1 2 3 4 5 >
Topic Options
Rate This Topic
#464863 - 03/15/17 20:49 video memory and d3d_texfree
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1658
Loc: Netherlands
Hello,

I am developing my game on a laptop with a 840m gpu which has 2 gb ddr3 video memory (http://www.notebookcheck.net/NVIDIA-GeForce-840M.105681.0.html).
When I check d3d_texfree in my current game project, I seem to have alot of video memory free (on startup its something like 4095 and than goes to circa 3100). Except when I am nearing circa 3100 it eventually gives error messages when I am placing more models in the map with fairly big textures (2048x2048 with normal maps too). (It does not seem to be related to a specific model or texture).

The error message -> "Error E2005 - Can't create D3D texture
The texture format is invalid or unsupported by your video card. Very old video cards often don't support DirectX 9 and can not create textures of the given size or format."

So how come I get these messages when d3d_texfree seem to show that I have still enough free video memory?
Thanks for taking the time.


Edited by Reconnoiter (03/15/17 20:49)

Top
#465011 - 03/25/17 17:55 Re: video memory and d3d_texfree [Re: Reconnoiter]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1658
Loc: Netherlands
Nothing? eek

Top
#465072 - 03/29/17 01:24 Re: video memory and d3d_texfree [Re: Reconnoiter]
Iglarion Online
User

Registered: 07/09/04
Posts: 763
Loc: Serbia
Unfortunately i also have this problem with randomly geting e2005 error and i really stuck with this. First i think that problem was in textures but after converting all textures today i got again this error.

Why this error/crash appear randomly, and how i can be sure that texture is problem? For example i just now get error where i can see some untextured model on screen and now i know exactly what is suspicious texture (it's an tga texture 2048x2048x32). This is first time that this texture is problem. A big problem is i need to play my game almost one hour to reach this crash.



Manual say that old video cards can't support some texture size, but i have a modern gpu (GTX 1060)and this should not be a problem. Any idea what else can make this crash, could it be possible that this is a engine bug beacuse i don't know what is wrong with this texture?
Only what i can try now is resize all textures to 1024 dds and wait did crash will appear again.

Top
#465083 - 03/30/17 07:04 Re: video memory and d3d_texfree [Re: Iglarion]
Dooley Offline
Senior Member

Registered: 05/12/05
Posts: 425
Loc: Chicago, IL
I'm having the same problem. Sometimes it mentions the "Can't create D3D texture" and sometimes it just says "Out of Memory."

I will be looking into this over the next few day (or weeks). I will definitely post my findings here, if I figure anything out...
_________________________
Anomalies released on Steam: http://store.steampowered.com/app/546780

Check out "Star Explorers" on Steam: Greenlight
https://steamcommunity.com/sharedfiles/filedetails/?id=700074180

Top
#465089 - 03/30/17 17:00 Re: video memory and d3d_texfree [Re: Dooley]
Superku Online
Senior Expert

Registered: 09/13/03
Posts: 6536
Loc: Kiel (Germany)
I sometimes get this error too when I switch resolutions (video_set) and it's worrying me.
I have more than enough free memory, my game doesn't use that much texture memory anyway (the memory for post processing stages is probably a big chunk of it). I only use TGA files or bmap_createblack images.

I had it all (deactivating render stages, switching resolutions, freeing memory and allocating textures for the new screen size) logged into acklog.txt and a console but can't seem to find any of those logs right now. Will report and come back here when I have more information to share.
_________________________
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Superku side-scroller: ~98.5% (??????!??)

Steam® Store Page ("Coming Soon"): http://store.steampowered.com/app/407570 Wowowowow!

Top
#465090 - 03/30/17 18:41 Re: video memory and d3d_texfree [Re: Superku]
Ch40zzC0d3r Online
Serious User

Registered: 10/10/11
Posts: 1051
Loc: Germany
I also worked alot on this problem and I simply couldnt find a real fix.
It usually worked using dds textures which are compressed and damn small

Top
#465091 - 03/30/17 18:44 Re: video memory and d3d_texfree [Re: Superku]
Dooley Offline
Senior Member

Registered: 05/12/05
Posts: 425
Loc: Chicago, IL
I was able to solve it (I hope) by reducing a bunch of texture sizes. Whether the problem will reappear after extended play sessions is still a concern for me, but it's much more stable than it was before.

One thing I realized is that I could reduce the size of my normal maps without impacting the appearance as much.

I'm not sure what metric to use as far as how much texture size I can use, what's the limit, etc... it would be nice to have a specific number that we can make sure we stay under. Of course it would vary depending on video card, computer memory, nexus, etc...

I think this all falls under optimizing the game. I'm guessing that big name games have all sorts of tricks and methods of getting really big textures on screen seamlessly. Reduce, reuse, recycle ... that sort of thing.
_________________________
Anomalies released on Steam: http://store.steampowered.com/app/546780

Check out "Star Explorers" on Steam: Greenlight
https://steamcommunity.com/sharedfiles/filedetails/?id=700074180

Top
#465092 - 03/30/17 18:46 Re: video memory and d3d_texfree [Re: Dooley]
Dooley Offline
Senior Member

Registered: 05/12/05
Posts: 425
Loc: Chicago, IL
Oh, also, I'm using bitmaps mainly. I have read that dds is better for performance, so maybe I can get some texture size back if I switch over?
_________________________
Anomalies released on Steam: http://store.steampowered.com/app/546780

Check out "Star Explorers" on Steam: Greenlight
https://steamcommunity.com/sharedfiles/filedetails/?id=700074180

Top
#465095 - 03/31/17 13:02 Re: video memory and d3d_texfree [Re: Dooley]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1658
Loc: Netherlands
Quote:
Manual say that old video cards can't support some texture size, but i have a modern gpu (GTX 1060)and this should not be a problem. Any idea what else can make this crash, could it be possible that this is a engine bug beacuse i don't know what is wrong with this texture?
, I dont think your videocard is the bottleneck, but its the 32 bit Acknex engine I guess.

Quote:
I sometimes get this error too when I switch resolutions (video_set) and it's worrying me.
, I am not sure but perhaps higher video resolutions use more ram? Like they always say that for 4k or VR you need alot of ram.

Quote:
I had it all (deactivating render stages, switching resolutions, freeing memory and allocating textures for the new screen size) logged into acklog.txt and a console but can't seem to find any of those logs right now. Will report and come back here when I have more information to share.
, that would be helpful ty.

Quote:
I also worked alot on this problem and I simply couldnt find a real fix.
It usually worked using dds textures which are compressed and damn small
, tnx for the info, they seem to be the way to go when lossless/perfect image is not important. Though with .dds you cannot read the texture pixels right? (I am using pixel_for_bmap and pixel_to_bmap for a few things)

Quote:
One thing I realized is that I could reduce the size of my normal maps without impacting the appearance as much.
, reducing normal maps indeed helps, I did that for e.g. terrain where the difference in loss is not that noticeable.

The 'free mb' in the f11/diag window gives the same values as d3d_texfree. I noticed that when that gives e.g. 3667 (for a small intro map) in windows task manager it shows that Acknex uses 635 mb. For another map the d3d_texfree/free mb was something like ~3340 and in task manager Acknex used ~1620 mb (which is about the highest I can let Acknex get before I get that error again). There seem to be some difference between these values but I dont fully understand why.
I also tried setting nexus to e.g. 200 in Sed preferences but that doesn't seem to help either.
I did notice that other 32 bit programs like e.g. jasc paint shop pro also that that limit of ~1650 mb. While 64 bit corel paint shop pro can go much futher to e.g. somethig like >5600 mb in the task manager.
So checking task manager is probably the most reliable way to check if the game uses much ram.

I am personally using mostly .bmp. While the textures are not that high (with 2048x2048 as a max), I guess stuff like normal maps and shadow maps for lights double/triple their memory usage. In my game editor that doesn't use these shaders I could place alot more stuff (still not that much though).

So just keep to small maps than? Or maybe ent_purge some stuff (like terrain or buildings) when not visible? (though that does give a bit of lag when backtracking etc within maps...)

Top
#465096 - 03/31/17 15:09 Re: video memory and d3d_texfree [Re: Reconnoiter]
Iglarion Online
User

Registered: 07/09/04
Posts: 763
Loc: Serbia
Converting textures to DDS reduces the risk of a geting e2005 error, but i'm afraid this will not completely eliminate crash, and it's worrying me. I'll look deeper into this problem in the coming days and sure i'll let you know if i come up with some new information.
The most worrying thing is that the more people who have a lot of experience with Acknex has this problem.
_________________________
IGRAVISION Page - www.igravision.com
RPG project - The Battle For Forgol 92.50%

Top
Page 1 of 5 1 2 3 4 5 >


Moderator:  elsewood, old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs | beta features

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net