VigilanteInc / BioMass

BioMass Science+ Mod for KSP
MIT License
10 stars 8 forks source link

[BUG] Orientation of greenhouse backwards #5

Closed Sakata-MC closed 10 years ago

Sakata-MC commented 10 years ago

Just noticed that the orientation of the greenhouse module is backwards. For 100% exposure, the habitat currently has to be rotated away from the sun, and slightly off even then.perhaps ~15° from 180°

VigilanteInc commented 10 years ago

Hmmm, i was fooling with this the other night, but i failed to reproduce the problem. Does the exposure work at all on the front end? Or is it zero?

Sakata-MC commented 10 years ago

Actually, in testing this out, I found another issue. Seems that if the biomass runs dry it won't regen.

Exposure seemed to work while things were going, but with weird rotation. Seemed like when I reloaded the ship, the rotation required changed. The efficiency doesn't increase, though that might be for converting biomass, not sure. Also, when rotating the ship, I notice the "Sun Exposure" and "Energy Flow" dropping, and then no matter the orientation, the two seem to increase to 1.00. I'm getting this with no biomass generation though -- I'm not sure if the two variables are interfering (since they seem a bit wonky) but no biomass generates at all.

Side note: Might want to run through the parts and buff the connection points a bit. The greenhouse itself has a tiny connection node for its size, which makes launching it take a ton of struts that shouldn't be required in the number they are.

Sakata-MC commented 10 years ago

Hopefully, images speak more than words.

image

During a spin of rotation: image

As soon as rotation goes down, it increases no matter the orientation: image

VigilanteInc commented 10 years ago

It might be because I'm using 3 glass objects in the model to detect sunlight. There are 2 on the sides that face outward. I was trying to make it so the smaller windows to the sides would also effect sunlight. I'll test out a few different options tonight and should have some updates ready to go.

Thanks for all the trouble shooting! It's a big help!

Sakata-MC commented 10 years ago

Ahh. Did not notice glass panes. I usually stack the various resource tanks up the sides (using 2x symmetry).... just now noticed that they clip into the place where panels go. Perhaps this is 'blocking' the light somehow? image

Sakata-MC commented 10 years ago

I'll launch another 'resource hub' with the tanks moved off the greenhouse and see how that goes, JIC.

VigilanteInc commented 10 years ago

Its possible that could be it. It's kind of hard to diagnose the greenhouses. its a bunch of trial and error positioning. No worries, I'll get it worked out tonight most likely, I'll be updating the model a bit anyway.

"I'll launch another 'resource hub' with the tanks moved off the greenhouse and see how that goes, JIC."

Cool thanks! I'd try to trouble shoot more now, but I'm at work at the moment!

Sakata-MC commented 10 years ago

Well, not sure what's going on here. Seems that everything was going fine, then I used the time acceleration, and the biomass went to 0, and won't regenerate. It was producing until I put the time acceleration up a bit, then suddenly dropped to nil.

As far as the testing goes, it still does not appear that there is any change in growth rate of the biomass with rotation. While rotating, the 'light' drops off to 0, and the exposure/energy drop to 0, then when rotation slows/stops, it increases on its own.

BTW, my crazy-high-power physics/aeronautics-breaking launcher of doom: image

Sakata-MC commented 10 years ago

Forgot to mention, the part move didn't seem to have any effect between the first and second launch.

VigilanteInc commented 10 years ago

Yea the biomass crapping out is a known issue we are working on. We'll be implementing a "seed" resource that can be used to restart biomass growth. Basically what happened is you used up all the plant material biomass and there was none left to continue growth. YOU KILLED THEM ALL!

Thank for the help, I'll make sure i figure out exactly what the deal is on the greenhouse and get it fixed asap.

Man, dat rocket!

Sakata-MC commented 10 years ago

Just so you know, there were no biomass consuming generators running when I accelerated time. So there seems to be a spontaneous death due to time-acceleration allergy...

Sakata-MC commented 10 years ago

