Page 7 of 27

Re: Planetfall 2.0 (maybe)

Posted: Tue Mar 26, 2024 10:34 pm
by phkb
hiran wrote: Tue Mar 26, 2024 4:34 pm
You cannot have a RGBA color with just alpha. Apparently on your screenshot you set RGB all to zero and alpha to 0. Which means it is a black, but fully transparent.
Well, what I did was to select a region with the select tool, and then deleted it, leaving nothing. I didn't intentially set 0's on all the color properties. That's just what happened. And that method has worked in a lot of other scenarios where I needed a transparent region.

I had a thought this morning as to why I got black - I had a specular map in place on that image which is fully black. I thought maybe that was the reason for the end result of black in the cut away region. And it was - kind of. Leaving out the specular map, I got a grey box instead.

And on reflection, I think the issue is that Oolite applies a default specular color to models rendered in game that aren't given a specific specular map, with a default value of (0.2, 0.2, 0.2, 1.0). I guessing, but I think that is why I got a grey box when I left off the specular map.

So, the issue is because we are using a model with a texture applied. We aren't dealing with a standalone image (like a background image or overlay), which Oolite handles differently to what it does in 3D space. Transparency in backgrounds and overlays work just fine. The end result is, if you want cut-away sections, and to layer them on top of each other to build up a screen, we can't use transparency to achieve it. The model needs to explicitly define the cut away regions.

Re: Planetfall 2.0 (maybe)

Posted: Tue Mar 26, 2024 10:55 pm
by phkb
Redspear wrote: Tue Mar 26, 2024 12:20 pm
So: approach, sequence, context.
I'd forgotten we have another tool to use. We can add backgrounds to the arrival report screen, similar to what happens when you dock at a station with the HDBG mod installed. In that mod, Norby added a bunch of images of space station interiors to address the "context" issue. We could potentially do the same here. All we need to do is find (or create) some good looking images to use for each of the possible landing points (city, leisure complex, factory, prison, military base, etc) and then make the arrival report screen appear and plonk our background on it. No animations, though. It's just a static, *pre-rendered* image.

Re: Planetfall 2.0 (maybe)

Posted: Tue Mar 26, 2024 11:03 pm
by Redspear
phkb wrote: Tue Mar 26, 2024 10:55 pm
I'd forgotten we have another tool to use. We can add backgrounds to the arrival report screen... All we need to do is find (or create) some good looking images to use for each of the possible landing points (city, leisure complex, factory, prison, military base, etc)
Exactly my point and precisely why I posted that video...

Re: Planetfall 2.0 (maybe)

Posted: Tue Mar 26, 2024 11:10 pm
by phkb
Redspear wrote: Tue Mar 26, 2024 11:03 pm
Exactly my point and precisely why I posted that video...
It's a good point.

Well, for the moment then, I'm going to go back to the original set of corridor animations, and maybe some others can track down some useful images from around the Internet or wherever (remembering to check the licencing!) and flip them my way.

Re: Planetfall 2.0 (maybe)

Posted: Tue Mar 26, 2024 11:16 pm
by hiran
phkb wrote: Tue Mar 26, 2024 10:34 pm
I had a thought this morning as to why I got black - I had a specular map in place on that image which is fully black. I thought maybe that was the reason for the end result of black in the cut away region. And it was - kind of. Leaving out the specular map, I got a grey box instead.
:-D
Ok, for that I have no explanation....
phkb wrote: Tue Mar 26, 2024 10:34 pm
And on reflection, I think the issue is that Oolite applies a default specular color to models rendered in game that aren't given a specific specular map, with a default value of (0.2, 0.2, 0.2, 1.0). I guessing, but I think that is why I got a grey box when I left off the specular map.

So, the issue is because we are using a model with a texture applied. We aren't dealing with a standalone image (like a background image or overlay), which Oolite handles differently to what it does in 3D space. Transparency in backgrounds and overlays work just fine. The end result is, if you want cut-away sections, and to layer them on top of each other to build up a screen, we can't use transparency to achieve it. The model needs to explicitly define the cut away regions.
I'm afraid I do not fully understand 'model'. Are you talking of a 3d model? At least you guessed right, I am talking about overlaying 2d images.

Re: Planetfall 2.0 (maybe)

