"Sun" entity

Discuss the future of Warzone 2100 with us.
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: "Sun" entity

Post by Buginator »

doom3r wrote: Another improvement we could gain from light effects are laser projectiles-right now they look like a solid needle which casts a shadow on the ground  ??? not too realistic...
There isn't a way to turn off shadows for a certain object currently.  That is why you see that.
and it ends here.
Deus Siddis
Trained
Trained
Posts: 235
Joined: 18 Aug 2007, 06:58

Re: "Sun" entity

Post by Deus Siddis »

DevUrandom wrote: Seems you've got quite a bit of understanding of this. :)
Would be cool to welcome you onboard, maybe you want to do some coding or something else?
Well I'm afraid I don't know a lick of code. If I did (and could come to understand C) I'd mostly likely not be able to resist jumping in and upgrading what I thought needed to be improved the most, instead of just trying to blab others into doing it for me. ;D

I do however have some skills with Blender, so maybe I can help in the content department. On this subject, I noticed after importing the heavy vtol propulsions into blender that there are different variations for each heavy body. Does this mean the code already supports having a different propulsion model for each individual body (not just by body size category)? If so then I was thinking of making a different variation of each propulsion type to match each body, allowing for more variation in both individual vehicle styles and more graphical differences between each faction's technology.
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Re: "Sun" entity

Post by Kamaze »

The current projectiles are textures with an alpha channel.
For the effect you described, the code must be changed, that the projectile is always faced to the camera.
(atm they don't, afaik)

Maybe it would look quite good with some effects like self-illumination :)
We all have the same heaven, but not the same horizon.
Deus Siddis
Trained
Trained
Posts: 235
Joined: 18 Aug 2007, 06:58

Re: "Sun" entity

Post by Deus Siddis »

Kamaze wrote:For the effect you described, the code must be changed, that the projectile is always faced to the camera.
Which probably wouldn't be to hard to change as you should already have that code for the explosions, which appear to be polys that face the camera and have an animated texture depicting the expanding fireball.

But you can also use just two planes perpendicular to each other so that if you shot the beam almost directly into the camera you would see a cross shape '+' at the end of the beam like in this screenshot:

Image

What you would have to write new code for though is the spawning of the chain of textured polys between the beam weapon and the point where the beam hits something and terminates. It might also be a good idea to decide how long each poly segment should be. Too long and they will terminate shortly after they have gone through the target, which will look weird. Too short and demand on the gpu will get intense for longer beams and/or larger battles with beam weapons.

However if you were just going to use the 'column of light' effect only, then you wouldn't need to worry about any of this, in fact beam effects might be done using just one quad, the vertices starting at the beam weapon and ending wherever it hits something solid and no extra polys in between. The texture would also be very cheap, as it would only be 1 px in one of its dimensions, otherwise you would see some hideous texture stretching or squashing in that dimension amoung beams that hit targets at different distances.
Maybe it would look quite good with some effects like self-illumination :)
I'm not sure if that would have any effect if there is no lighting in the game so that textures are rendered at full brightness in all circumstances anyway (with the exception of the distance fog effect, which you might not want to bypass anyhow).
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: "Sun" entity

Post by Per »

Deus Siddis wrote: I'm not sure if that would have any effect if there is no lighting in the game so that textures are rendered at full brightness in all circumstances anyway (with the exception of the distance fog effect, which you might not want to bypass anyhow).
Just because it does not have real OpenGL lighting does not mean all textures are at full brightness. In fact, Warzone calculates four lighting values for each texture, and for terrain this depends on their normal vectors, just like OpenGL would have done it, but statically calculated before the game begins. These lighting values are also manipulated to add fog of war and other effects.
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."
Deus Siddis
Trained
Trained
Posts: 235
Joined: 18 Aug 2007, 06:58

Re: "Sun" entity

Post by Deus Siddis »

Per wrote: In fact, Warzone calculates four lighting values for each texture. . .
Would it be difficult to deactivate these calculations (with the exception of the fog of war effect) for weapon's fire?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: "Sun" entity

Post by Per »

Why would you want to do that?
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."
doom3r
Regular
Regular
Posts: 502
Joined: 29 Aug 2007, 15:04

Re: "Sun" entity

Post by doom3r »

I'm not sure if that would have any effect if there is no lighting in the game so that textures are rendered at full brightness in all circumstances anyway (with the exception of the distance fog effect, which you might not want to bypass anyhow).
That's exactly what I meant, we could add some kind of lighting in the game, so that we can also modify laser projectiles by using coloured lightened textures.
Deus Siddis
Trained
Trained
Posts: 235
Joined: 18 Aug 2007, 06:58

Re: "Sun" entity

Post by Deus Siddis »

Per wrote: Why would you want to do that?
So that tracers, lasers, super-heated dust trails, etc., appear to be glowing rather than just absorbing or reflecting world light. So if an artist creates a very bright (full value) texture for one of these weapons, wz's shading calculations don't make it look unnaturally dark for whatever reason. For example, the laser 'projectiles' in the latest stable build looked very dark for lasers to me (maybe they still do, haven't played the beta yet). Also, if weapons fire (with the possible exception of large missiles) did not caste shadows, that would be a visual improvement, imo.
gerard_
Trained
Trained
Posts: 71
Joined: 02 Nov 2006, 19:56

Re: "Sun" entity

Post by gerard_ »

Deus Siddis wrote: Also, if weapons fire (with the possible exception of large missiles) did not caste shadows, that would be a visual improvement, imo.
It was like that, and it looks really ugly.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: "Sun" entity

Post by Per »

You do not need real OpenGL lighting to experiment with nicer colour values for projectiles. We already manipulate texture colours to implement various effects.
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."