"We'll be implementing a "seed" resource that can be used to restart biomass growth. Basically what happened is you used up all the plant material biomass and there was none left to continue growth. YOU KILLED THEM ALL!"

Could you make this some form of automatic reserve? I'd imagine in a greenhouse 'lab' they'd have a base stock kept at a reserved level in case of such failures (whether 'human' or circumstance (engine issues)). So basically if it drops to '0' then it should be able to be continued in any case.

Which that thought could come a genetics 'tree' in the future, with experiments possibly resulting in more fuel per unit of biomass, but perhaps the side effect is that there no reproduction. Then if you screw up you can revert to the base stock.

Anyhow, I'd just make it so that biomass can regrow. Too many safeties that I'd think would be in place. If that isn't something that you'd want to do, perhaps another module that you can use to hold a 'reserve' amount (that isn't used as a resource by other modules), that you can put seed stock into the greenhouse, and then the greenhouse's initial output will be solely to refill the reserve until it is full, at which point 'normal' biomass is produced.

VigilanteInc commented 10 years ago

oooh, good to know thanks. I was able to load up greenhouse and test it at landing pad. Had it facing down and sunlight was not registering. Something that occurred to me tho, the lights in the greenhouse when turned on produce enough light to grow the plants at a certain rate. Is it possible you had them on when testing and this is the reason sunlight is acting strange for you?

Also i seem to remember Sean mentioning something about one of the resources running out and causing the biomass to die off? When this happened to you, did you notice if one of the resources had run out to cause it?

VigilanteInc commented 10 years ago

oooh, good to know thanks. I was able to load up greenhouse and test it at landing pad. Had it facing down and sunlight was not registering. Something that occurred to me tho, the lights in the greenhouse when turned on produce enough light to grow the plants at a certain rate. Is it possible you had them on when testing and this is the reason sunlight is acting strange for you?

Correction, It does register sunlight on the back end, as well as the front it seems. I'll have to fiddle around with the glass nodes and see what i can do with it.

Also i seem to remember Sean mentioning something about one of the resources running out and causing the biomass to die off? When this happened to you, did you notice if one of the resources had run out to cause it?

Sakata-MC commented 10 years ago

I'd have to put up another craft. I'll get to it in a moment. I think it might be 'biocake' which doesn't seem to be used elsewhere, and I'm not sure how it's made. I haven't used the lights until after I had issues with biomass

VigilanteInc commented 10 years ago

"Could you make this some form of automatic reserve? "

That's the plan. They will also need a specific spectrum of light to germinate. So it will be on a sort of switch, where they are stored up until you need them. In the case that your biomass dies off, you can activate a different (red) light that will trigger the seeds to germinate and restart biomass growth.

We are also planning on a biology branch in the tech tree for a future release. Science experiments and all. You can see some pictures of them in the forum post.

Sakata-MC commented 10 years ago

Ok restrutted this thing, apparently the greenhouse wobble wasn't gone still (but couldn't see it from fairings), and last 3 attempts have ended up very badly. Here is resource screencap at start: image

I'll do more testing and post more in a bit, need to go do some work.

seanth commented 10 years ago

I'll wade into this.

The Biomass dying off is something I have run into a lot in the testing and development. A few things to consider: 1) Plants turn CO2 and water into biomass and O2 only in the light. In the dark, they do the opposite, and so lose biomass. Luckily photosynthesis is 4x greater than respiration. 2) If you run out of CO2 or water, the plants will stop growing. 3) If you are running the polytron/centrifuge, 1 unit will harvest biomass at the same rate as it is growing under ideal conditions. This means if you run it without the greenhouse lights and the greenhouse experiences "night", the biomass is being reduced by respiration and the harvesting by the polytron. That will end you greenhouse pretty quickly.

In summary, growing things in space is hard.

The flow of things is Biomass(from the greenhouse) is chopped up(in the polytron/centrifuge) to make oil and biocake. Biocake is fermented to ethanol(in the fermenter). Ethanol and oil are combined in the reactor to make liquid fuel.

