eddiew Posted August 31, 2016 Share Posted August 31, 2016 Hey peeps, I suspect this is a very simple problem that someone can answer in one sentence and save me many hours of research TLDR, I would like to make a 2.5m rapier part. I'm fine with the stock model, but I want it to play nice with Kerbal R&D, which means I can't Tweakscale it up, and have to provide a distinct and separate part. I have gotten to the stage below with a simple .cfg file, whereby the size, thrust, and mass of the middle engine are as I want. Mine however has a very tiny exhaust plume in comparison to the tweakscaled version, and I don't know enough to understand why. I am pretty sure it relates to this section of the config, which I have tried and failed to make work by doubling the second parameter in the emission field: power_open { AUDIO { ...stuff... } MODEL_MULTI_PARTICLE { modelName = Squad/FX/shockExhaust_red_small transformName = thrustTransform emission = 0.0 0.0 emission = 0.05 0.0 //emission = 0.075 0.25 emission = 0.075 0.5 //emission = 1.0 1.25 emission = 1.0 2.5 speed = 0.0 0.5 speed = 1.0 1.2 } } ...but I do not know the correct incantation or how many times to dance widdershins around a yew tree under the light of a crescent moon I failed to persuade the welding mod to export a scaled engine, so no help there. If anyone has any tips, I would be very much obliged Thank you! (Yes, yes this is a post about size envy.) Link to comment Share on other sites More sharing options...
Shadowmage Posted August 31, 2016 Share Posted August 31, 2016 (edited) Stock particle effects do not support any sort of scaling through the EFFECTS nodes or even through plugin code. The closest you can come is to increase emission and speed, but that merely spews more particles faster rather than changing their size (they'll still look 'small' but there will be more of them). If you really want particle scaling you will need SmokeScreen and one of its config/fx mods (RealPlumes is my favorite, HotRockets is/was another). Smokescreen adds additional particle types (code) that support dynamic scaling, and RealPlumes adds a large variety of easy-to-setup particle effects (visuals and config). Edited August 31, 2016 by Shadowmage Link to comment Share on other sites More sharing options...
eddiew Posted August 31, 2016 Author Share Posted August 31, 2016 12 minutes ago, Shadowmage said: Stock particle effects do not support any sort of scaling through the EFFECTS nodes or even through plugin code. Maybe an ignorant question, but how does tweakscale achieve it then? Something in my game can do it... ^^ Link to comment Share on other sites More sharing options...
Shadowmage Posted September 1, 2016 Share Posted September 1, 2016 50 minutes ago, eddiew said: Maybe an ignorant question, but how does tweakscale achieve it then? Something in my game can do it... ^^ I thought I had noticed that as well, and it also seems to have an effect on some of the stock engines which use the 'scale = xxx' for model scaling... so perhaps it is possible through plugin code in some fashion by manipulating the models transform scales directly. This was back in 0.90 or so when I last used tweakscale and played with part welding, so that method has apparently been around for awhile. I was unable to do so during my investigation on run-time rescaling for a procedural SRB setup, but my investigations there were mostly focused on the EFFECTS node setup or manipulating the particle-emitters directly; neither of which had any sort of support for scaling at the time (1.02'ish, have not checked since). Logically though, from a Unity-game-engine perspective, it seems like there has to be some way to do rescaling of the particle effects. The particle emitters reside as a Component on a GameObject, which itself has a transform and scale factor, and/or could be parented to another transform with the parent transforms scale being manipulated. This of course is dependent on if the particle emitters rendering functions are even passed the scaling from the transforms (which -does- seem to be happening from the observations Two things I might suggest after a bit of thought. First, investigate if the 'scale = xxx' and 'rescaleFactor = xxx' in the part config have any effect on particle size; it seems likely that one of them will have an impact. Second -- look at the Tweakscale code and see how they do the scaling. It could even be as simple as the code setting part.scale, or part.rescaleFactor; whichever Tweakscale uses will be the one you'll need to modify in your part config. After investigating one of those and finding how the scaling is done, it should mostly be a matter of setting up the MODEL node and attach-nodes properly for the chosen rescaling method. Actually, I took a look at the TweakScale code myself as I was curious. It appears that they manually rescale the Parts 'model' transform (which is the root transform to which all models and renderers are parented to). ( https://github.com/pellinor0/TweakScale/blob/master/Scale.cs#L534-L563 ) I didn't spot anything specifically related to FX rescaling, so it seems probable that rescaling of the 'model' transform will also rescale the effects, and that one of the two stock-part-config scale/rescaleFactor values simply does exactly that. Which leads back to the 'First' thing to investigate from above -- play around with the scale and rescaleFactor and see if they rescale the effects as well. You may need to apply an inverse scale to your model through the MODEL node to compensate (or just leave it at 1?), and/or manually recalculate attach-node positions. Link to comment Share on other sites More sharing options...
eddiew Posted September 1, 2016 Author Share Posted September 1, 2016 Thanks for the response @Shadowmage Unfortunately, neither scale or rescaleFactor had any effect on the effects. Scale seemed to bring oddities, like moving the attach nodes outside the model. I have left scale = 1.0 and added rescaleFactor = 2.5, which seems to produce the expected results, at least with regard to physical size and attachment nodes. After an hour of fiddling, I had failed to persuade effects to cooperate and gave up on it because I don't want to learn the internals of Tweakscale just for this one task On the other hand, I realised I could swap the model_multi_particle! So I've substituted what I think are the Panther engine's effects, which seem to have responded to a reduced energy and speed setting to shorten them down from the usual long trail. In fairness, I think it's a pretty good compromise (Tweakscale on top, mine on bottom.) ...of course, now I've realised I'll need to write configs for some air intakes to match... but at least those should be easier. Or I might just let Tweakscale do its thing, because even at 2.5m they're a light part and there's not a lot for KR&D to optimise Link to comment Share on other sites More sharing options...
SpaceCommanderNemo Posted September 1, 2016 Share Posted September 1, 2016 And here I was thinking the "Lancer" engine was stock... Which mod is it, then? KAX? SXT? Anyway, you could probably look at that, or the B9 Sabres, to see what their settings look like. Link to comment Share on other sites More sharing options...
eddiew Posted September 1, 2016 Author Share Posted September 1, 2016 3 hours ago, SpaceCommanderNemo said: And here I was thinking the "Lancer" engine was stock... Which mod is it, then? KAX? SXT? I'm not aware of any mod that simply offers a 2.5m rapier equivalent without also supplying new models and effects... B9 has the Sabre, which is overall about 10% cooler than a Rapier. Not sure about the Lancer... there's a big one in MK4 Spaceplanes, but that's definitely it's own model. Link to comment Share on other sites More sharing options...
Shadowmage Posted September 1, 2016 Share Posted September 1, 2016 5 hours ago, eddiew said: Thanks for the response @Shadowmage Unfortunately, neither scale or rescaleFactor had any effect on the effects. Scale seemed to bring oddities, like moving the attach nodes outside the model. I have left scale = 1.0 and added rescaleFactor = 2.5, which seems to produce the expected results, at least with regard to physical size and attachment nodes. After an hour of fiddling, I had failed to persuade effects to cooperate and gave up on it because I don't want to learn the internals of Tweakscale just for this one task [...] Interesting -- I may have to do some further testing on this myself, as I too am interested in finding a way to rescale the stock particle effects for various purposes. If I find out anything further on the subject, will let you know. Looks like you got it working pretty well though with the alternate effects; looking better than the stock-tweakscaled one I would say Link to comment Share on other sites More sharing options...
eddiew Posted September 1, 2016 Author Share Posted September 1, 2016 Just now, Shadowmage said: ...looking better than the stock-tweakscaled one I would say Tbh, I kind of think the Rapier's effects are a bit of a let down for such a cool part anyway. B9's Sabre engines light up to look sooo much better - oddly, it looks a lot like the Panther... which appeared later Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now