Page 7 of 9

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 1:44 pm
by bongobeat
that's I do everytime, but I got always trouble. I recently cheated with that by increasing the maximum memory that can be used by applications under win32 bit, by using

Code: Select all

bcdedit /set IncreaseUserVa 3072
I have also edited the grimrock2.exe with cff explorer, modifying the file header characteristic that allow the application to use more than 2 gb of memory.

Seems that now, I don't have any issue to export the mod, but in the game, in high definition, I got the message "not enough memory" when starting the mod. If I run it with texture set to medium and rendering high, I can play the mod, but after time I got the same issue.

I don't know if it is the amount of textures or an error about a script in the dungeon, or maybe an issue with a texture?

most of the time I use normal and specular log2 textures for most of the new textures, except some that are in the imported wallsets. it is not visually perfect, but it save ressources (I guess)
that's why I got only 116 Mo of new textures, with the town wallset, the dark elf wallset, Oddinballs custom wallset, and my customs wallset.

Actually the mod_asset is about 345 Mo, about 116Mo of new textures, 51 Mo for models and about 161 Mo of musics and sounds (not all musics are used and there is 5Mo of sounds)

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 2:02 pm
by Dr.Disaster
bongobeat wrote:that's I do everytime, but I got always trouble. I recently cheated with that by increasing the maximum memory that can be used by applications under win32 bit, by using

Code: Select all

bcdedit /set IncreaseUserVa 3072
I have also edited the grimrock2.exe with cff explorer, modifying the file header characteristic that allow the application to use more than 2 gb of memory.

Seems that now, I don't have any issue to export the mod, but in the game, in high definition, I got the message "not enough memory" when starting the mod. If I run it with texture set to medium and rendering high, I can play the mod, but after time I got the same issue.
When do you get the "not enough memory" message? Below or above 2 GB memory usage?

Task-Manager's Process List will tell this while the mod is loaded by the game engine.

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 3:40 pm
by bongobeat
it is below the 2gb: 1,7Gb

this is what I got while launching the mod in high details, after the mod is loaded, the game crash, without seeing the level.
SpoilerShow
Image

and if I set the texture details to medium, but leave other options to high, I finally can play the mod, but:
after 9 min of game play, in the last levels , I got a crash
SpoilerShow
Image
I'm currently testing by removing "heavier" scripts, actually I have removed the multi alcove manager script, but it crash always. I will try again with removing the NPC script.

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 3:45 pm
by Dr.Disaster
In other words: the executable is still bound by the 32-bit 2GB memory limit.

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 3:58 pm
by Drakkan
hey bongo,

I am glad I am not the only one who has this memory problems :/
Actually my mod grew so huge, that I was not able to playtest inside editor, because it immediately crashed with not enough memory problem. I set all the details and resolution to low and now I am able to test and do something, but cannot do some longer playtrough in the editor. The only possibility is currently to export the dungeon and play out of editor :/
let me know if you find something interesting, I am sure we are using many similar scripts from the forum although I do not think this is the problem...

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 5:30 pm
by maneus
bongobeat wrote:
SpoilerShow
Image
Nice new pictures, bongobeat. Have you seen that your stone wall have a wrong normal map?
It seems that you use the normal map of the dungeon wall from Grimrock 1.
The four prodruding stones around the middle of the wall are not optimal. They interrupt the good overall impression of the wall.

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 6:16 pm
by bongobeat
Dr.Disaster wrote:In other words: the executable is still bound by the 32-bit 2GB memory limit.
I don't know, how can you say that?
In the ms dos prompt command (executed as admin), it shows me that the new settings are done correctly, and for the executable when you open it with cff, the tikbox "allow to use more than 2 gb...etc" is checked.
For me, whatever is in my mod, the editor and the game still don't use more than 2gb of data in memory as the maximum that I see is 1,7gb, so I don't know why it crashes. Or I misunderstand something.
I ve read on another thread, don't remenber where, that log2 can use maximum of 1,5 gb of memory, Is that the 32bit restriction?
Drakkan wrote:hey bongo,

