The new font function works great!!!! It looks just like the GDI version!
One question: to delete the font, it is still with oapiReleaseFont(), right?
One question: to delete the font, it is still with oapiReleaseFont(), right?
One question: to delete the font, it is still with oapiReleaseFont(), right?
void gcWorldMatrix(FMATRIX4 *mat, const VECTOR3 &pos, const VECTOR3 &x, const VECTOR3 &z, double scale)
{
VECTOR3 y = crossp(x, z);
mat->m11 = float(x.x * scale);
mat->m12 = float(x.y * scale);
mat->m13 = float(x.z * scale);
mat->m14 = 0.0f;
mat->m21 = float(y.x * scale);
mat->m22 = float(y.y * scale);
mat->m23 = float(y.z * scale);
mat->m24 = 0.0f;
mat->m31 = float(z.x * scale);
mat->m32 = float(z.y * scale);
mat->m33 = float(z.z * scale);
mat->m34 = 0.0f;
mat->m41 = float(pos.x);
mat->m42 = float(pos.y);
mat->m43 = float(pos.z);
mat->m44 = 1.0f;
}
Thanks!Yes, it's still released with oapiReleaseFont(). I'll add the missing helper function to the next version, but here's the code for it so you don't have to wait.
C:void gcWorldMatrix(FMATRIX4 *mat, const VECTOR3 &pos, const VECTOR3 &x, const VECTOR3 &z, double scale) { VECTOR3 y = crossp(x, z); mat->m11 = float(x.x * scale); mat->m12 = float(x.y * scale); mat->m13 = float(x.z * scale); mat->m14 = 0.0f; mat->m21 = float(y.x * scale); mat->m22 = float(y.y * scale); mat->m23 = float(y.z * scale); mat->m24 = 0.0f; mat->m31 = float(z.x * scale); mat->m32 = float(z.y * scale); mat->m33 = float(z.z * scale); mat->m34 = 0.0f; mat->m41 = float(pos.x); mat->m42 = float(pos.y); mat->m43 = float(pos.z); mat->m44 = 1.0f; }
Very interresting details. By raising mesh resolution from 32 to 64, with linear interpolation mod, wheels on a vessel seem less "cut" by terrain.
Terrain flattening only works if "Surface elevation, using" in the "Visual effects" tab is set to linear interpolation instead of cubic. Also flattening is not doing anything on its own, instead you have to author *.flt files in the planet's tree "Flat" layer to actually flatten certain areas.I have enabled the "terrain flattening" option but it does not change very much.
Have you tried to increase "MaxPatchResolution = 16" setting from the used "Moon.cfg" higher, let's say "19" ? Could you test that and report back ?
ClassName=GeneralVehicle
Module=GeneralVehicle
Empty_Mass = 1000 ;[kg] empty mass (almost unused)
Mesh = LER\LERWHEELS ; meshname
Cockpit_pos = -0.5 0.63 1.5 ; [m m m] Position of the cockpit camera
Acceleration = 1.15 ; [G] Acceleration factor expressed in Gs
Brake = 2 ; [G] Deceleration factor expressed in Gs
Max_Speed = 100 ; [km/h] Max Speed
Reverse_Max_Speed = 50 ; [km/h] Max Speed in Reverse
Steering_Speed = 1 ; Steering wheel velocity factor
Full_Pedal_Time = 2 ; [s] seconds from the beginning of pressing of Acceleration or Brake and the full power is applied
Max_Steering_Angle = 30 ; [DEG] Max steering of the front wheels per side
Height_From_Ground = 2.166 ; [m] height of the center of gravity from the ground
Always_Upright = FALSE ;if set to TRUE vehicle will always remain parallel to the ideal ground, without following terrain's inclinations
Four_Wheels_Steering = TRUE ;if true also rear wheels will steer
;Mesh Groups - just specify using space between them
Rear_Right_Groups = 6 2
Rear_Left_Groups = 11 3
Front_Right_Groups = 8 1
Front_Left_Groups = 9 4
Middle_Axles_N = 1
Middle_Groups_1 = 5 7 0 10
Camber = 0 ;[DEG] camber angle of the front wheels, no camber is implemented for rear wheels.
Listen_From = LERBODY
BEGIN_ATTACHMENT
C 0 0 0 0 1 0 0 0 1 BDY
END_ATTACHMENT
I have changed the value as you suggested but nothing changes.
I downloaded the Add-On and made some tests with it.
Which add-on have you downloaded ? Because there are 2 versions : the original one from Fred18 from GeneralVehicle addon available from Orbiter Hangar, and another one based on the previous model, which is indeed a bit buggy with slopes. I speak about the first one whose wheels are half-cut by hard slope terrain.
I noticed that when approaching a runway SW of EDW the terrain gets all messed up (walls and valleys, but the vehicle flies thru them) if "cubic interpolation" is used, and when switching to "linear interpolation" it looks ok... is this normal/expected?
(yes, I noticed the warning during loading ?)
(575: 30.6s 162.66ms)(0x304C) NewTileA[Moon]: Lvl=4, Scale=1, Offset=0
(576: 30.6s 00.35ms)(0x304C) TileCreatedFromFile: Level=4, ilat=8, ilng=18
(577: 30.7s 53.47ms)(0x304C) NewTileA[Moon]: Lvl=5, Scale=1, Offset=0
(578: 30.7s 00.34ms)(0x304C) TileCreatedFromFile: Level=5, ilat=15, ilng=36
(579: 30.9s 227.98ms)(0x304C) NewTileA[Moon]: Lvl=6, Scale=1, Offset=0
(580: 30.9s 00.36ms)(0x304C) TileCreatedFromFile: Level=6, ilat=31, ilng=72
(581: 31.0s 115.54ms)(0x304C) NewTileA[Moon]: Lvl=7, Scale=1, Offset=0
(582: 31.0s 00.34ms)(0x304C) TileCreatedFromFile: Level=7, ilat=63, ilng=144
(583: 31.1s 116.57ms)(0x304C) NewTileA[Moon]: Lvl=8, Scale=1, Offset=0
(584: 31.1s 00.33ms)(0x304C) TileCreatedFromFile: Level=8, ilat=126, ilng=289
(585: 31.2s 58.76ms)(0x304C) NewTileA[Moon]: Lvl=8, Scale=1, Offset=0
(586: 31.2s 00.33ms)(0x304C) TileCreatedFromFile: Level=8, ilat=127, ilng=289
(587: 33.9s 2668.30ms)(0x304C) NewTile[Moon]: Lvl=9, Scale=0.1, Offset=-2000
(588: 33.9s 00.36ms)(0x304C) TileCreatedFromFile: Level=9, ilat=254, ilng=578
(589: 34.2s 308.86ms)(0x304C) NewTile[Moon]: Lvl=9, Scale=0.1, Offset=-2000
(590: 34.2s 00.36ms)(0x304C) TileCreatedFromFile: Level=9, ilat=253, ilng=578
I can't see any anomalous terrain around Edwards with stock highres elevation tile set. So, I guess some add-on scenery would be required to reproduce the anomaly. You shouldn't see any walls.
What exactly are required to reproduce the issue ?
Could you change the "Debug Level" to "2" and locate following kind of data section from D3D9ClientLog (written in dark green/blue color)
Code:(575: 30.6s 162.66ms)(0x304C) NewTileA[Moon]: Lvl=4, Scale=1, Offset=0 (576: 30.6s 00.35ms)(0x304C) TileCreatedFromFile: Level=4, ilat=8, ilng=18 (577: 30.7s 53.47ms)(0x304C) NewTileA[Moon]: Lvl=5, Scale=1, Offset=0 (578: 30.7s 00.34ms)(0x304C) TileCreatedFromFile: Level=5, ilat=15, ilng=36 (579: 30.9s 227.98ms)(0x304C) NewTileA[Moon]: Lvl=6, Scale=1, Offset=0 (580: 30.9s 00.36ms)(0x304C) TileCreatedFromFile: Level=6, ilat=31, ilng=72 (581: 31.0s 115.54ms)(0x304C) NewTileA[Moon]: Lvl=7, Scale=1, Offset=0 (582: 31.0s 00.34ms)(0x304C) TileCreatedFromFile: Level=7, ilat=63, ilng=144 (583: 31.1s 116.57ms)(0x304C) NewTileA[Moon]: Lvl=8, Scale=1, Offset=0 (584: 31.1s 00.33ms)(0x304C) TileCreatedFromFile: Level=8, ilat=126, ilng=289 (585: 31.2s 58.76ms)(0x304C) NewTileA[Moon]: Lvl=8, Scale=1, Offset=0 (586: 31.2s 00.33ms)(0x304C) TileCreatedFromFile: Level=8, ilat=127, ilng=289 (587: 33.9s 2668.30ms)(0x304C) NewTile[Moon]: Lvl=9, Scale=0.1, Offset=-2000 (588: 33.9s 00.36ms)(0x304C) TileCreatedFromFile: Level=9, ilat=254, ilng=578 (589: 34.2s 308.86ms)(0x304C) NewTile[Moon]: Lvl=9, Scale=0.1, Offset=-2000 (590: 34.2s 00.36ms)(0x304C) TileCreatedFromFile: Level=9, ilat=253, ilng=578
(563: 48.2s 2613.51ms)(0x698) NewTileA[Earth]: Lvl=0, Scale=1, Offset=0
(564: 48.2s 02.56ms)(0x698) TileCreatedFromFile: Level=0, ilat=0, ilng=0
(565: 49.1s 829.15ms)(0x698) NewTileA[Earth]: Lvl=1, Scale=1, Offset=0
(566: 49.1s 00.93ms)(0x698) TileCreatedFromFile: Level=1, ilat=0, ilng=0
(567: 50.3s 1286.72ms)(0x698) NewTileA[Earth]: Lvl=2, Scale=1, Offset=0
(568: 50.3s 00.77ms)(0x698) TileCreatedFromFile: Level=2, ilat=1, ilng=1
(569: 51.7s 1315.90ms)(0x698) NewTileA[Earth]: Lvl=3, Scale=1, Offset=0
(570: 51.7s 00.74ms)(0x698) TileCreatedFromFile: Level=3, ilat=2, ilng=2
(571: 52.8s 1151.65ms)(0x698) NewTileA[Earth]: Lvl=4, Scale=1, Offset=0
(572: 52.8s 00.76ms)(0x698) TileCreatedFromFile: Level=4, ilat=4, ilng=5
(573: 53.2s 435.09ms)(0x698) NewTileA[Earth]: Lvl=4, Scale=1, Offset=0
(574: 53.2s 01.61ms)(0x698) TileCreatedFromFile: Level=4, ilat=5, ilng=5
(575: 53.9s 693.04ms)(0x698) NewTileA[Earth]: Lvl=5, Scale=1, Offset=0
(576: 53.9s 00.91ms)(0x698) TileCreatedFromFile: Level=5, ilat=9, ilng=10
(577: 54.7s 756.05ms)(0x698) NewTileA[Earth]: Lvl=5, Scale=1, Offset=0
(578: 54.7s 00.94ms)(0x698) TileCreatedFromFile: Level=5, ilat=9, ilng=11
(579: 55.3s 622.37ms)(0x698) NewTileA[Earth]: Lvl=6, Scale=1, Offset=0
(580: 55.3s 00.78ms)(0x698) TileCreatedFromFile: Level=6, ilat=19, ilng=21
(581: 56.0s 658.59ms)(0x698) NewTileA[Earth]: Lvl=6, Scale=1, Offset=0
(582: 56.0s 00.87ms)(0x698) TileCreatedFromFile: Level=6, ilat=19, ilng=22
(583: 57.1s 1074.29ms)(0x698) NewTileA[Earth]: Lvl=7, Scale=1, Offset=0
(584: 57.1s 06.07ms)(0x698) TileCreatedFromFile: Level=7, ilat=39, ilng=43
(585: 57.1s 72.13ms)(0x698) NewTileA[Earth]: Lvl=7, Scale=1, Offset=0
(586: 57.2s 44.61ms)(0x698) TileCreatedFromFile: Level=7, ilat=39, ilng=44
(587: 57.3s 166.44ms)(0x698) NewTile[Earth]: Lvl=8, Scale=1, Offset=0
(588: 57.4s 14.34ms)(0x698) TileCreatedFromFile: Level=8, ilat=78, ilng=88
(589: 57.6s 278.92ms)(0x698) NewTile[Earth]: Lvl=9, Scale=1, Offset=0
(590: 57.7s 19.52ms)(0x698) TileCreatedFromFile: Level=9, ilat=156, ilng=176
(591: 58.2s 519.86ms)(0x698) NewTile[Earth]: Lvl=10, Scale=1, Offset=694
(592: 58.2s 15.43ms)(0x698) TileCreatedFromFile: Level=10, ilat=312, ilng=353
(593: 58.3s 78.60ms)(0x698) NewTile[Earth]: Lvl=10, Scale=1, Offset=690
(594: 58.3s 07.06ms)(0x698) TileCreatedFromFile: Level=10, ilat=313, ilng=353
(595: 58.7s 386.76ms)(0x698) NewTile[Earth]: Lvl=11, Scale=1, Offset=694
(596: 58.7s 00.98ms)(0x698) TileCreatedFromFile: Level=11, ilat=625, ilng=707
(597: 58.9s 223.89ms)(0x698) TileInterpolatedFromParent: Level=12, ilat=1251, ilng=1414
(598: 59.0s 126.29ms)(0x698) NewTileA[Earth]: Lvl=7, Scale=1, Offset=0
(599: 59.0s 03.92ms)(0x698) TileCreatedFromFile: Level=7, ilat=38, ilng=44
(600: 61.3s 2235.18ms)(0x19A0) Surface 0xD360F78 (Cockpit\hud.dds) Converted to RenderTargetTexture (512,256)
(601: 61.3s 09.69ms)(0x19A0) Creating SubSurface for 0xD360F78
(602: 61.3s 00.28ms)(0x19A0) [ERROR] SurfHandle=0x9E3A8E0, Never use Sketchpad::GetDC() hDC not available
(603: 61.6s 334.92ms)(0x698) NewTile[Earth]: Lvl=11, Scale=1, Offset=694
(604: 61.6s 01.17ms)(0x698) TileCreatedFromFile: Level=11, ilat=625, ilng=706
(605: 65.7s 4066.71ms)(0x698) NewTile[Earth]: Lvl=11, Scale=1, Offset=693
(606: 65.7s 00.78ms)(0x698) TileCreatedFromFile: Level=11, ilat=626, ilng=707
(607: 71.9s 6269.10ms)(0x698) TileInterpolatedFromParent: Level=12, ilat=1252, ilng=1414
(608: 73.0s 1013.27ms)(0x698) NewTile[Earth]: Lvl=11, Scale=1, Offset=693
(609: 73.0s 01.46ms)(0x698) TileCreatedFromFile: Level=11, ilat=626, ilng=706
No special setup needed IMO... just take a DG and fly low and/or land at Edwards.
I have the Antelope valley addon from Martin, which should be "near" the official Orbiter download location.
That appears to fix it! No issues at EDW or anywhere else, thanks!Ok, Thanks. I can reproduce the issue with that one. Here's a new D3D9Client.dll could you check if the problem is fixed ?