Jump to content

Emissive Help


Recommended Posts

Hey. I've been working on an generator that has an Emissive texture and in the tutorial ^up they have it set up for only thermal output(like on a engine) and I was wondering how would I do it for something that doesn't produce thermal output; also I have tried to get the the generator to get a thermal output but it keeps on giving me an error.

Here is the generator part.cfg that I tried to make the generator produce temperature output. the ThermalAnim is NAC.anim

name = N.C.R. C.O.R.E.

module = Part

author = NovaSilisko

mesh = model.mu

scale = 1

rescaleFactor = 1

node_stack_top = 0.0, 0.25, 0.0, 0.0, 1.0, 0.0, 1

node_stack_bottom = 0.0, -0.25, 0.0, 0.0, 1.0, 0.0, 1

cost = 1300

category = Utility

subcategory = 0

title = C.O.R.E.

manufacturer = New California Rocketary skunkworks

description = Through exploitation of the natural decay of Blutonium-238, this elegantly simple power generator can provide consistent, stable power for decades.

attachRules = 1,0,1,1,0

// --- standard part parameters ---

mass = 0.175

dragModelType = default

maximum_drag = 0.2

minimum_drag = 0.2

angularDrag = 2

crashTolerance = 7

maxTemp = 3000

MODULE

{

name = ModuleGenerator

isAlwaysActive = true

heatProduction = 600

OUTPUT_RESOURCE

{

name = LiquidFuel

rate = 20

}

OUTPUT_RESOURCE

{

name = Oxidizer

rate = 20

}

{

name = ElectricCharge

rate = 20

}

MODULE

{

name = ModuleAnimateHeat

ThermalAnim = NAC

}

}

I did try it like this as well

name = N.C.R. C.O.R.E.

module = Part

author = NovaSilisko

mesh = model.mu

scale = 1

rescaleFactor = 1

node_stack_top = 0.0, 0.25, 0.0, 0.0, 1.0, 0.0, 1

node_stack_bottom = 0.0, -0.25, 0.0, 0.0, 1.0, 0.0, 1

cost = 1300

category = Utility

subcategory = 0

title = C.O.R.E.

manufacturer = New California Rocketary skunkworks

description = Through exploitation of the natural decay of Blutonium-238, this elegantly simple power generator can provide consistent, stable power for decades.

attachRules = 1,0,1,1,0

// --- standard part parameters ---

mass = 0.175

dragModelType = default

maximum_drag = 0.2

minimum_drag = 0.2

angularDrag = 2

crashTolerance = 7

maxTemp = 3000

MODULE

{

name = ModuleGenerator

isAlwaysActive = true

OUTPUT_RESOURCE

{

heatProduction = 50

name = LiquidFuel

rate = 20

}

OUTPUT_RESOURCE

{

heatProduction = 10

name = Oxidizer

rate = 20

}

{

heatProduction = 40

name = ElectricCharge

rate = 20

}

MODULE

{

name = ModuleAnimateHeat

ThermalAnim = NAC

}

}

I still didn't get any luck... -.-

Link to comment
Share on other sites

This should work:

MODULE
{
name = ModuleAnimateGeneric
animationName = NAC
//isOneShot = true
}

I haven't tried using a module inside another module scope yet, so if it doesn't work try moving it to after the closing parentheses of the ModuleGenerator.

Link to comment
Share on other sites

Well the only reason I had it that way is because its the way the person did it in the guide and I am just copying it. So basically this my first time working with the Emissive texture and I am making a generator that cycles through the light motion, which is what the NAC animation is. So I am not sure if its working right

here is a picture of it in Unity:

https://dl.dropboxusercontent.com/u/77575413/InUnity.avi

here it is in KSP:

https://dl.dropboxusercontent.com/u/77575413/Ingame.avi

Link to comment
Share on other sites

Well the only reason I had it that way is because its the way the person did it in the guide and I am just copying it. So basically this my first time working with the Emissive texture and I am making a generator that cycles through the light motion, which is what the NAC animation is. So I am not sure if its working right

here is a picture of it in Unity:

https://dl.dropboxusercontent.com/u/77575413/InUnity.avi

here it is in KSP:

https://dl.dropboxusercontent.com/u/77575413/Ingame.avi

I didn't realize you were using an older version of KSP. I learnt emissive animation originally from this tutorial and have not played around with the ModuleGenerator class yet.

Well looking at the ModuleGenerator class, there is no animation fields to initialize or store your animation, and I believe the heatProduction field is specific to AtmosphericEngine, LiquidEngine, LiquidFuelEngine, ModuleEngines & SolidRocket classes - so you shouldn't use it I guess.

The generator resources only accesses these from the part config:

string name;
float rate;

With all that said (it may be different back in your version of KSP), try:

//PART { // needed for 0.20
name = N.C.R. C.O.R.E.
module = Part
author = NovaSilisko

mesh = model.mu
scale = 1
rescaleFactor = 1

node_stack_top = 0.0, 0.25, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, -0.25, 0.0, 0.0, 1.0, 0.0, 1


