Project O'Neill Colony

Frogisis

innn spaaaaace...ace...ace...!
Addon Developer
Joined
Aug 13, 2008
Messages
185
Reaction score
0
Points
31
Location
Chicago
Website
www.frogisis.com
I'm surprised no one's made one of these already:
colonyimage.jpg
You've got the Earth, and you've got the Moon, but I, for one, would like a few more houses in the neighborhood.

I whipped this up tonight, and it still needs its final textures as well as code, animations, and proper scaling, but the actual "get it to exist" part is at least complete.

The mesh will probably need to be tweaked a little bit so the docking ports are the right size, but if anyone else is interested in writing the .dll for this, I would happily finish off the textures and tweak the mesh knowing the nuts and bolts are in more capable hands than mine. In the mean time, I need to get back to work on other projects, but I definitely intend to get this thing looking grand before the month is out.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Nice work. :speakcool:
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,700
Reaction score
1,362
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
verry cool.


the big things sticking off of it are reflectors for sunlight right ?

keep up the good work.

-Matt
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
the big things sticking off of it are reflectors for sunlight right ?

Yes.
They are mirrors to reflect sunlight into the colony.
They should always be facing the sun.
 

tgep

Tutorial Publisher
Tutorial Publisher
Joined
Apr 3, 2008
Messages
510
Reaction score
0
Points
0
Location
Next to the Stennis Space Center
Very nice model work. I look foreward to seeing the final version. Will you be releasing an SC3 testbed before the module version ?
 

Frogisis

innn spaaaaace...ace...ace...!
Addon Developer
Joined
Aug 13, 2008
Messages
185
Reaction score
0
Points
31
Location
Chicago
Website
www.frogisis.com
A little bit of progress - It's now scaled properly at 30km long:
colonyimage2.jpgcolony_interior.jpg


But there are a few little problems. The first one is the way that the mesh now flickers, or shimmers, when viewed from a certain distance. Outside of that range, it's solid, but once you get within about the 35k~20k range, parts of it flash in and out, like this:
colony_shimmer.jpg
Anyone have any ideas what I can do to solve this?

Second, the docking area and the individual dock rings themselves don't have any textures displaying, even though in the "debug.txt" file for Mesh Maker, the textures are properly aligned with their respective objects:
colony_notex.jpg
This one has me completely baffled.

I'll be doing the textures later on, and trying to get the animations to work so that the dock area doesn't spin while the rest of the colony does, but I'll have to do my homework to figure out how to program that, since it seems like an intuitive method won't just fall in my lap.


Very nice model work. I look forward to seeing the final version. Will you be releasing an SC3 testbed before the module version ?

Hmmm, that might not be a bad idea. Normally I wouldn't release something unless I thought it was already finished, but with something this size, some prior feedback might help make it a better add-on.
 
Last edited:

vettes

New member
Joined
Mar 17, 2009
Messages
52
Reaction score
0
Points
0
:speakcool::)o thanks i cant wait till its out hmm.... a beta might be worth considering
 

Eagle

The Amazing Flying Tuna Can
Joined
Feb 11, 2008
Messages
1,105
Reaction score
3
Points
0
AI'll be doing the textures later on, and trying to get the animations to work so that the dock area doesn't spin while the rest of the colony does, but I'll have to do my homework to figure out how to program that, since it seems like an intuitive method won't just fall in my lap.
Have the vessel itself not spin and use an animation to spin the giant cylinder parts? That way the docks are not animated.

Maybe I didn't understand the question...
 

Frogisis

innn spaaaaace...ace...ace...!
Addon Developer
Joined
Aug 13, 2008
Messages
185
Reaction score
0
Points
31
Location
Chicago
Website
www.frogisis.com
This http://orbithangar.com/searchid.php?ID=3530 might fix the problem with the mesh flickering


Hmmm, that might have helped a little bit (thanks for the link), but after playing around with the variables it seems like turning off the stencil buffer had the biggest effect. I can't get the flicker to go away completely, but the range in which it flickers has been cut in half, and the addon you told me about causes the flicker to "freeze" unless you move the camera. So, as you're approaching the colony, starting about 20km out, you'll see flicker, but it'll go away before you're lining up to dock. I suppose it doesn't make it unplayable, but it definitely ruins the immersion.

I just had a thought, though: It seems like the only part of the mesh that has the problem is the outer wall of the colony, and since all the components of that area are set to be very thin relative to each other, maybe that's screwing Orbiter up a little bit. I'll try setting that section to "two sided" and see what happens.

