Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1373426 Posts in 64864 Topics- by 57056 Members - Latest Member: FluxCap

February 27, 2020, 07:35:52 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsPERSONAL SPACE - A story of galactic exploration and interior decorating
Pages: 1 2 3 [4]
Print
Author Topic: PERSONAL SPACE - A story of galactic exploration and interior decorating  (Read 4430 times)
NovaSilisko
Level 3
***


Real life space alien (not fake)


View Profile
« Reply #60 on: February 09, 2020, 02:30:47 PM »

I realized I haven't actually talked about how the ship design has evolved. To get right into it, here is where the design of the ship sits right now:



I feel much better about it than how it was before. It still needs refinements, but I want to nail down the proportions first. The biggest change is the replacement of the "neck" and small cockpit section of the original ship with a large "bridge" area, comparable in height to the rear cabin, and physically connected to the rest of the ship in a continuous interior space.



It's got vastly more room in it than the old cockpit. In-universe I imagine that being so an entire expedition team can occupy the space and gawk at the same thing out of the window while bothering the pilot about which way to fly. I've been waffling on how I feel about the size, but I think I like it. It gives you a new area to decorate and live in rather than just being crammed into the seat.



Speaking of the seat, that's the one feature missing from it right now. I might make a quick rough version of it soon, but the general idea is that it will protrude outward over the ledge on the floor, leaving the actual seat overhanging... well, space. So you can look straight down at anything directly below the ship.

To get a sense of the scale, I was originally going to import the astronaut model I found on the NASA website ages ago and scale it appropriately, but then decided to do one better, and made a quick draft of the player model I have in mind for the future... using that, here is an example of the scale of the bridge, now:



From here, the main thing left to do is to refine it and detail it further. I intend for there to be various computers in the wall that blink and flash and generally give some extra visual interest. But... don't want to get too carried away with that yet, in case I start to change my mind on something or another.

Which, inevitably, I know I will...  Droop
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #61 on: February 09, 2020, 03:14:24 PM »

Looking great! I don't remember how it was before.

Since I'm working on a project with a few intersecting ideas now, I'm curious about how you're dealing the different scales. Are you using different cameras layered on top of each other? Is the interior of the ship a different scene of sorts? Or is it all unified?
Logged

NovaSilisko
Level 3
***


Real life space alien (not fake)


View Profile
« Reply #62 on: February 09, 2020, 03:57:32 PM »

Unity's built-in layering for rendering and collision. A photo behind the curtain can demonstrate:



There are several important layers - interior (the ship interior), local (the ship model, terrain, etc), navigation (everything on the map screen), interplanetary (distant out-the-window visuals for planets), interstellar (stars, eventually nebulae and galactic fluff)... and then various odd ones for other purposes (like the replicator prop wireframe renderer thingy)

The interior is static and centered. It has its own sun lights that match up with the sun lights on the local layer, transformed to match the rotation to the relative rotation of the original lights to the spacecraft rigidbody. The reverse happens for the camera - the local camera is set to match the interior camera, transformed to have the same relative position to the spacecraft model that the interior camera has to the interior origin.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #63 on: February 09, 2020, 05:34:28 PM »

Thanks for the peek behind the curtains.  Coffee
Logged

NovaSilisko
Level 3
***


Real life space alien (not fake)


View Profile
« Reply #64 on: February 12, 2020, 08:54:58 PM »

I keep getting distracted from the arguably more important work of, you know, re-implementing the features of the game.

Oh well.

THROWING SHADE

This time the distraction involved absentmindedly completely rebuilding how the planetary shadow system works. I never actually wrote about it the first time! But it evolved quickly from my previous shadow post for rings and became a system that would work for any object. The game would update an array of structs containing pertinent info for rendering the shadows, representing all bodies that would interact with the shadow system.

To sample the shadows, then, you would call a shader function that iterates through all those structs, performs the needed coordinate transformations, and displays the shadow value. It worked, quite well in fact, but... it always needed improvements. For one thing, it did not discriminate as to which objects could cast shadows upon which. If an object was visible, it was part of the pool. Obviously that's not very efficient since it's wasting multiple cycles of the loop for every pixel on bodies that can't even conceivably cast shadows on any other.

So, that was the first thing I went at. There's more to this story beyond what I talked about, but let's start by talking about how the caster test works, and we'll get back to the rest later. Hopefully this all makes sense. Explaining math and geometry is not my strongest skill...