cost = 1300
category = Utility
subcategory = 0
title = C.O.R.E.
manufacturer = New California Rocketary skunkworks
description = Through exploitation of the natural decay of Blutonium-238, this elegantly simple power generator can provide consistent, stable power for decades.
attachRules = 1,0,1,1,0

// --- standard part parameters ---
mass = 0.175
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 7
maxTemp = 3000

MODULE
{
name = ModuleGenerator
isAlwaysActive = true

OUTPUT_RESOURCE
{
name = LiquidFuel
rate = 20
}

OUTPUT_RESOURCE
{
name = Oxidizer
rate = 20
}

INPUT_RESOURCE
{
name = ElectricCharge
rate = 20
}
}

MODULE
{
name = ModuleAnimateGeneric
animationName = NAC
animSwitch = true // should default the animation to active, make sure your animation loops.
// isOneShot = true // incase the above line doesn't work - this (when toggled) will set the animation to active and will remove the stop button.
}
//} // closing parenthesis for PART{.., needed in 0.20

Edited by Razchek
Link to comment
Share on other sites

So I finished upgrading to v0.20 and its still not doing anything.

here's my v0.20 part.cfg

PART

{

name = N.C.R. C.O.R.E.

module = Part

author = N.C.R.

mesh = model.mu

scale = 1

rescaleFactor = 1

node_stack_Bow = 0.0, 0.25, 0.0, 0.0, 1.0, 0.0, 1

node_stack_Stern = 0.0, -0.25, 0.0, 0.0, 1.0, 0.0, 1

cost = 1300

category = Utility

subcategory = 0

title = N.C.R. C.O.R.E.

manufacturer = Ionic Protonic Electronics

description = Through exploitation of the natural decay of Blutonium-238, this elegantly simple power generator can provide consistent, stable power for decades.

attachRules = 1,1,1,0,0

// --- standard part parameters ---

mass = 0.08

dragModelType = default

maximum_drag = 0.2

minimum_drag = 0.2

angularDrag = 2

crashTolerance = 7

maxTemp = 3000

MODULE

{

name = ModuleGenerator

isAlwaysActive = true

OUTPUT_RESOURCE

{

name = ElectricCharge

rate = 0.75

}

OUTPUT_RESOURCE

{

name = LiquidFuel

rate = 20

}

OUTPUT_RESOURCE

{

name = Oxidizer

rate = 20

}

{

name = ElectricCharge

rate = 20

}

}

MODULE

{

name = ModuleAnimateGeneric

animationName = NAC

animSwitch = true // should default the animation to active, make sure your animation loops.

isOneShot = true // incase the above line doesn't work - this (when toggled) will set the animation to active and will remove the stop button.

}

}

Link to comment
Share on other sites

Maybe you're doing something wrong with your animation? Or perhaps the model name?

I used the default scene in blender (a cube) and imported it into Unity, I then assigned an existing texture and material using the KSP/Emissive/Diffuse shader. I set the emissive color and left the alpha at 1.

I animated the alpha value and looped it between 1 and 0, imported the part and used the above config (changing the needed variables) and it worked as expected.

PART
{
name = square
module = Part
author = N.C.R.

mesh = emissiveTest.mu
scale = 1
rescaleFactor = 1

node_stack_top = 0.0, 1, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, -1, 0.0, 0.0, 1.0, 0.0, 1
//node_stack_Stern = 0.0, -0.25, 0.0, 0.0, 1.0, 0.0, 1

cost = 1300
category = Utility
subcategory = 0
title = N.C.R. C.O.R.E.
manufacturer = Ionic Protonic Electronics
description = Through exploitation of the natural decay of Blutonium-238, this elegantly simple power generator can provide consistent, stable power for decades.
attachRules = 1,1,1,0,0

// --- standard part parameters ---
mass = 0.08
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 7
maxTemp = 3000

MODULE
{
name = ModuleGenerator
isAlwaysActive = true
OUTPUT_RESOURCE
{
name = ElectricCharge
rate = 0.75
}
OUTPUT_RESOURCE
{
name = LiquidFuel
rate = 20
}
OUTPUT_RESOURCE
{
name = Oxidizer
rate = 20
}
{
name = ElectricCharge
rate = 20
}
}
MODULE
{
name = ModuleAnimateGeneric
animationName = TestEmissive
isOneShot = true
}
}

Video

Unity object setup: emis.png

Edit:

After the picture, I clicked the animation in the project files and changed wrap mode to loop, before exporting using the part tools script.

Edited by Razchek
Link to comment
Share on other sites

Every time it plays I have to to re toggle it though.

Loop it in Unity, click on the animation file you created and change the wrapping mode to "loop" and you should be good.

There may be a better way to animate the generator but at the moment I don't know it. :)

I've only made a couple of parts - I'm a software developer by trade, modelling and animating is a fun hobby though. :D

Link to comment
Share on other sites

  • 2 weeks later...

So i was wondering how would set up the animation to be toggled at the same time i toggle some instrument.

For example if i toggled the thermometer, how would i get it toggle the animation with it? Or would that require a plugin?

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...