About the textures, I just noticed that that section of the mesh has some of its normals reversed. If I go back into Blender and flip them around the right way, maybe it'll work. Heck, I'll try "two sides" for those, too - I want to avoid having to go through Anim8or again if I can.

About the animation, I was just complaining that it seems like a pain to do it in general - Figuring out the coordinates of the mesh, the axis, and how you want them to rotate just seems like a real drag, man... What am I, Cartesian McCalculatey? My programming skills are such that the only style available to me is "trial and error," which makes coding things a real handfull.

In any case, I'll keep plugging away at it - I really want to fly to this thing.
 
Last edited:

Frogisis

innn spaaaaace...ace...ace...!
Addon Developer
Joined
Aug 13, 2008
Messages
185
Reaction score
0
Points
31
Location
Chicago
Website
www.frogisis.com
Clipping Problem: SOLVED.
Texturing Problem: SOLVED.
colonyimage3.jpg

Yes, I am great - When I walk into a room, sea monkeys come back to life and dogs spontaneously gain the ability to talk.

There are some things even I cannot do, however, such as program animations in C++. I copied the format from the API reference, but no matter where I put the code or how I play with it, it won't compile. I looked on Google for examples, but, unlike the problem I had with beacons last time, I couldn't find anything. The code from the Delta Glider and Shuttle A are all spread out and I don't really understand it, either. Here's what I have:

Code:
class oneill: public VESSEL2 {
public:
    oneill (OBJHANDLE hVessel, int flightmodel)
        : VESSEL2 (hVessel, flightmodel) {}
    void clbkSetClassCaps (FILEHANDLE cfg);

void oneill::DefineAnimations ()
    {
            static UNIT grav_groups[8] = {1,2,3,4,5,6,7,8};

            static MGROUP_ROTATE grav (
                0,
                grav_groups, 8,
                _V(0,0,0),
                _V(0,0,1),
                (float)(2*PI)
            );
            anim_grav = CreateAnimation (1.0);
            AddAnimationComponent (anim_grav, 0, 1, &grav);
    }

};
// ==============================================================
// Overloaded callback functions
// ==============================================================

