Jump to content

[WIP] DMagic Orbital Science: New Science Parts - V0.8.2 (7/17/2014)


DMagic

Recommended Posts

I added a link for my partially functional SCANsat BTDT scanner to the first post.

It works fine with SCANsat, but the animations are not tied to the SCANsat module; they must be triggered manually. The light animations can also be triggered manually, but don't do anything otherwise. The plugin is required for any animation function to work. It will work as a scanner without it, but won't open.

The part is not backward compatible with existing crafts, and I make no promises about future backward compatibility either.

MediaFire link: http://www./download/84h818y5sq6cc3v/BTDTv1_1.zip

SCANsat thread posts: http://forum.kerbalspaceprogram.com/threads/55832-PLUGIN-PARTS-0-23-SCANsat-terrain-mapping?p=928786&viewfull=1#post928786

http://forum.kerbalspaceprogram.com/threads/55832-PLUGIN-PARTS-0-23-SCANsat-terrain-mapping?p=930623&viewfull=1#post930623

Javascript is disabled. View full album
Edited by DMagic
Update download link
Link to comment
Share on other sites

New Part Update:

This thing is finally far along enough to warrant a preview.

Javascript is disabled. View full album

It's meant to be a rover or lander mounted surface scanning laser, similar to the ChemCam module on Curiosity. Sethnizzle has pretty much got the realistic rover science parts area locked up, so I figured I'd go for something more befitting of Kerbal construction for this one.

I've pretty much finished all of the modelling, animating, texturing, and writing for the science reports. The module coding is almost ready to go, it just needs some cleaning up, but everything is working as intended. The only thing remaining is particle effects, which I know next to nothing about. So I'm estimating somewhere between 2 days and 6 weeks before this thing is ready to go.

There is also the nagging problem that this thing for some reason refuses to let me put an attachment node on it. Surface attachment works fine, but stack nodes don't appear for some reason. I think it has something to do with the armatures used in Blender for animating the power cables (why that would effect attachment nodes I don't know, but there seem to be many odd effects caused by those armatures, and animating the cables without them would be a nightmare). It's not really a big deal, I think I might leave it with only surface attachment anyway, but it's still annoying.

The next update will also contain some tweaks to the other parts and improvements to the plugin. I will also add plugin support to the telescope to get around the weird animation and science collection issues.

Stay tuned.

Link to comment
Share on other sites

