FreeOrion

Forums for the FreeOrion project
It is currently Sat Nov 18, 2017 9:25 pm

All times are UTC




Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Shipyard
PostPosted: Tue Apr 13, 2010 9:45 pm 
Offline
Space Dragon
User avatar

Joined: Fri Mar 10, 2006 12:32 pm
Posts: 318
Location: Finland
pd wrote:
WEAPONS

Weapon effects are on my list of "mock-ups to-do"... Since we don't show actual ship parts externally, I don't think we need to have weapon effects come out of certain parts. Instead they can originate from the center of the ship, but only be shown starting at the boundary volume.


What about this?

pd wrote:
What will be possible is to have relativly small 'gun emission points', which could be placed pretty much freely on the surface of the meshes. So that if the player decides to put a laser weapon somewhere on the left side of the ship, it will actually fire from there. Those should be relativly small and simple, so that they're not much of an effort to create and fit to the racial designs. Maybe we could even use colors to indicate whether there is a laser or ballistic weapon underneath.

This way the weapons don't interfere with the designs itself, and still there is an indication of the weapons used.


Personally I am not too concerned whether or not a beam originates exactly from the point to which the player has placed his/her weapon (although it would of course be nice if it would) as battles will probably usually have numerous different ships shooting numerous different beam weapons. So the exact place where a single beam originates from might not usually be the first thing on the player`s mind. However having the beams originate from the model itself would be nice, at least compared to this first mock-up where the beams seem to originate from the ships shields, which seems a bit weird.

Also, since there have been much discussion in this topic about changing ship models at least as far as colours are concerned, should a possible model change like battle damage also be considered? (This might of course be a quite low priority issue and as such not very important currently.)

_________________
What is your favourite alien species and WHY?
Preliminary thoughts about diplomacy
Some unfinished ideas for specials


Last edited by MikkoM on Wed Apr 14, 2010 12:48 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Tue Apr 13, 2010 9:57 pm 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1924
Location: 52°16'N 10°31'E
It's very easy to go overboard with things we could potentially do. For the sake of simplicity I do no longer support this comment of mine, made more than 2 years ago. A lot of things have changed since then. The design screen alone would need to be changed a lot.

If, however tzlaine decides, that hardpoints should be added, I'm will obey, of course :)

Regarding damage: If, we want to do this, we can do it with textures(which is always simpler than doing it with models). Personally I don't think we need it. Healthbars provide a better feedback.


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Tue Apr 13, 2010 10:02 pm 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
pd wrote:
I've committed a decal map for the Mark 1. There are currently just 2 channels. The first is a neutral base texture, onto which the empire color is overlayed using the second channel, which is the decal mask.(see this and this).

Or you could just use the second channel to replicate this.

Ok, so is this texture here so I can try both options to see what works best, or do we really need two decal channels?

Quote:
tzlaine wrote:
Without separate channels, with the glow baked into the specular channels, bright specular reflections automatically cause the glow to increase too, which is bad.
While this is right, it can be solved by using black in the specular channel for everything that's glowing, which is what I'm doing anyway.

I think you might be misunderstanding me. What I'm talking about is the parts of the model that have some self-illumination from some glowing part. In those places on the model, you have a final color that is (ignoring specular and other contributions for now) Gr (glow, reflected) + D (diffuse / color map). In a no-light situation, the color is Gr -- the diffuse contribution is zero. In a lit situation in which the glow is turned off, you have D -- Gr contributes nothing when the glow is turned off. Then there is the case where glow is on, and lighting is in play. In those cases, you would like to have D vary with the angle to the light source, and have that reflected in (Gr +D), without changing Gr. This is what I mean when I suggest we need to have the glow colors and the diffuse colors represented as full RGB channels for every location.

Also, I asked a few days ago for your breakdown of the color channels as you envision it. Here's what Geoff and I have tentatively settled on so far:

Quote:
1. rgba -> diffuse red, diffuse green, diffuse blue, diffuse alpha
2. rgb -> normal x, normal y, normal depth; a-> specular/gloss
3. rgb -> glow 1, glow 2, glow 3; a -> decal

Are there any changes you'd like to make to this?

Quote:
Weapon effects are on my list of "mock-ups to-do"... Since we don't show actual ship parts externally, I don't think we need to have weapon effects come out of certain parts. Instead they can originate from the center of the ship, but only be shown starting at the boundary volume. Here's is something quick and dirty to illustrate this. The bottom two ships are shooting at the seed sphere.

That looks really good to me. KISS.


Last edited by Geoff the Medio on Tue Apr 13, 2010 10:09 pm, edited 1 time in total.
fixed quote


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Tue Apr 13, 2010 10:04 pm 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
pd wrote:
It's very easy to go overboard with things we could potentially do. For the sake of simplicity I do no longer support this comment of mine, made more than 2 years ago. A lot of things have changed since then. The design screen alone would need to be changed a lot.

If, however tzlaine decides, that hardpoints should be added, I'm will obey, of course :)

I'm very against hard points and turrets. I'm more interested in supporting a large number of ships, rather than a large amount of detail on each ship.

Quote:
Regarding damage: If, we want to do this, we can do it with textures(which is always simpler than doing it with models). Personally I don't think we need it. Healthbars provide a better feedback.

I agree completely.


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Tue Apr 13, 2010 10:29 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12013
Location: Munich
MikkoM wrote:
...the beams seem to originate from the ship`s shields...