// --------------------------------------------------------------
// Set the capabilities of the vessel class
// --------------------------------------------------------------
void oneill::clbkSetClassCaps (FILEHANDLE cfg)
{
    // physical specs, etc. below
When I try to compile it, it says I'm missing a "}" at best, and calls all the identifiers "undeclared" at worst, depending on where I put this section. If I can just get it to compile, I'll figure out later which mesh groups should be part of the rotating section. I tried using Mesh Debugger to see if I could determine which component is which, but it doesn't seem to actually do anything. The .msh file itself doesn't give me enough to sink my teeth into, either. Finally, I don't see a place in here to set the parameter for how fast the animation should be.

I did some math to figure out the rate of rotation for 1g (3.2 deg/sec) but I wonder how fast the clouds should spin inside it... 3.2 deg/sec might not sound like a lot, but when you see it, it seems like it's spinning faster than it should be. I'd like to animate the clouds separately, too, so they're spinning around at maybe half that speed.

Here's what's left to do:
-Program the two animations (cylinder and clouds - Also the only part I don't know how to do)
-Code the docking ports.
-Add some lights to the outside for effect.
-Finish the textures.
-Put them at Lagrange points in a few scenarios.
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
When I try to compile it, it says I'm missing a "}" at best, and calls all the identifiers "undeclared" at worst, depending on where I put this section. If I can just get it to compile, I'll figure out later which mesh groups should be part of the rotating section. I tried using Mesh Debugger to see if I could determine which component is which, but it doesn't seem to actually do anything. The .msh file itself doesn't give me enough to sink my teeth into, either. Finally, I don't see a place in here to set the parameter for how fast the animation should be.
If your compiler says you're missing a "}", add a "}".

Hint: the class declaration needs a closing brace before you start with the function definitions.
 

Ursus

Rocket Tinker
Addon Developer
Joined
Oct 20, 2007
Messages
176
Reaction score
2
Points
18
Location
46N 123W
Code:
class oneill: public VESSEL2 {
public:
    oneill (OBJHANDLE hVessel, int flightmodel)
        : VESSEL2 (hVessel, flightmodel) {}
    void clbkSetClassCaps (FILEHANDLE cfg);

void oneill::DefineAnimations ()
    {
            static UNIT grav_groups[8] = {1,2,3,4,5,6,7,8};

            static MGROUP_ROTATE grav (
                0,
                grav_groups, 8,
                _V(0,0,0),
                _V(0,0,1),
                (float)(2*PI)
            );
            anim_grav = CreateAnimation (1.0);
            AddAnimationComponent (anim_grav, 0, 1, &grav);
    }

};
// ==============================================================
// Overloaded callback functions
// ==============================================================

// --------------------------------------------------------------
// Set the capabilities of the vessel class
// --------------------------------------------------------------
void oneill::clbkSetClassCaps (FILEHANDLE cfg)
{
    // physical specs, etc. below
When I try to compile it, it says I'm missing a "}" at best, and calls all the identifiers "undeclared" at worst, depending on where I put this section. If I can just get it to compile, I'll figure out later which mesh groups should be part of the rotating section.

Finally, I don't see a place in here to set the parameter for how fast the animation should be.

I was just poking around in an animation definition today, so I could get some beacons to rotate with a mesh...

You need to declare UINT anim_grav as a member of your vessel class.

The animation speed can be declared and defined as a constant...

Code:
const double rotation_speed = (3.2/360.0) / (2.0*PI);
EDIT: Actually, that should be "rotation_speed = 3.2 / 360.0", see post below.

The animation needs to actually be implemented from clbkPreStep or clbkAnimate (It looks like the clbkAnimate method needs animation to be Registered... I'm not really familiar with it, but it should prevent your animation from using up processor time when your colony isn't visible.)

Code:
void oneill::clbkPreStep (double SimT, double SimDT, double mjd)
{
    double da = SimDT * rotation_speed; // Delta angle
    rotation_angle += da;
    // Next line changed from ring_angle -= 1.0 to deal with problems
    // associated with high time acceleration.
    if (rotation_angle > 1.0) rotation_angle -= floor(rotation_angle);
    SetAnimation (anim_grav, rotation_angle);
}
double rotation_angle should be a member of your vessel class.

---------- Post added at 01:39 AM ---------- Previous post was at 01:12 AM ----------

If your compiler says you're missing a "}", add a "}".

Hint: the class declaration needs a closing brace before you start with the function definitions.

Actually... assuming there's more of clbkSetClassCaps that just got cut off when he posted the code (like where he calls DefineAnimations), it looks like all the curly brackets are there.

The DefineAnimations method should be moved outside the class declaration and declared within the class declaration, unless he's trying to declare it as an inline method, in which case he ought to remove the oneil:: before it. He also needs a semicolon after the class constructor...

Code:
class oneill: public VESSEL2 {
public:
    oneill (OBJHANDLE hVessel, int flightmodel)
      : VESSEL2 (hVessel, flightmodel) {};
    void clbkSetClassCaps (FILEHANDLE cfg);
    void clbkPreStep (double SimT, double SimDT, double mjd);

     void DefineAnimations ();
    UINT anim_grav;
    double rotation_angle;
};

const double rotation_speed = (3.2/360.0) / (2.0*PI);

void oneill::DefineAnimations ()
{
        static UNIT grav_groups[8] = {1,2,3,4,5,6,7,8};

        static MGROUP_ROTATE grav (
            0,
            grav_groups, 8,
            _V(0,0,0),
            _V(0,0,1),
            (float)(2*PI)
        );
        anim_grav = CreateAnimation (1.0);
        AddAnimationComponent (anim_grav, 0, 1, &grav);
}
et cetera...
 
Last edited:

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
Actually... assuming there's more of clbkSetClassCaps that just got cut off when he posted the code (like where he calls DefineAnimations), it looks like all the curly brackets are there.

Look again. The definition for the oneill class is missing its closing }.
 

Ursus

Rocket Tinker
Addon Developer
Joined
Oct 20, 2007
Messages
176
Reaction score
2
Points
18
Location
46N 123W
Code:
const double rotation_speed = (3.2/360.0) / (2.0*PI);

... or is that (360/3.2) / (2.0*PI)? No... i think I was right the first time. Come to think of it, I'm pretty sure now... I thought I made a mistake, but I was wrong... Oh... just a second... yes there was a mistake, just not the one I thought... Let's try this again... The number should come out to the fraction of a complete revolution made in one second, so:

Code:
const double rotation_speed = 3.2 / 360.0;

Not to squabble... One could say the was closing bracket was misplaced, or that the DefineAnimations() method was misplaced, or that the closing bracket was missing and there just happened to be an extra closing bracket after the DefineAnimations() method.
 
Last edited:

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
Not to squabble... One could say the was closing bracket was misplaced, or that the DefineAnimations() method was misplaced, or that the closing bracket was missing and there just happened to be an extra closing bracket after the DefineAnimations() method.

Sorry, I have a simple mental parser: I hit an error and that's it, i stop right there. ;)
 
Top