I found a model based work-around for the laser animation. It's a bit of a hackjob, but I think the final result is pretty good. I just made a tiny cube that sits inside of the laser emitter, then scales way up (about 1000X) over one frame of the animation in one dimension to make the laser beam. The animation is effectively instantaneous, so I think it works ok. It could use some tweaking, and I'm hoping to get a particle effect at the origin point for the laser (the KSP Particle Effects from the part tools don't seem to want to animate), but I think it's ready to go. The plugin still needs some work though, as I wasn't expecting this to be finished so quickly.

screenshot289.png~original

Link to comment
Share on other sites

Currently all of the experiments are surface or splashed down only. Overriding the stock behavior to get surface experiments while not actually landed would be a little tricky, but it would be nifty.

Figuring out if the laser mesh actually intersects the ground probably wouldn't be very hard, but I'm not sure if I would want to have that check. I can imagine it would be extremely annoying to get to a planet's surface only to find out that the part is at the wrong angle and doesn't actually hit the ground, or something like that.

Link to comment
Share on other sites

At best people will have to research the part again in the R&D center, at worst their crafts will implode because they're missing the part. I think I'll provide a folder with alternate .cfg files using the old names for the next release, but after that it's probably best to only use the new names.

Well I am not sure what I am doing wrong. I changed magboom to dmMagBoom in both places in part.cfg and got it on a ship. But I only tried to fly it today and it does implode. I tried it in a new sandbox and it explodes around gravity turn altitude.

I must be missing something basic here.

Link to comment
Share on other sites

Well I am not sure what I am doing wrong. I changed magboom to dmMagBoom in both places in part.cfg and got it on a ship. But I only tried to fly it today and it does implode. I tried it in a new sandbox and it explodes around gravity turn altitude.

I must be missing something basic here.

What do you mean by both places?

The only line that must be changed is at the top where it says:

PART

{

name = magBoom

module = Part

author = DMagic

That name =magBoom entry is what causes all of the issues.

Later on where you see:

title = Magnetometer Boom

manufacturer = DMagic Orbital Science

...

The title entry doesn't really matter, that's just what the part is called in the VAB.

The only other location where the name magBoom appears is in the animation module:

MODULE

{

name = DMMagBoomModule

animationName = magBoom

experimentID = magScan

...

The animationName = magBoom entry should not be changed and shouldn't be affected by duplicate parts (my .cfg examples might look a bit different from the release versions).

Right now my plugin does not check for animation name changes, I've fixed that in the new version, but I suspect that changing that entry could cause... issues.

Edit: Oh, and by imploding crafts in that other post I don't mean the craft will actually blow up while flying it, I mean the game just won't load them. You'll get that "craft missing part file..." warning when you first load up the save file.

Edited by DMagic
Link to comment
Share on other sites

I found a model based work-around for the laser animation. It's a bit of a hackjob, but I think the final result is pretty good. I just made a tiny cube that sits inside of the laser emitter, then scales way up (about 1000X) over one frame of the animation in one dimension to make the laser beam. The animation is effectively instantaneous, so I think it works ok. It could use some tweaking, and I'm hoping to get a particle effect at the origin point for the laser (the KSP Particle Effects from the part tools don't seem to want to animate), but I think it's ready to go. The plugin still needs some work though, as I wasn't expecting this to be finished so quickly.

http://i1191.photobucket.com/albums/z469/grandyd/Kerbal/screenshot289.png~original

That looks nice. You can use this http://forum.kerbalspaceprogram.com/threads/65364-OpenParticleEmitter-Kethane-derived-alternate-particles-module For paricles. Its derived from the kethane plugins particle emitter so its mainly used for large plumes of stationary smoke or sparks but you can probably scale down the effect and area for what you need

Link to comment
Share on other sites

So do we have to fix our craft after you update and change the name of the part?

My plan is to change the part names for the next release. I will also include a separate folder that includes all of the updates and keeps the old names with instructions on what to do. I'll only include that for this release and maybe the next one though, I don't want to keep including two versions of the old parts in every update.

I will also put instructions in the readme file that explain as clearly as possible how to alter the cfg files to change the name, and how to deal with the R&D center issues.

That looks nice. You can use this http://forum.kerbalspaceprogram.com/threads/65364-OpenParticleEmitter-Kethane-derived-alternate-particles-module For paricles. Its derived from the kethane plugins particle emitter so its mainly used for large plumes of stationary smoke or sparks but you can probably scale down the effect and area for what you need

I spent some time looking at the that plugin. The parameters are all the same as those used by the legacy Unity particle system, so I can figure that out, but I couldn't figure out how to incorporate them into an animation. The animation is also the problem with the KSP Particle Effects, so I'll have to spend some time to figure out how to get it working. It's probably fairly simple to do with a plugin, I just need to sit down and figure it out.

My plan is to put some kind of stationary sparking/glowing effect where the three arms of the laser meet, then maybe add some smaller particles that flow around the laser beam mesh. I hope that I can get something that looks ok, but for now I'm just going to release it without the particle effects, either later today or tomorrow.

Link to comment
Share on other sites

I made a quick Photoshop file to help you out with texturing. Its not perfect, I didn't have the model or the UV's to go off of but I think it will help.

http://www./download/cedjva889xv3202/Boom_DIFF.psd

First off great job on your first part.

Your Alpha is white and black, this is necessary for the Alpha map but the specular is also based off the alpha channel. So non transparent parts need some texture to it. The spec map will be a high contrast image of the amount of reflection of your material. Don't just copy the diffuse texture but that is a good place to start.

Your smoothing on the model looks off. Check the normals in your 3d package to make sure its not all in the same smoothing group.

Add some ambient occlusion, or shadowing to your texture.

Add more dirt and scratches. Nothing is ever 100% clean and perfect.

Your normal maps should have more variation in it, this works with the spec map to bring out small details. I use Crazy Bump, its a great place to start your normal maps.

Turn up the shininess of your spec map in Unity. Metal should be more reflective.

Again your doing great, keep up the good work.

Javascript is disabled. View full album
Link to comment
Share on other sites

--- snip ---

Wow, thanks for taking the time to look at this texture. I still find texturing to be the most challenging part of the process. It's almost an entirely empirical approach for me, change one thing, save it, apply it in Blender (or Unity to really get a good idea). It's not like modelling or coding where I have a better idea of what I'm going for and what I need to do, despite very limited experience in both activities. Though I think the new laser texture is better.

I actually remade the magnetometer for the new update. The old Blender file was a huge mess, no consistent hierarchy, transforms not applied, bad animations with way too many key frames; I wouldn't be surprised if I had some of the smoothing inconsistently applied too. The new model is pretty much the same as the old, but better organized. I also put the truss textures onto a separate 128x128 file because those are the only thing that need alphas.

I can see what you mean about the additional layers for dirt, ambient occlusion, and the specular layers and normal map. They look much better that way. I plan on taking another pass at the textures as well as the models for the RPWS and telescope. Which brings me to my next point.

Update to V0.5:

SpacePort:http://kerbalspaceprogram.com/dmagicorbital/

MediaFire:http://www./download/84h818y5sq6cc3v/BTDTv1_1.zip

Check the first post or the release thread for a full preview of the new version.

The primary changes are:

- A new surface scanning laser shown in the previews in the last few posts.

- Plugins for all parts to address animation and science collection issues.

- Breaking backward compatibility for the magnetometer and both telescope versions.

The part names needed to be changed for those two parts to avoid issues with other mods. I included an alternate folder with updated versions of all the parts with their original names. You can also manually change the names if you want, instructions are included in the .zip file.

That's really irritating, but it's better to change the names than to continue having the same issues. Parts with the new names will need to be repurchased in the R&D center if their tech node is already unlocked.

----------------

There are a few issues with the plugin that I'm aware of. If you don't transmit or reset an experiment the "collect data" action group function won't work. The right-click option will still work fine and will pop-up that "re-log data" window. I know why this happens, but I'm not entirely sure how to get around it. I don't think it's much of an issue, there is no reason to keep reports instead of transmitting them, but it's still a problem.

There is also the issue that flying through an atmosphere while on an escape trajectory (aerobraking, generally) still counts as being in space, not flying. This happens in stock KSP too, and I think I know how to fix it, it's just not much of an issue.

Let me know if you find any other issues, of which there are probably several that I haven't considered or discovered.

----------------

Full changelog from v0.4.1:

- New surface scanning laser instrument. Designed for rovers and landers.

- Changes in magnetometer and telescope part names to address compatibility issues with other mods (will not be backward compatible without manually changing the names or installing the alternate part folder). Re-purchasing parts in the R&D center is required.

- New model for magnetometer, includes added details to the instruments themselves, cleaner animation, and lower RAM usage due to more efficient use of textures.

- All parts are EVA accessible, Kerbals can collect and transfer science reports.

- Custom part modules for all parts to address animation and science collection issues:

- Added plugin module for telescope, functions similar to the other parts

- Fixed the animation states so that the parts stay deployed after saving and loading

- Science reports will automatically be collected after the deploy animation finishes (when using the log data button, not the regular deploy button)

- Repeatedly pushing the collect data button/action group will not spam multiple results.

- The laser has only a single, forward animation. Data is collected midway through the animation.

- Deployed previews are available in the VAB/SPH for all parts

- Edited existing science reports, and added several more. Added full set of surface reports for the laser.

Link to comment
Share on other sites

  • 2 weeks later...

I've been working on my next part, it's meant to be a sample core drill used for biological analysis. There are already plenty of surface sample experiments, drills, scoops and so on, so I'm making this part more specialized. It's based on some of the Viking experiments and the proposed ExoMars rover.

6LWSGIv.jpg

The drill is made with two primary animations that play based on the part's orientation with respect to the surface. This way you can use it on landers or rovers without looking weird. The orientation check in my plugin seems to be relative to the surface, not the vessel or the terrain, which I think is the best way to do it, though this cause problems on steep hills. It has some issues, and I need to test it more, but I think it works pretty well. I'll add an animation like this to the laser too if this works out.

VBo1a7Q.jpg

I'm also trying to change the way science parts can work. Instead of running an infinite number of times or only once I want this part to be usable for a limited number of times before being returned or reset. Currently I have it set to allow for six uses with indicator lights showing how many remaining experiments can be run (the primary indicator lights aren't animated yet, they only show green). There are also three sample containers that can be used to bring back samples for full science value. Storing samples also counts against the six experiment limit, so you can store three samples and transmit three more, or transmit all six, or any other combination.

The sample containers in the picture above aren't complete, they are just untextured boxes, and they need a filling-up animation (some of the other animations need tweaking too, as you can see with the drill tip sticking out). The size of the part is comparable to the laser, it's a bit bigger now, but I'll probably resize it a little so that it fits better on a rover body. Other than the sample containers the model, texture and animations are mostly complete, it only needs some minor adjustments here and there.

The plugin needs a lot more work though. I can't get it to work right by inheriting the ModuleScienceExperiment like the other parts do, I have to use IScienceDataContainer and recreate the stock science module functions. This is because I need to intercept button pushes on the experimental results dialog page (the thing that shows the science report and lets you transmit or keep the data) for my limited-use setup to work correctly, and I can't find a way to do that with ModuleScienceExperiment.

I also need to figure out a way to store multiple results and still allow the part to be used. I'm thinking that maybe I need to a make a separate module, maybe using ModuleScienceContainer, and transfer stored data from my primary module to the container module, that way I can store multiple results and continue collecting more. And I have no idea how any of this will react when it interacts with a science lab, that will require a lot of testing and figuring out.

More updates to come as I progress with this part.

Link to comment
Share on other sites

Javascript is disabled. View full album

I think that I'm finished with the model, texture and animations. Everything looks ok to me, but there might be a few more tweaks to make.

All of the basic functions seem to be working right. The drill can collect, transmit, store and return multiple science reports, and it stops functioning after a certain amount of experiments have been performed. The part maintains two lists of science results: the stored data list, and the temporary list used before transmission or storage of data. Only the stored data can be returned to Kerbin for credit or picked up by EVA Kerbals.

Science lab integration works, but there are a few kinks. I'm not sure if I'll be able to get around them without modifying the science lab itself, which I'm not going to do. The reset and data processing functions have to be initiated through the part itself, not by right-clicking on the science lab, that's a little annoying, but I don't think it's too big of a deal.

The part rotation function that I was using to determine which drill animation to play doesn't seem to work. It's fine at equatorial latitudes, but as you move closer to the poles it stops giving the same results. I have some other methods that I can try, but they will need lots of testing, as will all of the other functions.

Other than that I just need to write the science reports (I'm planning on including reports for Trueborn's Custom Biomes plugin too), and add a few more finishing touches.

Link to comment
Share on other sites

I think I've fixed most of the issues with science collection and weird edge cases; things like transmitting multiple reports at the same time with more than one transmitter, or docking to a station with more than one lab, but only having one of them operational. I've also got the science values reporting correctly, I had things setup wrong before so I was getting less science than I was supposed to.

I've uploaded the plugin source to GitHub in case anyone is dying to check it out.

The new drill orientation function that I'm using works better, and isn't affected by latitude like the last one. It does have some issues though because it detects rotation relative to the root part, using the parent part might give better results.

Either way, there is a preview function in the VAB/SPH, so that you can check which way the drill will animate (at some point I do want to add ground-contact detection, so this will all actually matter, and the drill body does have a collider on it). It seems to work ok for regular situations, where the probe core or command pod is facing up from the ground, but things like cockpits, or putting the probe core on the front of a rover will trip it up.

Edit: Yep, using the part.parent.transform.up instead of part.localroot.transform.up seems to work a lot better. And you can use a cubic octagonal strut to get the right results if you have some weird setup that doesn't work right, either by flipping the strut around so that it faces inside its parent part, or by laying it on its side. Doing something like that and checking the preview should be enough.

Here it is working correctly, the debug menu shows the current rotation value and tells you what values will play each animation.

Oz7ofSp.jpg

This one doesn't work so well.

xt1HALI.jpg

Edited by DMagic
Link to comment
Share on other sites

I think this drill is ready enough to release. I've worked out most of the bugs, but there could still be some issues that I haven't though of. It would be great if I could get a few people to try and break this before I make a wider release.

Download link:

http://www./download/bzewcpvh6gfptl7/DMagic_Orbital_Science_v0_5_1.zip

See the previews above and on the first page for more info and images.

The drill is intended to be used on atmospheric planets to search for signs of biological activity. It can be used for a total of six times and store three reports for full science value. It's mostly self explanatory, but it requires juggling two science data lists, so there are two different "Review Data" right-click buttons that can be used. Most of the time, though, the initial data will be either stored or transmitted right away and you probably won't see the right click button for this list, only the "Review Stored Data" button should be commonly used.

I think I've worked out the part orientation/animation issues. The animation played is based on the drill's orientation relative to its parent part. This works out fine in most cases, but when attached directly to some structural components can cause the wrong animation to be triggered. Use cubic octagonal struts to get around this, either by laying one on its side, or turning one around, so that it faces into its parent part, then attach the drill. You can preview the animation in the VAB.

The science lab seems to be functioning correctly now. Data can be processed either before or after storage (to process data before storage the lab would have to be on the vessel with the drill). You can do so with the lab's right click "process data" button, or through the drill's "review data" button or action group. There might still be some quirks associated with this, storing three experiment reports in the same part complicates things.

There are a lot of debugging options left uncommented in the plugin, check the debug log (alt + F2) if you're having issues, it might help.

I've also included science reports for the basic biome set in Trueborn's Custom Biomes plugin. The reports should be ignored if you don't have the plugin, or if you use a different set of biomes. I'm working on adding biome reports for the other parts as well.

Let me know if anyone runs into any other bugs or thinks of anything else.

Link to comment
Share on other sites

Everything looks like it's working ok, I've caught a few minor bugs, but otherwise I think it's good. I'll probably try to release tomorrow, I only need to check things over one last time and setup some image albums for release.

Link to comment
Share on other sites

Update to V0.6

Download on Spaceport

nMZKuEa.gif

See the first post of this thread and the posts above for a full preview.

There are only a few minor bug fixes from 0.5.1.

Custom biome support for the laser scanner and optical telescope has been added for all planets. Experiment values have been reduced slightly.

Let me know about any bugs or suggestions you might have.

Change Log:

v0.6:
- Minor bug fixes for core drill.
- Custom biome science reports added for laser and optical telescope.
- Reduced science experiment values.

v0.5.1:
- New exobiology core drill instrument. Designed for rovers and landers.

[INDENT]- Features multiple storage containers.[/INDENT]


[INDENT]- Can be used up to six times before needing to be returned to Kerbin or reset.[/INDENT]


- New custom science reports

[INDENT]- Support included for Trueborn's Custom Biome (Basic biome set) --- * Requires custom biome download[/INDENT]



v0.5:
- New surface scanning laser instrument. Designed for rovers and landers.
- Changes in magnetometer and telescope part names to address compatibility issues with other mods (will not be backward compatible without manually changing the names or installing the alternate part folder). Re-purchasing parts in the R&D center is required.
- New model for magnetometer, includes added details to the instruments themselves, cleaner animation, and lower RAM usage due to more efficient use of textures.
- All parts are EVA accessible, Kerbals can collect and transfer science reports.
- Custom part modules for all parts to address animation and science collection issues:
- Added plugin module for telescope, functions similar to the other parts
- Fixed the animation states so that the parts stay deployed after saving and loading
- Science reports will automatically be collected after the deploy animation finishes (when using the log data button, not the regular deploy button)
- Repeatedly pushing the collect data button/action group will not spam multiple results.
- The laser has only a single, forward animation. Data is collected midway through the animation.
- Deployed previews are available in the VAB/SPH for all parts
- Edited existing science reports, and added several more. Added full set of surface reports for the laser.

v0.4.1:
- Added plugin for testing.
- Custom part module for magnetometer and RPWS.
- Changes to animation and science module functions:
- Animations are now reversible while playing.
- Magnetometer animation slightly faster.
- Transmitting or resetting experiment no longer triggers retract animation.
- Deploy animation only plays when experiment is possible (no longer displays can't perform experiment dialog after completing animation).
- Deploy/Retract button always available by right-clicking part.
- Parts must be fully deployed before experiment can proceed.
- Collect data button/action group triggers deploy animation if the part is not already deployed.

v0.4:
- New textures for all parts.
- Changed non-SCANsat telescope to be the default, for the SCANsat version replace the default scope folder with the alternate folder.
- Tweaks to models and animations for the magnetometer and telescope.
- Add Langmuir probe to RPWS model (should not break existing crafts).
- Added surface reports for the magnetometer, including biome support where available.
- Added biome support for non-SCANsat telescope in low orbit.
- Rearranged tech tree placement; parts moved to earlier nodes.
- Decreased science report values, added and edited science reports.
- Added FxModule to part.cfg to force deployment before science reports can be collected.

v0.3:
- Added science for RPWS Antenna.
- Tweaked magnetometer science values and reports.
- Added alternate telescope part folder with science reports that aren't dependent on SCANsat.
- Changed default telescope to the multispectral SCANsat module (biomes and anomalies), this seems to make more sense for an optical telescope.
- Changed tech tree node positions.
- Changed magnetometer texture to match the other parts.

v0.2:
- Added science for magnetometer boom for the space around all planets and moons.
- Added SCANsat SAR sensor (hi resolution map) module for the telescope * Requires damny's SCANsat plugin.
- Fixed attachment node placement.

v0.1:
- Initial upload

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