Jump to content

HotRockets! Particle FX Replacement + Tutorial


Nazari1382

Recommended Posts

Having the full exception text whould help, because NullReferenceException is then most common exception you can get with a KSP mod.

And as Taverius said I'll look into it. Since it starts at 750m/s it's related to KrakenBane and use worldspace set to false.

I believe this is what you're looking for:


NullReferenceException
at (wrapper managed-to-native) UnityEngine.ParticleEmitter:get_particles ()

at ModelMultiParticlePersistFX.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)


NullReferenceException
at (wrapper managed-to-native) UnityEngine.GameObject:get_transform ()

at ModelMultiParticlePersistFX.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)


NullReferenceException
at (wrapper managed-to-native) UnityEngine.ParticleEmitter:get_useWorldSpace ()

at EffectBehaviour.OffsetParticles (Vector3 offset) [0x00000] in <filename unknown>:0

at Krakensbane.setOffset (Vector3d offset) [0x00000] in <filename unknown>:0

at Krakensbane.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

That is spammed in my output_log.txt file, which you can download here (24.6MB) https://www.dropbox.com/s/sdx99escpt5loef/output_log.txt

Link to comment
Share on other sites

I believe this is what you're looking for:

No, it's not. I can't get that log from work but it looks like a bad config, not a problem with the mod. I should add some check to not spam error when a bad config is used.

The engine issue was fixed 2 days ago. Get the newest SmokeScreen.

Link to comment
Share on other sites

Is there a way to use effects nodes to rotate the direction of particle effects? I'm trying to customize an engine with the fx_gasjet_white effect but the effect is coming out pointing 90 degrees to the rocket nozzle.

Edited by passinglurker
Link to comment
Share on other sites

fx_gasjet_white sounds like a PREFAB_PARTICLE.

These are old effects running under compatibility mode.

Only about 50% of them point the right way when attached via ModuleEnginesFX to the same point they were attached to with ModuleEngines. I don't know why this is so.

If you want to experiment with the new FX, you want to play with MODEL_MULTI_PARTICLE/MODEL_MULTI_PARTICLE_PERSIST stuff. The latter is from SmokeScreen.

Link to comment
Share on other sites

No, it's not. I can't get that log from work but it looks like a bad config, not a problem with the mod. I should add some check to not spam error when a bad config is used.

The engine issue was fixed 2 days ago. Get the newest SmokeScreen.

As I'm launching my rocket, after my initial stage separation (already moving 750m/s+ and over 12km in altitude), the debug log in-game shows the following. Note, there are no errors being spammed in the log prior to the separation and packing events.


Packing Kethane/ScanOreSat 3 Debris for orbit

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

Kethane/ScanOreSat 3 Debris Unloaded

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

Packing Kethane/ScanOreSat 3 Debris for orbit

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object:get_name ()