Posted: Tue Mar 26, 2024 11:50 pm
by phkb
hiran wrote: Tue Mar 26, 2024 11:16 pm
I'm afraid I do not fully understand 'model'. Are you talking of a 3d model?
That's correct. What I'm doing with all the examples so far (and which the original PlanetFall mod does), is essentially create a really flat 3D object using a model. Here's the .dat file for the left side door of the most recent example:

Code: Select all

NVERTS 4
NFACES 2

VERTEX
133.000000, -160.00000, 0.00000
133.000000, 160.00000, 0.00000
-133.000000, 160.00000, 0.00000
-133.000000, -160.00000, 0.00000

FACES
127,0,0, -0.00000,-0.00000,-1.00000, 3, 0,2,3
127,0,0, -0.00000,-0.00000,-1.00000, 3, 1,2,0

TEXTURES
planetFall2_landingFX_left.png 1.0 1.0 1.00000 1.00000 0.00000 0.00000 0.00000 1.00000
planetFall2_landingFX_left.png 1.0 1.0 1.00000 0.00000 0.00000 0.00000 1.00000 1.00000

END
That's then combined with an entry in the effectdata.plist file which allows us to instantiate the model in 3D space. While it's a flat model, it is quite distinct from a 2D image.

The only way I can use a basic 2D image at the point we want to use it would be to swap out the HUD for a custom one which just has a spot to put an image, and display the image there. Lots of downsides to that method, though.

Re: Planetfall 2.0 (maybe)

Posted: Wed Mar 27, 2024 12:16 am
by hiran
phkb wrote: Tue Mar 26, 2024 11:50 pm
hiran wrote: Tue Mar 26, 2024 11:16 pm
I'm afraid I do not fully understand 'model'. Are you talking of a 3d model?
That's correct. What I'm doing with all the examples so far (and which the original PlanetFall mod does), is essentially create a really flat 3D object using a model. Here's the .dat file for the left side door of the most recent example:
[...]

That's then combined with an entry in the effectdata.plist file which allows us to instantiate the model in 3D space. While it's a flat model, it is quite distinct from a 2D image.

The only way I can use a basic 2D image at the point we want to use it would be to swap out the HUD for a custom one which just has a spot to put an image, and display the image there. Lots of downsides to that method, though.
Looks to me you need a 3d model as a canvas to project the image on. Whereever the image is transparent, the canvas gets visible. And it's grey.

Does the canvas have to be rectangular? Could we extrude the cityline to have a 3d object, then project dark/almost black onto it, and finally slide that into the view from below?
(sorry, I am quite fixed on that idea...)

Re: Planetfall 2.0 (maybe)

Posted: Wed Mar 27, 2024 12:27 am
by phkb
hiran wrote: Wed Mar 27, 2024 12:16 am
sorry, I am quite fixed on that idea...
Yeah, I picked that up! :D
hiran wrote: Wed Mar 27, 2024 12:16 am
Whereever the image is transparent, the canvas gets visible. And it's grey.
Effectively. There are probably more technical ways to describe it, but that's good enough for now.
hiran wrote: Wed Mar 27, 2024 12:16 am
Does the canvas have to be rectangular? Could we extrude the cityline to have a 3d object,
Yes, that's what I was saying about using a model. If the model describes the city skyline, then the texture will only be applied to the parts the model actually has. If there's a gap between buildings, you'd be able to see whatever is behind it through the gap.
hiran wrote: Wed Mar 27, 2024 12:16 am
then project dark/almost black onto it, and finally slide that into the view from below?
Well, you wouldn't need to project black onto the model, as it would have the city skyline texture on it. I would just place it below the player's external view and then move it up until it was visible. Basically doing exactly what I'm doing with the sliding doors, except from the bottom up, rather than from the side.

Re: Planetfall 2.0 (maybe)

Posted: Wed Mar 27, 2024 5:28 am
by phkb
Here's a non-graphical question for everyone. The landing sites on planets and moons are now fixed, and each of them has a beacon. In a system with a couple of planets and moons, this can add 15-20 beacons to a system, which is obviously quite a lot.

To reduce the amount of noise and clutter, I'm thinking of changing when the beacons appear to be when you're within a certain distance of the planet they're on. So, maybe within 100km of the main planet, you'd see just the main planet landing points. Scoot around to the moon, and you might also get the moon landing points. But none of the other planets in the system would show up until you got close to them.

