Ogre Tech Demo

For topics that do not fit in another sub-forum.

Moderator: Oberlus

Message
Author
User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12799
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Ogre Tech Demo

#46 Post by Geoff the Medio »

pd wrote:Such pulsing or flashing effects would surely look nice. I think it's quite inefficient though to do this with traditional frame based animation, considering those planet textures are quite large (1024x512 or more). I figure it would be better to come of with a shader solution, maybe using some of the glow effects, that Zach has added lately.
You don't need to make a full-sized texture to add highlights and details. Consider the bullet holes on a wall in an FPS game... They don't have a separate wall texture with holes in every possible combination of positions. Rather, there is a smaller hole decal that's positioned in the location that's shot and rendered over top the main texture. Similarly, FO could have a few small flash textures or series of texture frames that are randomly positioned over the planet surface at random times.

User avatar
shrinkshooter
Space Kraken
Posts: 198
Joined: Fri Feb 22, 2008 8:40 pm
Location: Teh Intarwebz

Re: Ogre Tech Demo

#47 Post by shrinkshooter »

Geoff the Medio wrote:You don't need to make a full-sized texture to add highlights and details. Consider the bullet holes on a wall in an FPS game... They don't have a separate wall texture with holes in every possible combination of positions. Rather, there is a smaller hole decal that's positioned in the location that's shot and rendered over top the main texture. Similarly, FO could have a few small flash textures or series of texture frames that are randomly positioned over the planet surface at random times.
This is exactly what I thought of as soon as I read pd's doubts about the textures. I'm glad we were thinking along the same lines. I'm not certain about how to do this myself, but I know what is required to be done. Not sure about the sizes of these flashes or pulses though.
Photobucket account for FreeOrion and List of Techs and Icons

[[[===LEAN, MEAN, PURPLE AND GREEN MACHINE===]]]

User avatar
MikkoM
Space Dragon
Posts: 318
Joined: Fri Mar 10, 2006 12:32 pm
Location: Finland

Re: Ogre Tech Demo

#48 Post by MikkoM »