at SmokeScreen.SmokeScreenUI.windowGUI (Int32 ID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object:get_name ()

at SmokeScreen.SmokeScreenUI.windowGUI (Int32 ID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.GameObject:get_transform ()

at PersistentEmitterManager.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.ParticleEmitter:get_particles ()

at ModelMultiParticlePersistFX.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.ParticleEmitter:get_particles ()

at ModelMultiParticlePersistFX.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.ParticleEmitter:get_useWorldSpace ()

at EffectBehaviour.OffsetParticles (Vector3 offset) [0x00000] in <filename unknown>:0

at Krakensbane.setOffset (Vector3d offset) [0x00000] in <filename unknown>:0

at Krakensbane.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.GameObject:get_transform ()

at PersistentEmitterManager.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.ParticleEmitter:get_particles ()

at ModelMultiParticlePersistFX.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.ParticleEmitter:get_particles ()

at ModelMultiParticlePersistFX.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.ParticleEmitter:get_useWorldSpace ()

at EffectBehaviour.OffsetParticles (Vector3 offset) [0x00000] in <filename unknown>:0

at Krakensbane.setOffset (Vector3d offset) [0x00000] in <filename unknown>:0

at Krakensbane.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.GameObject:get_transform ()

at ModelMultiParticlePersistFX.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.GameObject:get_transform ()

at ModelMultiParticlePersistFX.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

Kethane/ScanOreSat 3 Debris Unloaded

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

Packing Kethane/ScanOreSat 3 Debris for orbit

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

Kethane/ScanOreSat 3 Debris Unloaded

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

Packing Kethane/ScanOreSat 3 Debris for orbit

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object:get_name ()

at SmokeScreen.SmokeScreenUI.windowGUI (Int32 ID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

(Filename: Line: -1)

I have no issues when Hotrockets / Smokescreen is not installed. As soon as the errors start being generated, they are literally spammed in the log file at an extremely high rate. The log file will grow in size at 100-200 KB/sec.

What do you need from me to help track down this issue? I am not using any custom created configuration files for Smokescreen, just the standard Hotrockets download.

Link to comment
Share on other sites

As I'm launching my rocket, after my initial stage separation (already moving 750m/s+ and over 12km in altitude), the debug log in-game shows the following. Note, there are no errors being spammed in the log prior to the separation and packing events.

...

I have no issues when Hotrockets / Smokescreen is not installed. As soon as the errors start being generated, they are literally spammed in the log file at an extremely high rate. The log file will grow in size at 100-200 KB/sec.

What do you need from me to help track down this issue? I am not using any custom created configuration files for Smokescreen, just the standard Hotrockets download.

I'll need the engine model used when you had the problem. The log is telling me where the problem is, so it should be a quick fix once I'm back from work.

Link to comment
Share on other sites

Hey guys

The recent Novapunch update did mess some things up, had to disable the configs. The FX did always run, even if the engines were turned off... They renamed some of the engines and SRB's, made new ones and deleted others.

Regards

Link to comment
Share on other sites

I'll need the engine model used when you had the problem. The log is telling me where the problem is, so it should be a quick fix once I'm back from work.

The boosters on the side use the Kerbodyne KR-2L Advanced Engine, the main stage has The Matriarch (5 meter) from NP.

-edit to add-

It's shortly after the boosters separate off when the issue starts.

Edited by pantheis
Link to comment
Share on other sites

The RLA linear aerospike.. Is there a way for it to have a flat shockwave? It looks a bit weird to have round shockwaves coming off a linear surface and from what tests they did IRL of linear aerospikes, it's not realistic either. I don't mind the blue, it's the shape that I have a problem with.

This may or not be a reason to show you my latest screenshot (actually, it does demonstrate my issue quite well)

HFWWdPH.png

Link to comment
Share on other sites

Oh... I only thought it was possible because the particle coming out of the engine doesn't seem to rotate or come out in a different orientation. How about, then, maybe smaller round ones in a line? At least something not as obviously round. The rest of the effects are superb though, the stock effects look so dull compared to these.

Link to comment
Share on other sites

They are rotating. They're rotating constantly to orient perpendicular to the camera, otherwise they wouldn't look round, they'd look oviod. ;)

You can use the EFFECTS node to set up lots of small particle systems in a line, yes.

Link to comment
Share on other sites

Well, after much testing (2 minutes of it), I've found out the huh, I'm wrong.

They already do come out in a line and it appears as though some are indeed rotated round. So yeah, a flat shockwave would seem to be impossible.

6MTTdPo.png

I'm wondering then, what to do to make them not appear so round when viewed from the side. You said they rotate to stay perpendicular to the viewer, and that's nice and all, but I still get round shockwaves coming off a flat surface. I'm thinking maybe making them smaller to begin with or something, but unless someone ELI5's that to me, I've no idea how I would.

Link to comment
Share on other sites

Non-omnidirectional billboard fx are a major pain in the behind.

Me and bac9 tried setting some up for some B9 engines we're working on, and in the end gave up :D

We did send it to nazari so maybe he/she will be able to figure it out how to make it work, but it was definitely non-trivial.

Link to comment
Share on other sites

The particles system (Unity Legacy) used by KSP has a lot of limitation. Some can be ignored with clever use of what we have but other are harder. You could make the shock wave ok from the side but then it would not look ok from the back.

If Unity somehow make its shuriken particle system fully scriptable then it would become easier, but I doubt this is going to change soon, if ever.

Link to comment
Share on other sites

The particles system (Unity Legacy) used by KSP has a lot of limitation. Some can be ignored with clever use of what we have but other are harder. You could make the shock wave ok from the side but then it would not look ok from the back.

If Unity somehow make its shuriken particle system fully scriptable then it would become easier, but I doubt this is going to change soon, if ever.

One game i know "solve" this issue by emiting a quad right at the engine nozzle which faces towards the exhaust velocity's direction. hence you will get slightly better result when you are standing right behind the nozzle. (although if you are using additive shader, you still get a small area that is brighter than the surrounding because two additive rendering happened there) at least the nozzle will be fully covered by that sprite.

Link to comment
Share on other sites

Sorry for this stupid question but I love your addons, but whats hindering me from using them is the amount of smoke they generate and its lagging my game. is there a way to decrease the smoke count?

Download the SmokeScreen 2.0.1 release and update your .dll, open the SmokeScreen window via the Toolbar in-game and reduce the number of smoke particles (or their attributes, like collision) until you're happy with the performance.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...