-
Posts
2,836 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by nli2work
-
Command Pod Ladders are Clickable In-game
nli2work replied to Ven's topic in KSP1 Modelling and Texturing Discussion
set the layer to Part Triggers for airlocks and ladders -
or, a collection of errors and their (potential) solutions. the basic idea is to have a collection of errors during modding that are not common; log the error messages and their solutions, so present and future modders can potentially find a solution quickly. Caveat being the dreaded NullReferenceException error where the exact error message may or may not be helpful and the context of the situation is more important. In those cases, please provide as much information as possible. if adding to the thread, please include exact error message from output_log.txt or Unity Console, explanation of the cause, and solution, with Unity screenshots where possible. follow the format of the examples below. Please only add issues that you can replicate and resolve consistently. Problem: File error: at (wrapper managed-to-native) UnityEngine.Mesh:get_vertexCount () at KSPPartTools.PartWriter.WriteMesh (System.IO.BinaryWriter bw, UnityEngine.Mesh mesh) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.WriteCollider (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.WriteChild (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.WriteChild (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.WriteChild (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.Write (System.String modelName, System.String filePath, UnityEngine.Transform target, TextureFormat textureFormat) [0x00000] in <filename unknown>:0 found in Unity Console, CTRL-SHIFT-C Explanation: Occurs during export, prevents MU from being created, or a corrupted MU, no textures exported. Typically caused by missing mesh assignment in mesh filter component or mesh collider component. Solution: Assign mesh in Unity where missing Problem: File error: at (wrapper managed-to-native) UnityEngine.Object:get_name () at KSPPartTools.PartWriter.WriteAnimation (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.WriteChild (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.WriteChild (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.Write (System.String modelName, System.String filePath, UnityEngine.Transform target, TextureFormat textureFormat) [0x00000] in <filename unknown>:0 found in Unity Console, CTRL-SHIFT-C Explanation: occurs during Export; no MU is created; no textures created. caused by missing animation clip assignment or extra animation clip slot. Solution: assign necessary animation clip in each slot; or reduce Size to match # of animation clips. if duplicate entries exist, may need to manually set a duplicate slot to None before able to reduce the Size fie Problem: File error: Out of memory at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int) at A..ReadAnimation (System.IO.BinaryReader br, UnityEngine.GameObject o) [0x00000] in <filename unknown>:0 at A..ReadChild (System.IO.BinaryReader br, UnityEngine.Transform parent) [0x00000] in <filename unknown>:0 at A..ReadChild (System.IO.BinaryReader br, UnityEngine.Transform parent) [0x00000] in <filename unknown>:0 at A..ReadChild (System.IO.BinaryReader br, UnityEngine.Transform parent) [0x00000] in <filename unknown>:0 at A.. (.UrlFile ) [0x00000] in <filename unknown>:0 (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) found in KSP_Data/output_log.txt Explanation: No errors during export. Error occurs during game loading, prevents part from compiling and loading into game database; possibly preventing subsequent parts from being loaded into the game. Caused by unexpected animation curves that KSP loader can not read. On rare occasions it can be a corrupted animation curve that was intended, in which case the animation clip should be recreated in Unity before exporting the MU. Solution: check animation clip for unwanted animation curves on properties like "Play Automatically"; Component's On/Off property. Generally any property that is not Transform; Emissive Color/Alpha; Light Color/Intensity/Range, should not have animation curve. Problem: Material doesn't have a texture property '_MainTex' UnityEngine.Material:GetTextureScale(String) KSPPartTools.PartWriter:WriteMaterialTexture(BinaryWriter, Material, String, TextureType) KSPPartTools.PartWriter:WriteMaterial(BinaryWriter, Material) KSPPartTools.PartWriter:Write(String, String, Transform, TextureFormat) KSPPartTools.PartToolsInspector:DrawWriterGUI() KSPPartTools.PartToolsInspector:OnInspectorGUI() PartToolsEditor:OnInspectorGUI() (at Assets/Editor/PartToolsEditor.cs:18) UnityEditor.DockArea:OnGUI() found in Unity Console; CTRL-SHIFT-C Explanation: Occurs during part export. caused by missing shader assignment on a unity material. Solution: assign appropriate shader on the material Problem: PartLoader: Compiling Part 'RetroFuture/Command/med2mPodA/med2mPodA/med2mPodA' (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) NullReferenceException: Object reference not set to an instance of an object 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.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0 at PartLoader+.MoveNext () [0x00000] in <filename unknown>:0 (Filename: Line: -1) found in KSP_Data/output_log.txt Explanation: a texture related NullRef error that can be caused by few different things. clue typically provided by PartLoader: line just before the error message, it points to the MU that cannot find necessary texture. 1. missing texture in a shader's texture channel (see screen shot below) 2. missing, typo, incorrect syntax in MODEL{} texture assignment 3. missing dummy texture in Part folder 4. missing target texture, either in Part folder, or some other location if referencing existing textures. Solution: 1. assign textures to the shader where missing 2. check config file MODEL{} and make sure all textures required by the MU file is listed, and full path to target texture is correct. check for syntax errors. check each opening bracket has associated closing bracket. target textures that reside in same folder as MU file typically do not cause this error. MODEL { [INDENT]model = MyMod/Part/part //full path to part folder with MU file name. without ".mu" extension [COLOR="#FF0000"][B]textrue[/B][/COLOR] = texture1, MyMod/Textures/texture1 //texture names must match exactly texture = [COLOR="#FF0000"][B]textre2[/B][/COLOR], SomeOtherMod/Part/texture2 etc[/INDENT] } 3 and 4. make sure referenced texture and target textures exist at expected locations and file names match with what is in MODEL{} Problem: File error: Failed to read past end of stream. at System.IO.BinaryReader.ReadByte () [0x00000] in <filename unknown>:0 at System.IO.BinaryReader.Read7BitEncodedInt () [0x00000] in <filename unknown>:0 at System.IO.BinaryReader.ReadString () [0x00000] in <filename unknown>:0 at A..ReadTextures (System.IO.BinaryReader br, UnityEngine.GameObject o) [0x00000] in <filename unknown>:0 at A..ReadChild (System.IO.BinaryReader br, UnityEngine.Transform parent) [0x00000] in <filename unknown>:0 at A.. (.UrlFile ) [0x00000] in <filename unknown>:0 (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) part generates following error in Unity during Export File error: Cannot cast from source type to destination type. at KSPPartTools.BitmapWriter.Write2D (UnityEngine.Texture texture, System.String newPath, TextureType texType) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.WriteTexture (UnityEngine.Texture texture, System.String path, System.String filePath, KSPPartTools.TextureDummy tex, System.String filename) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.WriteTextures (System.IO.BinaryWriter bw) [0x00000] in <filename unknown>:0 at KSPPartTools.PartWriter.Write (System.String modelName, System.String filePath, UnityEngine.Transform target, TextureFormat textureFormat) [0x00000] in <filename unknown>:0 UnityEngine.Debug:LogError(Object) KSPPartTools.PartWriter:Write(String, String, Transform, TextureFormat) KSPPartTools.PartToolsInspector:DrawWriterGUI() KSPPartTools.PartToolsInspector:OnInspectorGUI() PartToolsEditor:OnInspectorGUI() (at C:/Users/Ven/Documents/KsPMAKE/Assets/PartTools/Editor/PartToolsEditor.cs:18) UnityEditor.DockArea:OnGUI() Explanation: Similar to earlier error message related to Animation. MU file was exported incorrectly due to texture related issue in Unity. Solution Check part's materials in Unity for incorrect source texture format, like assigning a DDS texture to the part in Unity. Problem: NullReferenceException: Object reference not set to an instance of an object at InternalButtonLight.OnAwake () [0x00000] in <filename unknown>:0 at InternalModule.Load (.ConfigNode node) [0x00000] in <filename unknown>:0 at InternalProp.AddModule (.ConfigNode node) [0x00000] in <filename unknown>:0 at InternalProp.Load (.ConfigNode node) [0x00000] in <filename unknown>:0 at PartLoader.LoadInternalProp (.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) Something related to PartModules, start with Config file Module blocks, and ModuleManager changes, make sure PartModules are referencing correct GameObject in the MU.
-
real time reflections are beautiful! doesn't play well with emissive textures however; there isn't a reflective shader with emissive or transparency properties in Unity. is it possible to add one in TR? with 1/0 option to use uniform reflection strength instead of using Alpha channel, still controlled by "colour=" setting? or set TRReflection to use the Visor shader (if thats what kerbal's are still using)? That way the TRReflection can play with Emissives and TransparentPods.
-
Missing Animation Toggle button
nli2work replied to Nupol's topic in KSP1 Modelling and Texturing Discussion
when you import the part to Unity, the embedded animation is a single clip, you see an entry with a Play button icon. when you add more clips in the imported file's Animations tab, more entries will be added to the imported part. get rid of MainClip and CloseClip. you only need OpenClip from 0 to 49. Unless the door closes in a different way than reverse of door opening, in which case you have to decide which way you want the door to operate. ModuleAnimateGeneric only uses one animation clip, when you trigger startEvent, the clip is played from frame 0 to last frame and startEvent is disabled. endEvent trigger is enabled when clip reaches last frame and clip is played from last frame to frame 0 when you trigger endEvent. where triggerEvents states return to the beginning. multiple clips need multiple ModuleAnimateGeneric, and the different clips should not animate same objects. your animation component should look like this http://i.imgur.com/W0C83HT.jpg; and make sure you are using Animation; not Animator check the brackets and other syntax in the config. that's the usual suspect when buttons don't show up as expected in a part. Modules are loaded in the same order as they are in the config; one module that fails to load will prevent subsequent modules from loading properly. -
Part dont show up in KSP
nli2work replied to Nupol's topic in KSP1 Modelling and Texturing Discussion
that just means your mesh is perfectly symmetrical, and the pivot from blender, or where ever else, was centered before you exported to Unity. that's good thing. according to your node positions and screenshots: your part is 0.5m tall, and your part's CoM is at +0.134Y; about 1/4th way up from bottom. your nodes should be 0,0.25,0; and 0,-0.25,0 respectively, which is what you really want to have. -
Part dont show up in KSP
nli2work replied to Nupol's topic in KSP1 Modelling and Texturing Discussion
once you've imported in to Unity, don't worry about blender axis. set the markers to Pivot/Local; top left in this screen http://i.imgur.com/V0ylOJD.jpg. then look at the XYZ positions as guide to place your stack nodes. based on that image, your top and bottom stack nodes should be around 0, 0.13, 0; and 0, -0.13, 0 respectively. -
Part dont show up in KSP
nli2work replied to Nupol's topic in KSP1 Modelling and Texturing Discussion
MODEL{} uses "model = " line. "mesh =" is if you are not using MODEL{}. don't mix the two. add "mesh collider" component to your node_collider object (click on Add Component and start typing mesh); check "Convex"; make sure the mesh field in the collider component says "node_collider"; then remove the (Mesh Filter) component. you'll see a green outline of the collider if you have it set up correctly. all collider components are color coded with light green icons. -
Ambient Occlusion Artifacts + Weirdness
nli2work replied to Quiznos323's topic in KSP1 Modelling and Texturing Discussion
adding alpha channel in GIMP; they should be editable just like any other layer after you add it, I tend to copy/paste a diffuse into the alpha as a starter before adjusting contrast/brightness; levels; etc. FXLookConstraint points the the mover object's +Z toward the target transform. your initial mover transforms have to be rotated such they are aimed a the targets when at the neutral orientations. you can align the pivots in blender and use the mesh objects directly as movers, or you can add additional transforms in Unity as mover objects (child the mesh to the mover objects you've added). the rotation of the target objects is not important, only their position. the target object child of thrustTransform (or engine bell), which is moved by ModuleGimbal; and the piston objects to rotate in order to aim at the targets. if an transform involved in a constraint module flips rapidly or drifts off into space it's most likely caused by circular constraint ( a bit like infinite loop in code). you need to step through your heirarchy and make rearrangements if that's the case. -
Ambient Occlusion Artifacts + Weirdness
nli2work replied to Quiznos323's topic in KSP1 Modelling and Texturing Discussion
in GIMP. alpha channel is not required for specular shaders. if alpha channel is not in a texture, it's assumed to be 255,255,255 -
[v0.90/v.25]Transparent Pods v1.2.2 for KSP v0.90
nli2work replied to nli2work's topic in KSP1 Mod Releases
try just the plugin. the full package may not have the newest plugin. do you remember which ones? - - - Updated - - - I have consistent ATM crashes, I think it's my ATM config that's faulty. for the time being removing the RF_ATMPatch.cfg from RetroFuture/Patches/ should get rid of the texture related crashes. -
Ambient Occlusion Artifacts + Weirdness
nli2work replied to Quiznos323's topic in KSP1 Modelling and Texturing Discussion
spec map go in the diffuse's alpha channel. in the specular shaders's Main_Tex you will see RGB(A); indicating Alpha channel is being used for specular intensity. specular size is controlled by the glossy slider and is global to the material. -
[v0.90/v.25]Transparent Pods v1.2.2 for KSP v0.90
nli2work replied to nli2work's topic in KSP1 Mod Releases
make sure you have the 0.9 Firespitter DLL from snjo.github.io -
[v0.90/v.25]Transparent Pods v1.2.2 for KSP v0.90
nli2work replied to nli2work's topic in KSP1 Mod Releases
yeah that's normal. I find it kind of annoying, might end up ditching it eventually. -
[v0.90/v.25]Transparent Pods v1.2.2 for KSP v0.90
nli2work replied to nli2work's topic in KSP1 Mod Releases
TransparentPods have been tested in v0.9; all appears to be in good working order. minor texture update so the glass panels are slightly more visible; still transparent. requires RPM v0.90 DLLs provided by MOARdV++ working on testing RetroFuture -
Ambient Occlusion Artifacts + Weirdness
nli2work replied to Quiznos323's topic in KSP1 Modelling and Texturing Discussion
can try increasing your shadow map resolution, or whatever the blender name is. it will take a little longer to bake, but not as long as it will take to make your mesh 100% contiguous. -
nice job! first step complete!
-
ModuleEngineFX with no thrustTransform?
nli2work replied to Diazo's topic in KSP1 Modelling and Texturing Discussion
so 1 transform at 30 degrees X and 2nd transform at -60 degrees X would yield thrust at -30 degrees X? the xyz components would average out in the end for the final thrust vector no? -
ModuleEngineFX with no thrustTransform?
nli2work replied to Diazo's topic in KSP1 Modelling and Texturing Discussion
1. doesn't have to be "thrustTransform", that's just a convention people tend to follow. any transform's +Z axis can work for thrust. check the part config to see what transform the engine module is using for thrust. for ModuleEnginesFX, FX and thrust do not have to use the same transform. FX transform is defined in the EFFECT{}; thrust is defined in Engine{}. 2. yes, all transform with the same name given to Engine{} will be used. thrust is the averaged position (and possibly orientation) of all the transforms. -
did you extrude and/or chamfer edges? the first two looks like a long oblique triangle causing the artifact at the corner where the black/white heat tiles meet. add a little more division and try switching triangulating direction in that area. can't really make out what the last image is doing without seeing the wire frames, looks like a smoothing group issue. try splitting the black tiles to a different group.
-
For some transparent objects I find KSP's particle shaders give slightly better results. Additive is a little like Translucent/Unlit; and Alpha blended particle shader is a little like standard Translucent. You will probably get best result with 2 nested cylinders with small gap (glass wall thickness), flip the faces on the inside one so the normals point inside. some Unity shaders will work in KSP. Unity particle shaders will not. there's no real advantage with using Unity shaders over KSP shaders... generally it's better to stick with KSP shaders included with PartTools.
-
Moving Collider Animation Issue
nli2work replied to Beale's topic in KSP1 Modelling and Texturing Discussion
it might be in MKS. it was in Karbonite last I remember. here's the other thread, now that I looked through it... the setup should work instead of dropping through the launchpad, I got a simple version of his part working as intended. maybe that thread can offer some ideas. http://forum.kerbalspaceprogram.com/threads/100574-Help-with-jumping-parts-with-colliders -
Moving Collider Animation Issue
nli2work replied to Beale's topic in KSP1 Modelling and Texturing Discussion
ModuleLandingLeg only accepts 1 wheelCollider. you'd need to make a single leg and attach it 4 times. might wanna take a look at RoverDude's lander frame. same setup as yours. I don't recall it having the issues you are experiencing though I could be wrong. someone was dealing with same problems you have now, not sure if that was resolved. -
I'd do two discs for the top and bottom caps with diffuse/specular shader; then an open ended cylinder for the glass. for glass translucent/specular should work well. you can try the particle shaders too.
-
FK is forward-kinematics; simplest way of animating a skeleton chain. if you didn't set up any rigs (in maya, max, blender, etc), you are animating FK. Unity is FK only if you are not running any plugins. FBX is basic file format for import into Unity, stores mesh/UV; skinned mesh and vertex animation; light and camera information.