-
Posts
2,719 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by rbray89
-
It's usually a better idea to try and work with people trying to accomplish the same things rather than to strike out on your own. This is a community after-all. That being said, I will gladly help you in any way that I can with regards to how my visual enhancement mod works. I learned a LOT about unity, KSP, shaders, graphics & rendering while working on this mod. I already know C#/.net VERY well, and it would have taken me much, MUCH, longer to get where I am with my mod had I not known about VS & C#. If I were you, I would start out by learning C#. Learn about the generic storage types (List<>, Dictionary<,>, etc.), c# arrays, accessesor permission keywords, properties (one of the best features of this language IMHO), how C# passes/handles references (may need keyword ref), and good OO programming basics. Once you understand everything I just talked about, then I would look at drafting requirements for a mod.
-
Anyone have memory issues spring out of nowhere?
rbray89 replied to Frostiken's topic in KSP1 Mods Discussions
Haha, sorry about that... if I had known I would end up creating another mod I would have named it differently, but once done, can't undo with these kinds of things. -
Those for starters... those are probably complaints that textures aren't marked as normal maps and aren't readable? Add those textures into the normalmap list in the config. I loaded the game with some of those errors without issue, so I would probably keep looking. Search for "Error" and you might run into a unity stack dump. Looks a good bit different from the standard KSP log. There may be something right before that occurs that can give us some clues.
-
UPDATED. Found out what was going on. Ended up re-writing lots of code to handle normal maps, added handling for normalmapped pngs, and should work better than ever, though it *CAN* add quite a bit of time to startup. I ran at 1.77Gb and it takes ~2.5 Minutes to load to main menu (I have an SSD so YMMV). Have the following installed for test, but only KW, B9, Squad and BoulderCo are being managed: B9_Aerospace BoulderCo DeadlyReentry ExsurgentEngineering Firespitter HexCans KineTechAnimation KWRocketry ResGen Squad TreeLoader WarpPlugin
-
I thought about that, but there are a couple issues: Due to how KSP handles formats, there is really no image format that is completely suitable for managing textures perfectly. non-normal MBMs and PNGs are always compressed, PNGs don't generate mipmaps, TGAs aren't compressed, and doing it this way would mean that people would have to edit the files on disk. Something that I eventually figured out how to avoid.
-
I realized that there is something going on behind-the-scenes with normal maps and readability. I think KSP converts them. I moved the readability application to the end, and will be packaging a new version soon that won't require readability to be allowed except in very specific circumstances. Should be uploaded soon.
-
Just took a look at the first log... what is "Squad/Spaces/Common/common003b" from? Looks like the out of mem exception happens right after it can't be read. Try adding this to the LEAVE_READABLE section. EDIT: added snippet. PartLoader: Compiling Internal Space 'Squad/Spaces/GenericSpace1/internal/GenericSpace1' (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54) UnityException: Texture 'Squad/Spaces/Common/common003b' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings. at (wrapper managed-to-native) UnityEngine.Texture2D:GetPixel (int,int) at GameDatabase.BitmapToUnityNormalMap (UnityEngine.Texture2D tex) [0x00000] in <filename unknown>:0 at GameDatabase+TextureInfo.get_normalMap () [0x00000] in <filename unknown>:0 at PartLoader.ReplaceTextures (UnityEngine.GameObject model, System.Collections.Generic.List`1 textureNames, System.Collections.Generic.List`1 newTextures) [0x00000] in <filename unknown>:0 at PartLoader.CompileModel (.UrlConfig cfg, .ConfigNode partCfg, Single scaleFactor) [0x00000] in <filename unknown>:0 at PartLoader.LoadInternalSpace (.UrlConfig urlConf) [0x00000] in <filename unknown>:0 at PartLoader+.MoveNext () [0x00000] in <filename unknown>:0 UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) :MoveNext() (Filename: Line: -1) DynamicHeapAllocator out of memory - Could not get memory for large allocationCould not allocate memory: System out of memory! Trying to allocate: 1398128B with 32 alignment. MemoryLabel: Texture Allocation happend at: Line:388 in Memory overview
-
Ah, I need to update that in the readme. Some textures can't be marked as non-readable, so they have to be added to the "LEAVE_READABLE" list in the config. The textures it complains about are those textures. I hope to compile a list and gradually add the big part mods to the config so everything will work by default. That is why currently, I only compress the textures.