Gremlin Graphics.
120 Center Line on to Runway
111 53.24967380 -004.52905004 1 101
112 53.24938951 -004.52935506 53.24931939 -004.52963229
111 53.24938951 -004.52935506
112 53.24938951 -004.52935506 53.24942883 -004.52907179 1 101
115 53.24925237 -004.52879055
I have been thinking of changing that code.
I often use a tool called UVMapper, which is very useful as you can load in an object and drag the UV coords around.
Do you want me to add that capability to the tool?
Color0 0.55 0.55 0.55 0.60
Color1 0.55 0.55 0.55 0.60
Eff3DActor.New(actor, null, rel, 1.0F, "3DO/Effects/Fireworks/WPSsmoke.eff", -1F);
and Vector3d vector3d = new Vector3d();
for(int j = 0; j < 36; j++)
{
vector3d.set(World.rnd().nextDouble(-20D, 20D), World.rnd().nextDouble(-20D, 20D), World.rnd().nextDouble(3D, 20D));
float f2 = World.rnd().nextFloat(3F, 15F);
BallisticProjectile ballisticprojectile = new BallisticProjectile(point3d, vector3d, f2);
Eff3DActor.New(ballisticprojectile, null, null, 1.0F, "3DO/Effects/Fireworks/WPSsmoke.eff", 12000L);
}
Can anyone give me a clue what units the various settings in an effect relate to?
Accelerations, velocities, emit rates, all that sort of thing.
How is the effects viewer progressing? you solved the smoke trail problem?
Material assigned to test model uses Phong shader with very high values for specular level (400, 999, waaay too much, I think?)
orientation of the model is vertical in viewports when imported
Also scale of the model is exported way too small, the model is minuscule, local scale shows 1 in all axes when should be 100
Within the MSH file we have mesh parts. Mostly these are the main mesh, and any overlays. These use the same vertex pool through out, but use different index lists and UV pools. I have tried to re-create this in the FBX file, and failed by the look of it.
It can be edited though inside 3dsMax, but seems like this last material and the ID assignaments for elements are missing during the exporting?
[WARNING] Invalid UV index table(s) - One or more objects define the UV mapping by POLYGON_VERTEX but the index table
has less entries than the actual number of polygon vertices. The missing entries
have been assigned an arbitrary value. Depending on the affected vertices, the resulting
mapping may be corrupted. CF_D0
That invalid index table may be the culprit for some of the above, probably.
Anyway, hope it helps.
Stainless:
I noticed the runways crossing; is there flickering like we get when we place runway plates over each other in Il2? Would there be some way to make a runway plate be moved up or down? So, in one case you could have PSP crossing over a dirt runway and another time have the PSP under the dirt runway (a terrible example but all I could come up this early in the morning!).
Stainless hi!
I'm trying to run the effect editor. I downloaded and installed it but when I try to run it it crashes.
(I have no problem with the Il2, running with WinXP SP3)
I think I am going to have to junk this line of thought and use IL2 maps.
XNA 4 is now installed but the effects editor keeps crashing when I try to load it.
playerLocation = new Location(MathHelper.ToRadians(1.2243f), MathHelper.ToRadians(50.223f), 20997036);
Remember this will be faded in by sidereal time, so during the day it will be invisible. In the middle of the night it will be brighter, but modified by the atmosphere.
At the moment I have to sort out the crap atmospheric model then I can publish it and give you some java code to use the simulated engine.
Admittedly, it's early days yet, but please consider more accurate damage models for aircraft.
Admittedly, it's early days yet, but please consider more accurate damage models for aircraft.
not only that, amunition as such is rather simplified - generally, every bullet acts exactly the same. Thus there is no AP or HE round. That would be nice to see.
I have started collating large amounts of data on air force strengths, in the sort of detail I need. So not just they had X aircraft of type Y.
struct Deployment
{
uint Airfield;
uint Start;
uint End;
uint Aircraft;
uint Servicable;
uint Damaged;
uint Pilots;
uint Injured;
};
I just need to create hundreds of game components now...... o_O
I'm trying to avoid "percentage chances".
So in the case you mentioned about flares, I would model how the seeker head is designed to work and let the physics define what happens rather than random numbers.
I have had a full day to work on the game. I know. Miracle or what!Happens to me from time to time.
Some of you may be wondering why I am working on esoteric's like the avionics.It is very good.
The problem is that you can get ideal on all three variables and still get out. You might not even make contact with the ball. This is because they have a skill system and the shot resolution takes bowler skill, batter skill, player input and a random number and combines them into a result. However they used really crap coding. So batting is crap. User input is secondary to randomness.
I also don't know how the target altitude is displayed, which I am pretty sure must be.
I will say there's few things in favor of FG's scenery, that there's no other sim, WWI era or otherwise, that has captured the look of the Somme Valley. Most sims make the river as a snaking strip of water.
Do they really paint the grass?
Should the gantries that hold the approach lights go up with the glide slope?
Both of those are easy to export, though both will have duplicate geometry for objects.
No mesh instancing
OBJECT_SHARED lines
Adds shared objects to the tile.
Example:
OBJECT_SHARED Models/Airport/tower.xml -122.501090 37.514830 15.5 0.00
Syntax:
OBJECT_SHARED <object-path> <longitude> <latitude> <elevation-m> <heading-deg> <pitch-deg> <roll-deg>
<object-path> is relative to the data directory (FG_ROOT).
<longitude> and <latitude> are in degrees using WGS-84 standard coordinate systems, available from most online-maps.
<elevation-m> is in meter and relative to mean sea-level (in the fgfs world).
<heading-deg> is in degree, counter-clockwise with North being 0.0.
<pitch-deg> and <roll-deg> are in degree and optional.
There is definitely something seriously whack about this data
/// <summary>
/// Returns a new Vector2D which is the distance from the reference point in metres
/// IE. Makes the data point local to the reference point
/// </summary>
/// <param name="clat">Reference point latitude</param>
/// <param name="clon">Reference point longitude</param>
/// <param name="slat">Data point latitude</param>
/// <param name="slon">Data point longitude</param>
/// <returns></returns>
public static Vector2D ConvertToLocalised(double clat, double clon, double slat, double slon)
{
double m_per_deg_lat, m_per_deg_lon, deltaLat, deltaLon;
m_per_deg_lat = 111132.954 - 559.822 * Math.Cos(MathHelper.ToRadians((float)(2.0 * clat)) + 1.175 * Math.Cos(MathHelper.ToRadians((float)(4.0 * clat))));
m_per_deg_lon = (3.14159265359 / 180) * 6367449 * Math.Cos(MathHelper.ToRadians((float)clat));
deltaLat = clat - slat;
deltaLon = slon - clon;
return new Vector2D(deltaLon * m_per_deg_lon, deltaLat * m_per_deg_lat);
}
I have decided that I am going to have to write an editor for airports, which will allow you to fix problems like this.
;)
So I have started the terrain module I have been putting off for ages.
I have already got a value for runway roughness in the database. ;D
So I wrote a parser and converted the data into several useful formats.... which is where things went horribly wrong.
Yes, the apt.dat file gives me 34000 airports we can work with without major work, so it was a no brainer really.
What sort of custom fields would you like?
There is a program on the history channel that has used stereographic photography from WWII to create 3D recreations, so I guess it would be possible.
The whole thing will be free, along with the tool chain.
At the moment it is possible to import meshes (aircraft, vehicles, buildings) from Il2.
When I get to missions I will see if I can have an option to import missions from IL2 as well.
Terrain is the big problem. It is taking me a long time to come up with a good solution as IL2 uses a system that is not very generic. I will come up with something though
Tanks definitely would just be aircraft without aerodynamic components. So the turrets and tracks would be animated. Turrets can be swapped. Paint schemes swapped.
The whole thing will be free, along with the tool chain.
At the moment it is possible to import meshes (aircraft, vehicles, buildings) from Il2.
When I get to missions I will see if I can have an option to import missions from IL2 as well.
Terrain is the big problem. It is taking me a long time to come up with a good solution as IL2 uses a system that is not very generic. I will come up with something though
Thanks for the explanation!Tanks definitely would just be aircraft without aerodynamic components. So the turrets and tracks would be animated. Turrets can be swapped. Paint schemes swapped.
I assume that this also applies to ships and other potentially "flyable" vehicles.
All quite messy, I'm afraid - especially the shader code :-[
float4x4 WorldInverseTranspose;
float4x3 WorldInverseTranspose;
Spot the horrible bug that ruined all my lighting systems....Code: [Select]float4x4 WorldInverseTranspose;
No? Me neither for about 8 hours.
Correct code.Code: [Select]float4x3 WorldInverseTranspose;
Does anyone know the spacing for a standard German formation?
Don't know how much time I will get to work on it today, but I think we need a formation designer and some fuzzy logic.
Then the formation can be fed into the AI for the bomber pilot and control inputs generated.
Formation name | String | The name of the formation |
Usage dates | Date,Date | The timespan the formation was in use |
Element type | Enum | Either Aircraft, Wing, or Formation |
Number of elements | Int | The designed number of elements ( not the actual number ) |
Element names | String Array | The name of each element. Red 1, 1st flight, Able box, etc. |
Element location | Vector3 Array | The relative position of each element in metres from a key location. Probably should be lead element. |
Night modifier | Vector3 | For night flying, multiply the relative location by this |
Poor visibility modifier | Vector3 | For poor visibility, multiply the relative location by this |
Bomber Element
1/1/1940 1/1/1945
Aircraft
3
Lead,Port,Starboard
{0,0,0},{-30,-5,-30},{30,-5,-30}
3
2
Combat box
1/1/1940,1/1/1945
Wing
4
Lead Element, High Element, Low Element, Low Low Element
{0,0,0},{-50,50,-50},{50,-50,-50},{0,-100,-100}
2
2
Javelin
1/1/1940,1/1/1945
Formation
4
Lead,Group 2,Group 3,Group 4
{0,0,0},{0,2000,100},{0,4000,200},{0,6000,300}
1
1
Interesting progress, thanks for keeping us updated.
I guess very few people can imagine the dimension of your project.
You definitely have my greatest respect.
]cheers[
Mike
You can now set the aircraft and squadron code as well as get the correct roundel for a time period.
Haven't decided how to handle night fighters and navy yet...
Collision meshes in.
They animate correctly, but interestingly it looks like the tail wheel and the flaps don;'t have collision meshes.
Again, not your fault, but it offends my senses of graphic design, historical accuracy, and fair play.
I think I will add to the modtool an option to generate a collision mesh for a mesh part, tail wheels are really important for the physics. Without it every landing will damage the tail of the aircraft.
I’ve never heard of that. That sounds like a phenomenal idea. Mind If I use it for my own purposes?
I have had a week of dealing with muppets.
Given all the BS you've had to deal with, it seems simpler, faster, cheaper, and easier for everyone, to ship a carefully-packed portable hard via overnight courier.
Wrote my own deep ocean shader.... looks ok...
"Always look on the bright side of life ...."
The main problem is the lack of sufficient parallax with the sun glare on water effect which spoils the illusion of distance and depth of field. That and the fact that the width of the glare pattern is based on the width of sun's core + corona rather than just the core. You only get the broader core + corona glare pattern when the sun has gone low enough that you get a greater level of diffusion from the atmosphere (and/or haze/dust/smoke/whatever, if you plan to model it).
When the sun is below the horizon you shouldn't get diffuse lighting.
#include "ShaderVariables.inc"
struct appdata {
float3 Position : POSITION;
float4 Normal : NORMAL;
float2 UV0 : TEXCOORD0;
half4 Tangent : TANGENT0;
half4 Binormal : BINORMAL0;
};
struct vertexOutput {
float4 HPosition : POSITION;
float3 WorldLightVec : TEXCOORD0;
float3 WorldNormal : TEXCOORD1;
float3 WorldEyeDirection : TEXCOORD2;
half3 WorldTangent : TEXCOORD3;
half3 WorldBinorm : TEXCOORD4;
float2 UV : TEXCOORD5;
half Fog : TEXCOORD6;
half2 Altitudes : TEXCOORD7;
};
float4 LightDirection = {100.0f, 100.0f, 100.0f, 1.0f};
float4 LightColor = {1.0f, 1.0f, 1.0f, 1.0f};
float4 LightColorAmbient = {0.0f, 0.0f, 0.0f, 1.0f};
float4 FogColor = {1.0f, 1.0f, 1.0f, 1.0f};
float fDensity ;
bool isSkydome;
float SunLightness = 0.2;
float sunRadiusAttenuation = 256;
float largeSunLightness = 0.2;
float largeSunRadiusAttenuation = 3;
float dayToSunsetSharpness = 1.5;
float hazeTopAltitude = 20;
texture DiffuseTexture;
sampler SurfSamplerDiffuse = sampler_state
{
Texture = <DiffuseTexture>;
MinFilter = Linear;
MipFilter = Linear;
MagFilter = Linear;
};
texture SkyTextureNight;
sampler SurfSamplerSkyTextureNight = sampler_state
{
Texture = <SkyTextureNight>;
MinFilter = Linear;
MipFilter = Linear;
MagFilter = Linear;
AddressU = mirror;
AddressV = mirror;
};
texture SkyTextureSunset;
sampler SurfSamplerSkyTextureSunset = sampler_state
{
Texture = <SkyTextureSunset>;
MinFilter = Linear;
MipFilter = Linear;
MagFilter = Linear;
AddressU = mirror;
AddressV = mirror;
};
texture SkyTextureDay;
sampler SurfSamplerSkyTextureDay = sampler_state
{
Texture = <SkyTextureDay>;
MinFilter = Linear;
MipFilter = Linear;
MagFilter = Linear;
AddressU = mirror;
AddressV = mirror;
};
vertexOutput mainVS (appdata IN)
{
vertexOutput OUT;
float4 Po = float4(IN.Position.xyz,1);
OUT.HPosition = mul( Po, WorldViewProjection);
OUT.WorldNormal = mul( IN.Normal, WorldInverseTranspose).xyz;
OUT.WorldTangent = mul(IN.Tangent, WorldInverseTranspose).xyz;
OUT.WorldBinorm = mul(IN.Binormal, WorldInverseTranspose).xyz;
OUT.WorldLightVec = -LightDirection.xyz;
float3 Pw = mul( Po, World).xyz;
OUT.WorldEyeDirection = ViewInverse[3].xyz - Pw;
OUT.Altitudes.x = ViewInverse[3].y;
float4 pos = mul( IN.Position, World);
float dist = length(OUT.WorldEyeDirection);
OUT.Fog = (1.f/exp(pow(dist * fDensity, 2)));
OUT.Altitudes.y = Pw.y;
OUT.UV = IN.UV0;
return OUT;
}
float4 mainPS(vertexOutput IN) : COLOR0
{
float4 colorOutput = float4(0,0,0,1);
float4 DiffuseColor = tex2D( SurfSamplerDiffuse, float2( IN.UV.x, 1-IN.UV.y));
float4 colorAmbient = DiffuseColor;
// Calculate light/eye/normal vectors
float eyeAlt = IN.Altitudes.x;
float3 eyeVec = normalize(IN.WorldEyeDirection);
float3 normal = normalize(IN.WorldNormal);
float3 lightVec = normalize(IN.WorldLightVec);
// Calculate the amount of direct light
float NdotL = max( dot( normal, -lightVec), 0);
float4 colorDiffuse = DiffuseColor * (NdotL * LightColor) + LightColorAmbient * DiffuseColor;
colorOutput += colorDiffuse;
colorOutput.a = 1.0f;
// Calculate sun highlight...
float sunHighlight = pow(max(0, dot(lightVec, -eyeVec)), sunRadiusAttenuation) * SunLightness;
// Calculate a wider sun highlight
float largeSunHighlight = pow(max(0, dot(lightVec, -eyeVec)), largeSunRadiusAttenuation) * largeSunLightness;
// Calculate 2D angle between pixel to eye and sun to eye
float3 flatLightVec = normalize(float3(lightVec.x, 0, lightVec.z));
float3 flatEyeVec = normalize(float3(eyeVec.x, 0, eyeVec.z));
float diff = dot(flatLightVec, -flatEyeVec);
// Based on camera altitude, the haze will look different and will be lower on the horizon.
// This is simulated by raising YAngle to a certain power based on the difference between the
// haze top and camera altitude.
// This modification of the angle will show more blue sky above the haze with a sharper separation.
// Lerp between 0.25 and 1.25
float val = lerp(0.25, 1.25, min(1, hazeTopAltitude / max(0.0001, eyeAlt)));
// Apply the power to sharpen the edge between haze and blue sky
float YAngle = pow(max(0, -eyeVec.y), val);
// Fetch the 3 colors we need based on YAngle and angle from eye vector to the sun
float4 fogColorDay = tex2D( SurfSamplerSkyTextureDay, float2( 1 - (diff + 1) * 0.5, 1-YAngle));
float4 fogColorSunset = tex2D( SurfSamplerSkyTextureSunset, float2( 1 - (diff + 1) * 0.5, 1-YAngle));
float4 fogColorNight = tex2D( SurfSamplerSkyTextureNight, float2( 1 - (diff + 1) * 0.5, 1-YAngle));
float4 fogColor;
// If the light is above the horizon, then interpolate between day and sunset
// Otherwise between sunset and night
if (lightVec.y > 0)
{
// Transition is sharpened with dayToSunsetSharpness to make a more realistic cut
// between day and sunset instead of a linear transition
fogColor = lerp(fogColorDay, fogColorSunset, min(1, pow(abs(1 - lightVec.y), dayToSunsetSharpness)));
}
else
{
// Slightly different scheme for sunset/night.
fogColor = lerp(fogColorSunset, fogColorNight, min(1, -lightVec.y * 4));
}
// Add sun highlights
fogColor += sunHighlight + largeSunHighlight;
// Apply fog on output color
colorOutput = lerp(fogColor, colorOutput, IN.Fog);
// Make sun brighter for the skybox...
//if (isSkydome)
colorOutput = fogColor + sunHighlight;
return colorOutput;
}
technique SkyDome
{
pass p0
{
CullMode = None;
VertexShader = compile VS_SHADERMODEL mainVS();
PixelShader = compile PS_SHADERMODEL mainPS();
}
}
I calculate the scattering in my shader.
Here it is if it is useful
public static Vector3 GetSunDirection(DateTime when)
{
//1. Days elapsed since J2000 (1st january 2000 at 12:00)
DateTime epoch = new DateTime(2000, 1, 1, 12, 0, 0);
TimeSpan j2000TS = when.ToUniversalTime() - epoch;
double j2000 = j2000TS.TotalDays;
//2. Centuries since J2000
double cJ2000 = j2000 / 36525.0f;
double inclinationE = (0.00005f - 46.94f * cJ2000 / 3600.0f) * rad;
double longNodeE = (-11.26064f - 18228.25f * cJ2000 / 3600.0f) *rad;
double longPeriE = (102.94719f + 1198.28f * cJ2000 / 3600.0f) * rad;
double meanDistE = 1.00000011f - 0.00000005f * cJ2000;
double eccenctricityE = 0.01671022f - 0.00003804f * cJ2000;
double meanLongE = Mod2Pi((100.46435f + 129597740.63f * cJ2000 / 3600.0f) * rad);
//Position of Earth in its orbit
double me = Mod2Pi(meanLongE - longPeriE);
double ve = TrueAnomaly(me, eccenctricityE);
double pEarthOrbit = meanDistE * (1 - eccenctricityE * eccenctricityE) / (1 + eccenctricityE * Math.Cos(ve));
//Heliocentric rectangular coordinates of Earth
double xe = pEarthOrbit * Math.Cos(ve + longPeriE);
double ye = pEarthOrbit * Math.Sin(ve + longPeriE);
double ze = 0.0f;
return new Vector3((float)xe, (float) ze, (float)ye);
}
The only solution I can see is to render the moon to a texture then draw a quad in the main game scene at the correct point in the sky. One step forward....
Anybody else noticed wobbly props on the He111?
I also render with a colour which is currently white, when I figure out how to calculate partial lunar eclipses I can modify this colour to give us blood moons.
Would a catalogue of eclipses do? Because NASA has one online for eclipses both solar and lunar for 2000BC to 3000AD
5000 years.
Shit .
What sort of flight simulator do you think I am building ;)
5000 years.
Shit .
What sort of flight simulator do you think I am building ;)
I have the code for the planets
I know I need to add Venus, it is so visible. However I am not sure which others I have to add.
I know I need to add Venus, it is so visible. However I am not sure which others I have to add.
However this is very crude. I would like a way of computing the correct luminance so I can turn them on and off properly.
That is mind-blown progress! I have serious respect for huge projects you have been working on for a vastly long time. I have been watching your progress here. I have a question. I am sincerely hoping that we will be able to get to command any ships like game called War Thunder or World of Warships? I am confident that many of us would love to be able to command any warships and submarines, along with the add-on mods.
Each weapon can have multiple fields of fire so we can make sure you don't shoot off the tail of your aircraft or put holes in the funnel of your pristine war ship.
That is truly a great idea! With that, we can even have both historical and alternative historical "what if" with the secret project aircraft from Germany, USA, UK, Soviet, Japan, and other countries flying as realistic as possible.
I am working on that, at the moment I am using the steepness of the surface normal, which is just wrong.
I need to work out the derivative of the surface normal, so where the normal rapidly changes direction is where the foam will form.
Of course this need to be at the top of the wave, so I need to use the sign of the derivative as well.
float foam = 0;
if (delta_normal > constant1)
{
float dw = dot(worldspacenormal,winddirection);
if ((dw > 0)&&(dw > constant2))
{
foam = dw;
}
}
Hmmm .... would this be useful for IL2?
Like many, I have watched this since you began. It is an incredible technical effort and to start to see elements coming together in such manner is very impressive Stainless. Not that you need me to tell you that! :)
The friction is not enough to stop the plane ????
Red | Ambient occlusion value |
Green | Roughness value |
Blue | Reflectance value |
Alpha | Emission value |
This brought me back to airports. So I noticed I had some airports from FSX and decoded the data files used and started my own importer.
I have got to the stage where I really need at least one good looking scene so I can finalise a lot of the renderer and an airport is the perfect stress test.
I added vegetation to the airport, and I am not happy with the result. It is obvious to me I am going to have to replace all the vegetation meshes with something much better.
public class RunwayTaxiwayPath
{
public String Type;
public int Start;
public int End;
public float Width;
public float WeightLimit;
public bool DrawSurface;
public bool DrawDetail;
public String Surface;
public String Name;
public bool CenterLine;
public bool CenterLineLighted;
The taxiways are really confusing me.
Do you think the effect is too extreme?
The tracer rounds look like big red baseballs floating through the air.
Also added red out and black out due to high G over time, still need to work out tunnel vision
shader.Parameters["parameter_name"].SetValue(parameter_value);
Not sure how they used at as an anti-aircraft gun, but history says they did.
But if you are whizzing past at 550 knots with your arse on fire you are not going to see any of this.
The real value of what you're doing is "making the tools to make the tools." Provide the mechanisms which eventually allow fans to easily "fill in the gaps" and trust that others will build on your framework.
Practically, that means making it easy to add little features to the game rather than adding them yourself.
hopefully something will come of it
My design is for solid bones connected by rigid joints to hold all the aircraft parts in place. So when the aircraft gets destroyed you can just break the joint at the correct place and the aircraft falls apart as you would expect.
I have talked to other people and they say it's impossible. The structure of the 109 means the wings would come off in that situation, not fold up.
So I have finally figured out how the taxiways work in FSX
Some big news this week.
As part of my day job, the chance came up to pitch this game to publishers, big publishers. The sort of people who can throw me a few million to get it off the ground.
And they are interested.
Will see what happens.
Some big news this week.
As part of my day job, the chance came up to pitch this game to publishers, big publishers. The sort of people who can throw me a few million to get it off the ground.
And they are interested.
Will see what happens.
As part of my day job, the chance came up to pitch this game to publishers, big publishers. The sort of people who can throw me a few million to get it off the ground.
And they are interested.
Some big news this week.
As part of my day job, the chance came up to pitch this game to publishers, big publishers. The sort of people who can throw me a few million to get it off the ground.
And they are interested.
Will see what happens.
So the news is that the pitch is nowin with 10 publishers.
No idea how it will go, but everyone is very positive that it will be funded.
I can't post anything at the moment, but I can tell you I have a fully functioning flight dynamics model in UE5 and I am currently working on some AI to demo it.
Well let you know how it goes.
Keep your eyes open for "Pilots Of New Anarchy"
This is Unreal Engine 5.3, free to download and use.
The whole project will eventually be available online, so you could install Unreal, download the game, and mod it yourself.