The fermentation happens very quickly right now, so biocake is converted to ethanol pretty much as soon as the biocake is make. This needs to be fixed.

It's really nice to see this "in the wild." Thanks.

Sakata-MC commented 10 years ago

Thursday I've only turned the shop to the sun, then open shutters, and try to aim it 'just right' which when I noticed the light issue. Then I tried warping around via time acceleration, which ended in no biomass.

This message was sent via phone. Please excuse any typos, as my phone loves to 'autocorrect' to the wrong words.

seanth commented 10 years ago

Thursday I've only turned the shop to the sun, then open shutters, and try to aim it 'just right' which when I noticed the light issue. Then I tried warping around via time acceleration, which ended in no biomass.

A few things to try: -Repeat this with the greenhouse lights on -Repeat this with the polytron off with and without greenhouse lights on.

Sakata-MC commented 10 years ago

Do you want me to remove the module from the ship completely?

seanth commented 10 years ago

Do you want me to remove the module from the ship completely?

No. The polytron should have a gui interface allowing you to turn it on/off. Just make sure it is off.

Sakata-MC commented 10 years ago

Okay, lights on shutters closed, and the light kinda sputters. image Open shutters with doors facing sun, light fills. image Lights off, turned facing away from sun, then lights back on - light sputters. image Open shutters, full on light. image Going to try turning the Polytron on -- we have... stuff being generated (I'm not a biochemist, little bit of programmer, so I'll call it stuff till I get used to terms). Either I didn't put the centrifuge on, or it didn't show in parts list to put on (I tend to stuff everything onto a station module that I see for a particular mod) But I have biocake and oil, so guess the centrifuge is in the polytron module. image For this station module I've turned the polytron back off, left lights on and shutters open. Going to use the TA (Time accelerator) now at a 'reasonable' step (50x). Biomass goes up.... and we go toward the dark side, and I notice that resource gain/loss numbers seem to jump around. (Am I generating water in the dark? says .3 in sunlight, -.01 in dark) Been around the planet with lights off 3 times now at 50x. Going to try 100x after this shot: image Things seem reasonable.

And 1k acceleration, go...Started losing biomass after a few trips around Kerbin, at a slowish but noticeable rate. If I'd punched to 5k I probably would have blinked and been wondering why the biomass is dead. image So, to hell with things, going to 50x again to see if I can generate more biomass, or if I'm still losing it. For SCIENCE! And we're gaining biomass again. (Even in the dark) image Seems that something is wonky with the game's scaling of resources with the time acceleration. Think its a 'case closed' for why biomass goes poof, though the light issue is still there. So more experimentation. Lights put to ON, and time to 50x. Was generating Biomass in light, and losing it in dark. (The dark bit is confusing... I think it should be the reverse, since not having lights on made more biomass) image image And... 1000x: Biomass generates at no higher pace in light than 50x, seems to drop about the same rate. (But at least its generating at all) At 5000X, the biomass goes down regardless of lights on or off.

Observations: Methinks this is an issue with time acceleration. Lights on in dark should generate biomass, not kill it (I think), but the opposite actually occurs.

Sakata-MC commented 10 years ago

Was this enough experimenting? Hopefully got enough data for you to poke around in code and see what's going on.

I might take a peek to see if I notice anything obvious, but I stopped programming many years ago. [edit] nevermind, the source for the DLL isn't there. So no peeking at code.

Sakata-MC commented 10 years ago

If you need any more, just ask! I'll be failing at making SSTOs again for a bit till I hear from you guys.

VigilanteInc commented 10 years ago

Man alive! You are a trouble shooting machine! Thanks so much. I agree that it has something to do with the time acceleration. I am now at home, so I'll do some testing on it as well, and work on the light direction thing too.

Sakata-MC commented 10 years ago

Well, when you get the new update out, I'll be more than happy to see what I can do for retesting. I'm just hoping that there is some way to make these things fairly self-sufficient for the most part -- I don't tend to go for the life support mods much as I hate forgetting that I have a station suddenly unresponsive due to kerbal death :D