I have only one thing to say about these new screenshots. They look awesome! Can`t wait to see more. :D

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

Re: Ogre Tech Demo

#49 Post by pd »

I've finally started with working on the high resolution planet textures. No photo elements have been used, it's painted from scratch. Below is a terran planet and I'm aiming for 2048x1024, which means I'm actually painting at 4096x2048. It's still quite sketchy, but you get the idea. Here is a screenshot showing a planet about as close as you are going to get(I guess). Clouds have been removed for testing purposes. We are going to use higher resolution sphere meshes in future, so the highlight and edges will be smoother soon as well.

Image

Here are some crops to compare different resolutions. The bottom resolution is what has been used in the sreenshots posted previously.

Image

Here is also a link to the painted texture in original resolution(1.3MB .jpg): Terran01Day.jpg. If you can produce something like this, contact me.

I'm not sure, but if everything keeps running smoothly, we might even use the textures in 4096x2048.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12799
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Ogre Tech Demo

#50 Post by Geoff the Medio »

pd wrote:...a planet about as close as you are going to get(I guess).
You might want to get a thread going about what the in-battle UI and relative size of the system, planets and ships will be. We might not have need to show planets that size in game in practice. (Though having the option to zoom in a bit could be useful even if we don't use it during most battles...)

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Ogre Tech Demo

#51 Post by eleazar »

Geoff the Medio wrote:
pd wrote:...a planet about as close as you are going to get(I guess).
You might want to get a thread going about what the in-battle UI and relative size of the system, planets and ships will be. We might not have need to show planets that size in game in practice. (Though having the option to zoom in a bit could be useful even if we don't use it during most battles...)
I can't image any reason to get that close in battle. It never hurts to have high res textures available, but if you are doing anything useful in battle you'll need to see at least two objects at once. For a solar-system wide battle, we'll need to have ships which are roughly comparable in size to planets, not tiny dots.

There absolutely no way to make the scale even roughly realistic, so we might as well go to the opposite extreme and make it convenient.


P.S. In earth-like worlds, Rivers flow from the mountains to the sea, not from one coast of a continent through the higher land, and out the other side.

M4lV
Space Squid
Posts: 89
Joined: Sat May 10, 2008 10:51 am

Re: Ogre Tech Demo

#52 Post by M4lV »

One possible need for getting that closely by would be when landing on a planet is an option to avoid further combat for that respective ship. That means if I can manage to get my ship that closely towards the planet it will disappear and is safe for the moment. Or for colony ships it could mean that a colonization order given the same turn an enemy ship arrives and intercepts the colony ship is successful or not. It's then more like an "evasion race" than a combat. Or it's about orbital batteries and yards having low orbit and firing at enemy ships. You then would need to get close-by to eliminate them resulting in the need for high-resolution planet textures.

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

Re: Ogre Tech Demo

#53 Post by pd »

Geoff the Medio wrote:You might want to get a thread going about what the in-battle UI and relative size of the system, planets and ships will be. We might not have need to show planets that size in game in practice. (Though having the option to zoom in a bit could be useful even if we don't use it during most battles...)
Done: relative sizes

Obviously the above example is an extreme case, but I'd rather have the textures still hold up in extreme cases than having blurring, which robs immersion and looks cheap.
eleazar wrote:There absolutely no way to make the scale even roughly realistic, so we might as well go to the opposite extreme and make it convenient.
In case convenient means planets are not eaqually sized as ships, I agree.
eleazar also wrote:In earth-like worlds, Rivers flow from the mountains to the sea, not from one coast of a continent through the higher land, and out the other side.
Actually, even on a texture size like this, one is hardly able to see rivers(compared to a similar sized earth "texture"). But that's an realism argument, just as yours is one. Some of those rivers might be huge continental cracks. Whatever they are supposed to be, they've been put there for artistic reasons - providing focus points and contrast. Thanks for the pointer, though - I'll keep it in mind.

M4lV
Space Squid
Posts: 89
Joined: Sat May 10, 2008 10:51 am

Re: Ogre Tech Demo

#54 Post by M4lV »

tzlaine wrote:- Assumption: Ships can pass through each other. That's right! I said it! Ships are not solid wen it comes to other ships. This is done because its much easier to implement than doing collision detection and pathfinding to move around potential collisions. All the ships will be in the plane of the system's ecliptic. This means that we're not using that third dimension for anything, so it's reasonable to say "They could fly past each other at different heights, so let's pretend they are." Actually implementing this passing-each-other business is a lot harder than you might think, so let's KISS and fake it (so to speak).
k, I understand it's less work but maybe there's a really easy and fast way to implement collision detection by the ellipsoid equation that I mentioned with our 3D engine for the botf sequel games:
[email protected]://www.star-trek-games.com/forum/index.php?f=9&p=46342&view=viewtopic#p46342 wrote:
Malvoisin wrote:Original ellipsoid formula: http://en.wikipedia.org/wiki/Ellipsoid

a,b and c are half the length of the mesh in each direction, i.e. the radii. x,y and z are the 3d coordinates of a point out of your enemy vessel's mesh minus the 3d coordinate of the central point of your vessel's mesh that you need for creating the ellipsoid and center it right,
When summing up the equation and a value less than 1 comes out, you're within the ellipsoid.

The easiest solution to detect the point of collision now comes from the two-balls case. When the vector connecting both central points of the balls (which are centered around their respective 3d model) has smaller length than both model's radii summed up, then these two ships are hitting each other.

In the ellipsoid case that works on a similar ground. Take the distance vector again and check each dimension's entry with the ellipsoid radii (both summed up again). If that vector is smaller in each dimension, they intersect, otherwise they don't.

By subtracting both vectors you'll even get a usable "damage" vector of the collision both for the direction of the "reflection" of both ships off each other and the amount of damage done to the ships. Has that helped?
Yep it helped, ironically for some reason i thought the orignaly xyz/abc method wouldn't work but afterwards as you pointed out it easily does lol.

The first rough/alpha/needs improvement pass is done. Though for some reason rotation if the collision ellipsoid is working when it should lol.

At the moment it is a crude imitation of the battlestations collision response in that it just offsets each ship in ther vertical axis by a certain velocity.

I'll look to cleaning some other aspects up and releasing a more up to date demo, though not much has changed.

Regards Wolfe
The video is here: http://www.megaupload.com/?d=KMGNL4D9

This was done in less than a couple of days so I think it might be worth trying it since it's very basic and the outcome is quite impressive I think..

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: Ogre Tech Demo

#55 Post by tzlaine »

Isn't your BOTF sequel done in 3D? The original was. Our combat is going to be done in a plane. To me, that difference is crucial. The third dimension is abstracted out. If we only allow ships/fighters to move in the z-dimension when they pass by each other, it begs the question, "Why can't they always move in the z-dimension?" Since we don't want that, I don't see any advantage to adding it only in a degenerate case.

M4lV
Space Squid
Posts: 89
Joined: Sat May 10, 2008 10:51 am

Re: Ogre Tech Demo

#56 Post by M4lV »

you're right. we're moving in full 3D (the original had a "two and a half"-d plane (bounded z value) just like yours). you could let them move in x and y direction around the enemies vessel (just set z=0 in the evasion vector you give the ship). It does not need to fly "over" the enemy ship, it can always side-way it ;).

It's just that it might look weird for gamers if they intersect but of course, other details are much more important than this. Just thinking that in the 2d plane case the whole ellipsoid thing gets even easier cause it's just about circles now.
Last edited by M4lV on Fri Jun 06, 2008 6:04 pm, edited 1 time in total.

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

Re: Ogre Tech Demo

#57 Post by pd »

I wouldn't mind if there is collision detection, but I understand, if Zach thinks, it's too much work. But I think, with ships being allowed to cross each other, it's essential to avoid having them cluster at a single point. Imagine having a fleet of 10 ships and sending them all to a certain location. You want to avoid that all ships end up at exactly the same point, so some form of relative positioning is needed IMO.

M4lV
Space Squid
Posts: 89
Joined: Sat May 10, 2008 10:51 am

Re: Ogre Tech Demo

#58 Post by M4lV »

the only problem in 2D plane with my method is that if enough ships (>100) are in tight formation, a strange cascade of evasion maneuvres are likely to occur ripping apart the whole formation. That's why real 3D (maybe with bounded interval for z?) is better there.

pd's case with multiple ships at once single location can be prevented however when adding a phase at the end of a combat turn where entangled ships are entwined radically.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: Ogre Tech Demo

#59 Post by tzlaine »

As with many things that I try to elide to make things easier, collision detection/avoidance may get added back in later. The idea is to write the least code that will work,and then write some more code if the first code didn't quite work. You can apply this principle to any statement I make about how "I'm not going to do that, so there!"

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Ogre Tech Demo

#60 Post by eleazar »

tzlaine wrote:The idea is to write the least code that will work,and then write some more code if the first code didn't quite work.
Exactly as it should be.

tzlaine wrote:- Assumption: No one needs to see the seedy underbelly of their fleet....(I might be willing to relax this and let you look under the ecliptic, down to ~15 degrees below or so.)
I agree. Though it's natural to want to look all around, having this kind of limitation on camera movement should make playing easier and thus more fun.


* We should probably put fighters on a level slightly above the "normal" ships for visibilities sake.

* Couldn't the "Boids" behaviors be use to keep ships from clumping and intersecting? It doesn't bother me nearly so much that ships can pass through each other as that an indefinite number of ships could move to the same point, and all be perfectly invisible inside the largest ship.

* Don't we need some sort of collision detection to find out which ships are hit?

Post Reply