This raises the issue of shield effects. Has any thought been put into how to render shields? Assuming not:

For geometry purposes:
* The simplest solution would seem to be a bounding sphere for every ship with non-depleted shields.
* More complicated would be to automatically generate in code an ellipsoid that fits a bit better around each ship model, depending on its shape. This is probably not necessary.
* Alternatively, a set of shield meshes could be created for each ship mesh, with customized form-fitting shield geometry. This is probably not necessary.
* Planets will only need spherical shields in any case, since they are themselves spherical.

For texturing purposes:
* Probably shields should be more prominent when they are being fired upon, but should still be visible whenever they are active (ie. not depleted).
* Player-coloured shields (aside: and beam weapons?) might make sense, to help make ships more distinguishable.
* When not being fired on, shields could have a low-alpha diffuse colour (edit: or greyscale texture with applied colour) and perhaps a low to moderate amount of gloss.
* When being fired on, a low amount of glow (in the same diffuse colour) could be added.
* Glow just on the side where the fire is coming from would be nice, but is probably not necessary.


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Tue Apr 13, 2010 10:32 pm 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1924
Location: 52°16'N 10°31'E
tzlaine wrote:
Ok, so is this [decal] texture here so I can try both options to see what works best, or do we really need two decal channels?

It's there for you to try out what works. Ideally we need as few as possible of these channels.

tzlaine wrote:
I think you might be misunderstanding me. What I'm talking about is the parts of the model that have some self-illumination from some glowing part. In those places on the model, you have a final color that is (ignoring specular and other contributions for now) Gr (glow, reflected) + D (diffuse / color map). In a no-light situation, the color is Gr -- the diffuse contribution is zero. In a lit situation in which the glow is turned off, you have D -- Gr contributes nothing when the glow is turned off. Then there is the case where glow is on, and lighting is in play. In those cases, you would like to have D vary with the angle to the light source, and have that reflected in (Gr +D), without changing Gr. This is what I mean when I suggest we need to have the glow colors and the diffuse colors represented as full RGB channels for every location.

That makes sense. The reason I was proposing the change with the glow texture, is that when doing my renderings, I'm only using a glow channel, as I've suggested and take the color information from the color map. This of course works only because the light information has been baked into the color map before and and will only work as long as the glow is turned on. In a situation where the glow is off, I need to switch the color map and disable the glow channel. Anyway, as I've said, let's keep the glow part as it is, it works beautifully.


Quote:
Also, I asked a few days ago for your breakdown of the color channels as you envision it. Here's what Geoff and I have tentatively settled on so far:

Quote:
1. rgba -> diffuse red, diffuse green, diffuse blue, diffuse alpha
2. rgb -> normal x, normal y, normal depth; a-> specular/gloss
3. rgb -> glow 1, glow 2, glow 3; a -> decal

Are there any changes you'd like to make to this?