I am glad I am not the only one who has this memory problems :/
Actually my mod grew so huge, that I was not able to playtest inside editor, because it immediately crashed with not enough memory problem. I set all the details and resolution to low and now I am able to test and do something, but cannot do some longer playtrough in the editor. The only possibility is currently to export the dungeon and play out of editor :/
let me know if you find something interesting, I am sure we are using many similar scripts from the forum although I do not think this is the problem...
no problem, I got the same issu, but you have to just run part of the levels in the editor, to test them. I got something like 50-60 levels, even in low quality, I can not run the preview, so I had to uncheck all levels that I dont currently need. This is the eternal problem both in log1 or log2, too much additional textures :lol:
I'm currently removing any external script, which are more than basic scripting. But I don't think that comes from the scripts. Maybe I got bad specular or normal textures. Or some have bad dimensions.
maneus wrote:
bongobeat wrote:
SpoilerShow
Image
Nice new pictures, bongobeat. Have you seen that your stone wall have a wrong normal map?
It seems that you use the normal map of the dungeon wall from Grimrock 1.
The four prodruding stones around the middle of the wall are not optimal. They interrupt the good overall impression of the wall.
thanks, no I did not really notice that. This wall model is from the sx town wallset, I have just modified the material definition and set it that it use the log2 castle outside wall textures, dif, spec and normal. Of course this wall model does not fit for this texture, maybe it is why this doesnt look well? I aggree with you about these four stones. It certainly need some modifications in blender, but I don't want to loose time with that. Too much complicated for me.

I did it only for 2 things:
1 because it looks "better" as I use this wallset with log 2 castle wallset in the same level, I mean about the grey colored walls.
2 I do no longer need 4 or 5 mb of texture files.

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 6:25 pm
by minmay
Removing scripts will do almost nothing to reduce memory usage. It's textures that you need to worry about.

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 7:10 pm
by Dr.Disaster
bongobeat wrote:
Dr.Disaster wrote:In other words: the executable is still bound by the 32-bit 2GB memory limit.
I don't know, how can you say that?
In the ms dos prompt command (executed as admin), it shows me that the new settings are done correctly, and for the executable when you open it with cff, the tikbox "allow to use more than 2 gb...etc" is checked.
For me, whatever is in my mod, the editor and the game still don't use more than 2gb of data in memory as the maximum that I see is 1,7gb, so I don't know why it crashes. Or I misunderstand something.
On that I'd like to quote a bit from here:
All the memory you have access to is virtual - you cannot access physical memory directly from an application. The OS will use the page file as needed - the effect you'll see by having many applications exhausting physical memory is increased swapping, and noticable slowdown.

On Win 32 bit, the application has 2GB of Virtual Address Space available. This is used for mapping executables and DLLs, for e.g. memory-mapped files, for stack and heap. This space is typically somewhat fragmented. If your application is built as "Large Address Aware", and the OS is 64-bit or configured to split user/kernel-mode memory as 3/1GB, the address space is almost 4GB for 64-bit, and 3GB for 32-bit.

The memory you can allocate is typically in the 17-1800 MB range. If you allocate small portions, you'll reach this, if you try to allocate large consecutive blocks you may hit the limit a lot earlier, as your address space is fragmented.
This means that LoG2 already makes good use of the memory it can access and you won't see it go higher then 1.8GB.

"modifying" the grimrock2.exe header alone might not do depending on if the application was build (compiled/linked) to support 2+GB of memory or not. Also even if it would do everyone(!) who would like to play your mod would have to modify both their system and their grimrock2.exe in the very same way or otherwise your mod won't work for them either.

Re: Wall Sets LOG 1 Ported over to LOG 2

Posted: Tue Feb 24, 2015 7:24 pm
by minmay
Remember that editor preview uses more RAM and VRAM than playing the game normally and I think it actually has resource leaks as well.