What is the best way to determine if a body can cast a shadow upon another? Let's consult this diagram again:


The antumbra is what we want to pay attention to. Considering it represents the maximum extent of the shadow cast, that's the right direction to be thinking in. And from that, if you look at the blue lines, the point at which they cross is the perfect position to run our test. From that vantage point, if object A (the further object) overlaps object B (the nearer object) in the sky at all, B can be considered as casting a shadow onto A.

So far so good. How do we actually find that position? The problem can be simplified quite a lot. It's perfectly acceptable to approximate it as such:


Two line segments, one representing the diameter of the sun, and one representing the diameter of the planet. Some basic triangle math can then be used to get how far away from the planet the viewpoint needs to be. From that viewpoint, you can fetch the angular radii of both objects in the sky, measure the angular distance between their centers, and if that distance is smaller than the sum of both radii, the objects can be considered overlapping. Here's what that looks like:


Step 1 complete! We now know which objects can cast/receive shadows at any given time, with a bit of basic math.

Step 2... step 2 is where things got different.

See, as I said, it previously worked in real-time, iterating through an array of objects to get a shadow value, blah blah. But it quickly came to me that there is a better, faster, cheaper way to go about it.

Take the planet you want to have shadows cast upon. Per the caster test from before, we already know what objects will cast shadows on it. From that information, we can render a texture containing the shadow data, store it in a texture array, and then suddenly the cost of getting a shadow value goes from the cost of iterating through this big array, to the cost of a some multiplication and addition to transform into the right coordinate space, and a single texture sample.

The actual implementation of it works out pretty much just like I described. Periodically (every few seconds), the lighting controller will run its caster tests and decide which objects can be shadowed. For anything that's receiving a shadow, it's assigned a slice of a pre-made texture array, and its associated caster objects have their shadows rendered into that slice. And then to retrieve that value, it only requires a matrix transformation to the right coordinates.

To better show this off, I made a function that spits out several planes and squares to actually visualize the individual texture slices:


You totally just scrolled past those last few paragraphs to look at the picture, didn't you? That's what I thought.

This method has advantages and disadvantages, but I think the advantages greatly win out. The basically-nonexistent render cost of getting a shadow value means I can apply them all over the place. I've already mated it with the terrain shader and local object shaders, allowing it to cast shadows onto the ship (in some situations anyway... I need to add several special cases). Integrating it with the atmospheres should be a... breeze. get it

The disadvantages are that it can't update as fast (but considering I am not planning on having anything but 1:1 timescale, that's no big deal), that it has a limited resolution (shadows are soft and fuzzy though!), and lastly that the shadow plane represents an infinitely thin slice of the shadows at that position, rather than an actual projection of the shadows onto the surface. I think there's a way around that, though - if I render two shadow maps into the red and green channels of the same texture, one slightly ahead of the other, and then blend between them based on the sample position, depending on the... okay, I'm just rambling to myself out loud at this point. I'll probably give a better explanation of that later on, when/if I end up implementing it.

Here. Have picture. Still missing the atmosphere shadows, but I'll get there.


OK BYE

Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #65 on: February 13, 2020, 08:35:01 AM »

I've missed a couple of updates! Those were some interesting reads and as always very pretty pictures. Even for someone who redoes stuff sometimes you're making a lot of amazing progress on this. I'm intrigued by that player character, would love to know more!
Logged

NovaSilisko
Level 3
***


Real life space alien (not fake)


View Profile
« Reply #66 on: February 13, 2020, 11:15:35 AM »

I've missed a couple of updates! Those were some interesting reads and as always very pretty pictures. Even for someone who redoes stuff sometimes you're making a lot of amazing progress on this. I'm intrigued by that player character, would love to know more!

I've been a bit reticent on posting about the player model after talking about it yielded a bit of a frosty reception last time... but I can't deny a request.

An important part of the game is the "personal" part of the title. Some degree of emphasis on the player being an actual individual in the world and having a sense of place. Sure, it's not super important in a primarily first person game, but having the design around helps me frame some thing better in my head. Sorry if that's kind of vague, it's hard to explain.

Anyway, the design has evolved a fair bit over time. But I think this is the final one... meet the pilot, presently, and probably forever, unnamed. As well as a closer view of the draft model:


(hands not drawn because I can't draw hands)

You will, eventually, be able to get a view other than first person - I would like there to be, for instance, camera drones you can toss and fly around to get different viewpoints of things, or take selfies, or whatever. Alongside things like first person body models and the like. Plugging a telemetry cable into your own chest panel when sitting in the pilot's seat. Things to further ground the player in the world, I guess.

I'll probably outsource the final model eventually, as this is very much not the type of modeling I'm very good at...

I have all sorts of silly ideas that might or might not end up being made. Picking poses when you're using a camera drone so you can dab on the rim of a volcano stare contemplatively into the distance or something. Painting pixel art on the faceplate. Printing spiffy new clothes with your replicator. You know, important things  Huh?

That's all for fairly late in the process, though. For the time being, Our Hero will remain all... greyboxed.

Oh, I almost forgot. One more very important feature:


Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #67 on: February 14, 2020, 12:46:45 AM »

Can't wait to selfie dab with those antennæ all over the universe! For some reason always just expected a vanilla human. I like this twist!
Logged

Nova
Level 0
**

Redhead, Metalhead, Headyhead


View Profile WWW
« Reply #68 on: February 14, 2020, 08:11:39 AM »

Looks cool! Reminds me of Noctis IV, except a lot better looking haha :D
Logged

Graphic Designer @ Logic Artists
michaelplzno
Level 5
*****



View Profile WWW
« Reply #69 on: February 15, 2020, 04:33:19 PM »

How much personal space do you need, a whole universe?

ADD SOME CHAIRS:

Logged

NovaSilisko
Level 3
***


Real life space alien (not fake)


View Profile
« Reply #70 on: February 15, 2020, 04:43:16 PM »

shhhhh I'm writing the new prop importer as we speak!! Then chairs will happen!
Logged

NovaSilisko
Level 3
***


Real life space alien (not fake)


View Profile
« Reply #71 on: February 24, 2020, 09:44:30 AM »

Back to interior work again for a while - I've been rebuilding the replicator and interfaces with a number of new ideas and improvements...

First off is a revised method of interfaces in the interior. Previously, there was a distinct "using-interface" mode, which felt slick but was additional complexity and took control away from the player for a bit. Needed different camera modes and checks to decide what it ought to be doing, etc.

All of that's gone now. Now the interfaces are fully integrated into the normal mouse interaction, just like props. It's basically the way interfaces worked in Doom 3, except you can also unlock the mouse look and move the cursor freely if you decide. Here's what it looks like now:



You may be disappointed to learn the interface on the screen is only a test, and does not represent something that will appear in the final game.

The actual rendering method hasn't changed. The GUI gets rendered to a texture via an orthographic camera on a special world GUI layer, which is then rendered onto the the screen surface, which yields a very realistic feeling screen effect. Because it's rendered into a camera, also, it's very easy to add the glitchy post process effects like you see when the screen is turned on.

And here's the replicator progress... making it look nicer than the last time around, also with the new screen interaction added:

« Last Edit: February 24, 2020, 09:53:09 AM by NovaSilisko » Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #72 on: February 24, 2020, 10:32:33 AM »

Love it!
Logged

Schrompf
Level 7
**

C++ professional, game dev sparetime


View Profile WWW
« Reply #73 on: February 24, 2020, 12:15:16 PM »

Greatness arises. Let the Farting commence.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
NovaSilisko
Level 3
***


Real life space alien (not fake)


View Profile
« Reply #74 on: February 25, 2020, 06:29:41 PM »

An addendum to the replicator: Dereplication, aka, unbuilding. Does what it says on the tin...





Don't turn it on while yourself or a colleague is standing in the build area. The Grand Galactic Survey Council takes no responsibility for accidental unbuilding of personnel.

There's one more feature I've been thinking of for it. It would be very nice to be able to lay out multiple objects in the build area and have it make all of them at once to save time. But that's something for later, it's properly functional now, so that's one more thing I can check off the list of things to re-implement.
« Last Edit: February 25, 2020, 08:00:27 PM by NovaSilisko » Logged

NovaSilisko
Level 3
***


Real life space alien (not fake)


View Profile
« Reply #75 on: Today at 01:00:23 PM »

After much too long, I've started dropping the terrain noise back into the terrain generator, rather than just the craters from before...





« Last Edit: Today at 01:18:42 PM by NovaSilisko » Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #76 on: Today at 01:10:09 PM »


Beautiful!
Logged

Pages: 1 2 3 [4]
Print
Jump to:  

Theme orange-lt created by panic