I've delayed this because the glow discussion was still ongoing. I'm fine with the proposal.


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Tue Apr 13, 2010 10:59 pm 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
pd wrote:
tzlaine wrote:
Ok, so is this [decal] texture here so I can try both options to see what works best, or do we really need two decal channels?

It's there for you to try out what works. Ideally we need as few as possible of these channels.

Cool. Can you give me some more detail on what the operation should look like in either case (that is, using either of the two channels you've provided)?

Quote:
tzlaine wrote:
I think you might be misunderstanding me. What I'm talking about is the parts of the model that have some self-illumination from some glowing part. In those places on the model, you have a final color that is (ignoring specular and other contributions for now) Gr (glow, reflected) + D (diffuse / color map). In a no-light situation, the color is Gr -- the diffuse contribution is zero. In a lit situation in which the glow is turned off, you have D -- Gr contributes nothing when the glow is turned off. Then there is the case where glow is on, and lighting is in play. In those cases, you would like to have D vary with the angle to the light source, and have that reflected in (Gr +D), without changing Gr. This is what I mean when I suggest we need to have the glow colors and the diffuse colors represented as full RGB channels for every location.

That makes sense. The reason I was proposing the change with the glow texture, is that when doing my renderings, I'm only using a glow channel, as I've suggested and take the color information from the color map. This of course works only because the light information has been baked into the color map before and and will only work as long as the glow is turned on. In a situation where the glow is off, I need to switch the color map and disable the glow channel. Anyway, as I've said, let's keep the glow part as it is, it works beautifully.

Agreed.

Quote:
Quote:
Also, I asked a few days ago for your breakdown of the color channels as you envision it. Here's what Geoff and I have tentatively settled on so far:

Quote:
1. rgba -> diffuse red, diffuse green, diffuse blue, diffuse alpha
2. rgb -> normal x, normal y, normal depth; a-> specular/gloss
3. rgb -> glow 1, glow 2, glow 3; a -> decal

Are there any changes you'd like to make to this?

I've delayed this because the glow discussion was still ongoing. I'm fine with the proposal.

Ok. Then after I play a bit with the decal stuff, I'll write a new set of material/shaders/code that will use the new channel scheme. In the meantime, could you give me a set of textures that looks like the above?


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Tue Apr 13, 2010 11:01 pm 
Offline
Space Dragon
User avatar

Joined: Fri Mar 10, 2006 12:32 pm
Posts: 318
Location: Finland
pd wrote:
It's very easy to go overboard with things we could potentially do. For the sake of simplicity I do no longer support this comment of mine, made more than 2 years ago. A lot of things have changed since then. The design screen alone would need to be changed a lot.

If, however tzlaine decides, that hardpoints should be added, I'm will obey, of course :)


Well, my main concern is anyway that the beam weapons should look good to the player, and this is of course quite hard to determine from a single mock-up picture.

_________________
What is your favourite alien species and WHY?
Preliminary thoughts about diplomacy
Some unfinished ideas for specials


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Wed Apr 14, 2010 12:22 am 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1924
Location: 52°16'N 10°31'E
tzlaine wrote:
Cool. Can you give me some more detail on what the operation should look like in either case (that is, using either of the two channels you've provided)?

I can try. Both methods rely on the overlay blending mode in photoshop. Check out this site, where somebody has translated the necessary math to GLSL. The blending is done using a base and a blend. Blend is always the empire color.
I guess this is the relevant part, but I'm not sure:
Code:
#define BlendOverlayf(base, blend)    (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))


1. Method
I'm starting with the third decal channel, because it's the most promising. If it works it's just one channel and the empire colors are replicated perfectly.

Image
This is the base. So what needs to be done is BlendOverlay(third channel, empire color)

Assuming empire color is a bright green, this would be the result:
Image
Note, that black parts remain black due to the nature of overlay blending.

This result needs to be combined with the color map. Everything that's 0.0 is replaced with the color map. Everything that is not 0.0 is taken exactly as in this image and substitutes the color map. If this can't be done with the third channel alone, there's a second channel, which is an alpha version/mask of this.

2. Method
Compared to the previous method, this one is less than ideal, because it depends too much on the color map. If I would use a heavily saturated color as a main diffuse color for the hull the overlay method fails, because the empire color is no longer being replicated properly

Anyway, base in this case is the color map. So what needs to be done is you check the second channel of the decal map(mask) and at any pixel that is 1.0 you do BlendOverlay(color map, empire color). Again the result is combined with the color map.

I hope this makes sense.

Quote:
In the meantime, could you give me a set of textures that looks like the above?

I can provide the first two, since I don't know what decal channel we're going to use yet.


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Wed Apr 14, 2010 1:40 am 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
pd wrote:
I hope this makes sense.

I understood all that. Thanks for all the detail.

Quote:
Quote:
In the meantime, could you give me a set of textures that looks like the above?

I can provide the first two, since I don't know what decal channel we're going to use yet.

Could you provide the third one in both forms?


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Wed Apr 14, 2010 1:59 am 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1924
Location: 52°16'N 10°31'E
It just occured to me, that to combine the result of the overlay in method 1 with the color channels, we might use another blending mode. There's one, that comes really close to what we want: Lighten
Code:
#define BlendLightenf(base, blend)       max(blend, base)


Image

However, it only works as long as the base(color map) is darker than the blend, which will not always be the case. Also the resulting decal color is not true to the empire color(it's brighter).


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Wed Apr 14, 2010 2:12 am 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1924
Location: 52°16'N 10°31'E
tzlaine wrote:
Could you provide the third one in both forms?

Done.
new_mark1_Glow1.png has the decal map for method 1.


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Fri Apr 16, 2010 12:40 am 
Offline
Space Dragon
User avatar

Joined: Fri Mar 10, 2006 12:32 pm
Posts: 318
Location: Finland
Geoff the Medio wrote:
* Player-coloured shields (aside: and beam weapons?) might make sense, to help make ships more distinguishable.


If ships, shields and beam weapons would all be player-coloured, wouldn’t this make the space battles look a bit homogenous, at least as far as visual effects and colours are concerned? And on the other hand, if beam weapons are coloured and have certain visual effects based on what weapons (weapon techs) the ship actually uses, couldn’t this give, at least for the more experienced players, clear visual hints about the weapons that the enemy ships have? Not to mention, add more colour to space battles. (However, I don`t of course really know how the space combat engine handles beam weapons.)

And as far as player-coloured effects are concerned, perhaps ship explosions could also be considered. This is of course a bit of a brainstorming kind of an idea (might be bad), but perhaps player-coloured explosions could add more colour to space battles and indicate clearly whose ship was destroyed.

_________________
What is your favourite alien species and WHY?
Preliminary thoughts about diplomacy
Some unfinished ideas for specials


Top
 Profile  
 
 Post subject: Re: Shipyard
PostPosted: Fri Apr 16, 2010 1:53 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 2058
Location: Orion
MikkoM wrote:
And on the other hand, if beam weapons are coloured and have certain visual effects based on what weapons (weapon techs) the ship actually uses, couldn’t this give, at least for the more experienced players, clear visual hints about the weapons that the enemy ships have?
I suppose that even if weapon effects were based on the weapon, the colour could still be based on the empire colour. I'm not sure how easy it would be, though, to distinguish between various weapon types not based on colour. And then of course, there's the issue of what to do when a ship of unknown or independent ownership is firing its weapons at you.

MikkoM wrote:
And as far as player-coloured effects are concerned, perhaps ship explosions could also be considered. This is of course a bit of a brainstorming kind of an idea (might be bad), but perhaps player-coloured explosions could add more colour to space battles and indicate clearly whose ship was destroyed.
In this case, there would still have to be a generic explosion for pirates and ships of unknown ownership, which could probably easily be confused with the explosion of some particular empire's ship. Also, the destruction of certain types of ships won't necessarily be an "explosion" per se. I get the impression that it would be a bit awkward to depict the destruction of a trained space monster in the colour of its owner empire, unless the space monster itself was that colour.

Player coloured shields, on the other hand, probably make a lot of sense, as it's probably easy to make the shield effect colourless for pirates et al without making it look silly (like a grey laser would).

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group