What do you think?

Re: Planetfall 2.0 (maybe)

Posted: Wed Mar 27, 2024 12:09 pm
by hiran
phkb wrote: Wed Mar 27, 2024 5:28 am
To reduce the amount of noise and clutter, I'm thinking of changing when the beacons appear to be when you're within a certain distance of the planet they're on. So, maybe within 100km of the main planet, you'd see just the main planet landing points.
Sounds ok for me. The ship's lasers have a range, the scanner does and the telescope has it as well.
Will the magic number 100 km resemble one of those or it is new?

Re: Planetfall 2.0 (maybe)

Posted: Wed Mar 27, 2024 12:17 pm
by phkb
No idea yet. Thinking out loud at the moment! On reflection I think the number might end up being a bit higher than that, maybe 150-200, so that once you’re close enough to a planet you can see all the beacons for it. At 100 you might not get ones on the far side. I’ll see how it feels with the change in game.

Re: Planetfall 2.0 (maybe)

Posted: Wed Mar 27, 2024 11:32 pm
by hiran
phkb wrote: Wed Mar 27, 2024 12:27 am
hiran wrote: Wed Mar 27, 2024 12:16 am
Does the canvas have to be rectangular? Could we extrude the cityline to have a 3d object,
Yes, that's what I was saying about using a model. If the model describes the city skyline, then the texture will only be applied to the parts the model actually has. If there's a gap between buildings, you'd be able to see whatever is behind it through the gap.
hiran wrote: Wed Mar 27, 2024 12:16 am
then project dark/almost black onto it, and finally slide that into the view from below?
Well, you wouldn't need to project black onto the model, as it would have the city skyline texture on it. I would just place it below the player's external view and then move it up until it was visible. Basically doing exactly what I'm doing with the sliding doors, except from the bottom up, rather than from the side.
Coming back to this again:
If we had a 2d image, questions would be about dimensions, color depth and alpha channel. Now there is the 3d model.

What are the desired dimensions (x,y and z)? Does the shape have to be a polygon or an amount of triangles? Can it be several polygons in case the buildings do not touch each other? How would the texture get applied to the model? (there would be some useful tutorials on youtube, would they?)

Re: Planetfall 2.0 (maybe)

Posted: Thu Mar 28, 2024 7:55 am
by phkb
hiran wrote: Wed Mar 27, 2024 11:32 pm
If we had a 2d image, questions would be about dimensions, color depth and alpha channel. Now there is the 3d model.

What are the desired dimensions (x,y and z)? Does the shape have to be a polygon or an amount of triangles? Can it be several polygons in case the buildings do not touch each other? How would the texture get applied to the model? (there would be some useful tutorials on youtube, would they?)
Um, yeah, this is where I have to hold up my hands and say "Sorry! No can do." I have no idea on the process for starting a model from scratch, or how to texture a model that doesn't already have textures. And right now, with the... hang on while I check this... hmm let me see now... oh! that many!... quote a few projects waiting in the wings, I don't really have scope to dive into the learning process.

But anyone else can step in at this point and lend a hand. Having some fresh modellers on hand would be super.

Re: Planetfall 2.0 (maybe)

Posted: Thu Mar 28, 2024 8:06 am
by phkb
I'm not a big fan of AI, but I have to say it can really work well for the task of creating images for someone like me who can't draw:
Image

Image

Image

Image

Not bad for a dozen or so words!

Re: Planetfall 2.0 (maybe)

Posted: Thu Mar 28, 2024 9:36 am
by Redspear
phkb wrote: Thu Mar 28, 2024 8:06 am
I'm not a big fan of AI, but I have to say it can really work well for the task of creating images
Yeah, they tend to have a certain 'look' but the images are certainly fit for purpose I'd say.

Two things I like about them in particular that are perhaps with noting:
  • distance - they mostly resemble 'approach' or overhead shots, almost an image of landing rather than of having landed if you see what I mean
  • fairly bland - that might not sound good but unless you're going to carefully curate hundreds of them then they need to be applicable to many different settings. If you do go down that route then the risk is that they define a particular look for the game which might be a matter of taste.
Looks like you've gone for economy type and maybe a moon. Tech level might be a good addition as well but it's easy to include too much.

Anyway, looking good.