The FFED3DAJ Thread

Incidentally, while I'm here, I've compiled a list of bugs/issues with FFED3D that I've noticed over the last few months.

These are not bugs with AndyJ's mod specifically - many of them have been there for as long as I've been playing FFED3D.

  • Medium Gas Giant and Large Gas Giant share same texture (tex715.png) (e.g. Saturn and Jupiter).
  • Gas Giant Rings do not display a texture (tex708.png).
  • Random sound effects occur during flight. They sound like the 'booms' and 'clank' sounds, normally associated with space stations. Anyone else noticed that?
  • Starfield background colour lightness/darkness option doesn't work. Your only options are light blue or black starfields (skybox0.tga-skybox5.tga). I can supply starfield textures with different shades if you can get the functionality working.
  • Planets are 'shiny'. Go to a moon (or small barren sphere of rock) in a system with a white or yellow sun. You'll see a diffused point of light reflecting off the planet's surface caused by the system's sun. Is it possible to reduce the 'reflectiveness' of planets so that the sun doesn't produce such a distinctive point of light?
Also, Brown Dwarf Substellar Objects have a number of problems (e.g. Vega 10 (-3, 2), Achenar 9 (1, -4)):
  • They are not round. Instead they look like a rugby ball.
  • Axis and rotation issues. The planet doesn't appear to rotate on it's axis, and it goes totally wild if you rotate your ship while looking at it.
  • There's a problem with the texture up close. The texture disappears and the whole planet appears hollow.
  • They ignore the 'DrawSunsInSkyLate' config directive, and always appear in front of clouds when seen from a planet's surface.
  • They have this crazy shimmering surface. I'm not sure why.
  • (REQUEST)They act as a light source, so do not have shadows on the side that faces away from the sun. I think this is correct. If so, can we add a faint diffused atmospheric glow, similar to that used by stars?
I've uploaded a sample at https://www.youtube.com/watch?v=oY4THZTmA9U. Please ignore the brightly coloured texture map - I was experimenting with a different texture at the time.

AndyJ - are these bugs that could be addressed in your mod?
 
Can probably answer most of these:

Medium Gas Giant and Large Gas Giant share same texture (tex715.png) (e.g. Saturn and Jupiter).
This currently depends if they are actually different model numbers in FFE - and I think not. But, if they are, then the new textures cfg file will let you assign separate textures. (I probably could add addition checks for size though, and add extra textures - not that 32bit isn't struggling already lol - but yes I guess)

Gas Giant Rings do not display a texture (tex708.png).
It's a red-herring, an unused texture. The rings are drawn as solid colours and don't have any texture support at all. Have experimented using texture, but it only seemed to use the 1st pixel (like lakes and fields) although this does have an interesting side-effect of allowing the rings to become translucent. (no that's not supported at the moment!)

Random sound effects occur during flight. They sound like the 'booms' and 'clank' sounds, normally associated with space stations. Anyone else noticed that?
Yep, long standing bug of FFE. Volume is meant to be logarithmically set based on distance from camera from distance I think, but not sure this is always the case. I think station noises are possibly a set volume. Noticed that FFE is monophonic too. I could probably dig into this more now and at least suppress certain sounds if not generated by the player ship, unless perhaps you are docked or landed.

Starfield background colour lightness/darkness option doesn't work. Your only options are light blue or black starfields (skybox0.tga-skybox5.tga). I can supply starfield textures with different shades if you can get the functionality working.
hadn't noticed that. Should be controlled by a palette value added by JJFFE.

Planets are 'shiny'. Go to a moon (or small barren sphere of rock) in a system with a white or yellow sun. You'll see a diffused point of light reflecting off the planet's surface caused by the system's sun. Is it possible to reduce the 'reflectiveness' of planets so that the sun doesn't produce such a distinctive point of light?
The shaders are a bit full-on with lighting - either full lit or black when in shadow. Ships really suffer from this. Arguably realistic in space ...
Shaders are still a bit of a mystery to me at the moment tbh, but you could try experimenting with the line "specular = (lightcol * VdotR) * 0.17;" within the float4 P_Land_With_Noise() function of models\planet.fx
Now that I'm running out of actual game-breaking bugs, it's time to start looking into the fun stuff like atmospheres :D

Also, Brown Dwarf Substellar Objects have a number of problems (e.g. Vega 10 (-3, 2), Achenar 9 (1, -4)):
They are not round. Instead they look like a rugby ball.
FFE has decided to squish them due to orbital gravitational forces?

Axis and rotation issues. The planet doesn't appear to rotate on it's axis, and it goes totally wild if you rotate your ship while looking at it.
Probably the new force rotation patch (v1.08+) will solve the rotation. (FFE will have decided 0 rotational speed)
Rotation might be FFED3D's slightly fisheyed view of the now-3D environment. This has been highlighted with asteroids too.
(ah sorry. have seen the video after this, wow that's freaky!)

There's a problem with the texture up close. The texture disappears and the whole planet appears hollow.
Sounds like the terrain clipping issue. This existed in FFE but was concealed by the low resolution and atmosphere background. Hard to fix this one.
(ah sorry. have seen the video after this, thought you meant the general issue)

They ignore the 'DrawSunsInSkyLate' config directive, and always appear in front of clouds when seen from a planet's surface.
They should be classed as planets when FFED3DAJ draws them rather than a sun, should be behind clouds though. (suns are all simple sprites)
Have you a test case I could look at?
edit: aaah. my bad. the new code to sort doesn't treat them as either a planet or a sun when it comes to drawing the clouds. If you have an example save of a planet landing with one in the sky that'd be hugely helpful! :)

They have this crazy shimmering surface. I'm not sure why.
Nor me. I'm presuming that FFE is morphing it as so...

(REQUEST)They act as a light source, so do not have shadows on the side that faces away from the sun. I think this is correct. If so, can we add a faint diffused atmospheric glow, similar to that used by stars?
Seems reasonable - can have a play with that once I get planet atmospheres working as I want them. surprised not shadowed as a planet actually...
(I've tried adding billboard 'glows' around planets in the past and they simply disappear at certain points, need to fathom how to do them with an object + shader instead)

I've uploaded a sample at https://www.youtube.com/watch?v=oY4THZTmA9U. Please ignore the brightly coloured texture map - I was experimenting with a different texture at the time.

AndyJ - are these bugs that could be addressed in your mod?
Ha, the video is quite funky!
I'm not sure what the issue is with the disappearing surface of brown dwarf when in close orbit - maybe they're simply drawn too large. Something else that I've noticed is that they're mirrored compared to how FFE draws them.
The mad rotation that seems to be movement based might be fairly hard to nail down...
 
Last edited:
They ignore the 'DrawSunsInSkyLate' config directive, and always appear in front of clouds when seen from a planet's surface.
They should be classed as planets when FFED3DAJ draws them rather than a sun, should be behind clouds though. (suns are all simple sprites)
Have you a test case I could look at?
edit: aaah. my bad. the new code to sort doesn't treat them as either a planet or a sun when it comes to drawing the clouds. If you have an example save of a planet landing with one in the sky that'd be hugely helpful! :)
No problemo. You can download a ZIP file containing some save files at:

https://www.mediafire.com/?ad6rgad7gkwxkdr

It contains 3 save files:
  1. Hadar._04 - Shows a brown dwarf drawn in front of the clouds from a living planet.
  2. Vega10._61 - The save file used to create the sample video I uploaded to YouTube.
  3. Achenar9._34 - Another example of a brown dwarf up close.
(REQUEST)They act as a light source, so do not have shadows on the side that faces away from the sun. I think this is correct. If so, can we add a faint diffused atmospheric glow, similar to that used by stars?
Seems reasonable - can have a play with that once I get planet atmospheres working as I want them. surprised not shadowed as a planet actually...
I think this image gives a good representation of how brown dwarves might look in real life.

They would take some shadow from the sun, but would also generate a small amount of their own light from within. Not sure how feasible this would be with the FFED3D engine, so I say just go with whatever looks best.

Ha, the video is quite funky!
I'm not sure what the issue is with the disappearing surface of brown dwarf when in close orbit - maybe they're simply drawn too large. Something else that I've noticed is that they're mirrored compared to how FFE draws them.
The mad rotation that seems to be movement based might be fairly hard to nail down...
Yea - it seems stars and planets are locked to the rotation of the ship, but brown dwarves ignore that rule. Weird.
 
No problemo. You can download a ZIP file containing some save files at ...
Cheers for that - saves me a load of time trying to find a good example!
Will take a look later on!

I think this image gives a good representation of how brown dwarves might look in real life.
The next and probably over-ambitious target I've set myself is to get an atmosphere shader working in FFED3DAJ. Have tried to adapt a couple of other people's on-and-off but with little success as they tend to make assumptions that planet/atmosphere ratio is a fixed size and that the planet is located at 0,0,0 in the game space. But... if I can get something working then I can dump the outer blue 'sky' from FFED3D that's drawn around worlds and colours/obscures the land when viewed from afar. A palette change would allow the atmosphere to be applied to other planet types too ...

Yea - it seems stars and planets are locked to the rotation of the ship, but brown dwarves ignore that rule. Weird.
Hmmm... that's a good observation actually. You might be onto something there as we know asteroids are also affected. All of these aren't classed as either a planet or a sun within FFED3D/AJ - maybe there's a rotation-related piece of code lurking that's applied to to planets/suns but these others are overlooked. Well ... I can *hope* it's something so simple :D (bet that it isn't!)

[Edit] :eek: Oh wow! I couldn't help a quick look and it was *exactly* that... 2 lines of code and brown dwarfs and asteroids don't rotate about as you move the view now! This smilie isn't grinning as much as I am!!: :D
 
Last edited:
Brown Dwarf Substellar Objects
There's a problem with the texture up close. The texture disappears and the whole planet appears hollow.
I'm not sure what the issue is with the disappearing surface of brown dwarf when in close orbit - maybe they're simply drawn too large.
This was actually a side effect of the same issue causing them to rotate as you moved them within the view. The fix for that has also corrected the missing sections of planet when up close :D
 
Last edited:
This was actually a side effect of the same issue causing them to rotate as you moved them within the view. The fix for that has also corrected the missing sections of planet when up close :D
Does this mean no more see-through planets when docked? I hope so :smilie:
 
Does this mean no more see-through planets when docked? I hope so :smilie:
Nah, sorry this one is specific to the brown dwarfs and possibly the large asteroids. It doesn't fix the issue where the camera is below the surface and areas of triangles are then culled (because you're looking at them from the wrong side) or where there are simply gaps in the surface tessellation. :eek:
 
The next and probably over-ambitious target I've set myself is to get an atmosphere shader working in FFED3DAJ. Have tried to adapt a couple of other people's on-and-off but with little success as they tend to make assumptions that planet/atmosphere ratio is a fixed size and that the planet is located at 0,0,0 in the game space. But... if I can get something working then I can dump the outer blue 'sky' from FFED3D that's drawn around worlds and colours/obscures the land when viewed from afar. A palette change would allow the atmosphere to be applied to other planet types too ...
That would be amazing. Imagine - it could be applied to any planet with an atmosphere, and you could get some really stunning effects in systems with red stars, or blue stars. :)

Hmmm... that's a good observation actually. You might be onto something there as we know asteroids are also affected. All of these aren't classed as either a planet or a sun within FFED3D/AJ - maybe there's a rotation-related piece of code lurking that's applied to to planets/suns but these others are overlooked. Well ... I can *hope* it's something so simple :D (bet that it isn't!)

[Edit] :eek: Oh wow! I couldn't help a quick look and it was *exactly* that... 2 lines of code and brown dwarfs and asteroids don't rotate about as you move the view now! This smilie isn't grinning as much as I am!!: :D
 
Planets are 'shiny'. Go to a moon (or small barren sphere of rock) in a system with a white or yellow sun. You'll see a diffused point of light reflecting off the planet's surface caused by the system's sun. Is it possible to reduce the 'reflectiveness' of planets so that the sun doesn't produce such a distinctive point of light?
The shaders are a bit full-on with lighting - either full lit or black when in shadow. Ships really suffer from this. Arguably realistic in space ...
Shaders are still a bit of a mystery to me at the moment tbh, but you could try experimenting with the line "specular = (lightcol * VdotR) * 0.17;" within the float4 P_Land_With_Noise() function of models\planet.fx
Now that I'm running out of actual game-breaking bugs, it's time to start looking into the fun stuff like atmospheres :D
Yep! Changing the line from:

Code:
specular = (lightcol * VdotR) * 0.17;
to

Code:
specular = (lightcol * VdotR) * 0;
Removes the reflective point of light from planets. I think they look better like this. YMMV.

Try changing '0.17' to '1', and laugh as all the planets look like snooker balls. :D
 
Starfield background colour lightness/darkness option doesn't work. Your only options are light blue or black starfields (skybox0.tga-skybox5.tga). I can supply starfield textures with different shades if you can get the functionality working.
I've taken a look at this and there were a couple of issues...

FFED3D only ever cleared the screen with black. The 'blue' background for space is from its own models\nebula.x model and the skybox0->5 tga images, rather than the internal FFE skybox model & palette values. If the space background colour is set to black in the settings, then it doesn't draw the new nebula model... naughty!

Anyway I'd tripped over the original FFE nebula model when experimenting with the z-sorting in the previous build and posted this screen shot:

There were issues with it drawing over other objects and it had visible seams between images - but these were easily fixed. I've added an option for the next build to choose between drawing the original nebula or FFED3D's.

I've also fixed the clear-screen code so that it'll clear the upper area above the console with the correct space colour when there's a skybox - it'll be black in the initial intro banners sequence and the death 'gravestone' animation.
Also I've (almost) corrected the assembly code so that the intro sequence uses the space colour setting added by JJFFE rather than it drawing in light blue. Seems that changing the value and jumping straight into the intro via new game still uses the previous setting though...

For the FFED3D nebula then really the skybox0->5 images should be png files with alpha transparency so that they allow the space colour to show through.
Alternatively, we can now use the original FFE nebula & images - but this has another problem because the system chart also uses 432/433 for its nebula clouds and they've been replaced in most image sets, breaking the nebula cloud that stretches across the image range tex428-433.
The original FFE nebula skybox also uses tex548-552 and these have also been replaced in the v1.12b++ textures and don't really fit the skybox; 550-552 aren't truly transparent.
Here's a work-in-progress screen shot though:

As you can see, the pink nebula has a definite 'black' background to it.
I think that I'll have to split these images off to separate texture numbers that can be reused in the system chart, and add them all to the core textures pack. Doing this may mean that some existing texture sets aren't entirely compatible, but there's no other option really...

The final issue that I found is that FFE has it's own set of background stars, model 316 - a pair of "ball" arrays which aren't drawn at all correctly! FFED3D has replaced these with the models\stars.x model and stars.tga image which given the lack of a functional alternative, will be left in place for the time being!

[edited 28/08/2018 to update image URLs to postimg.cc]
 
Last edited:
Hey everyone!

Just thought I'd give you a preview of one of the things myself and AndyJ have been working on over the past few weeks.

We've been trying to improve the look of planets up-close by redoing a lot of the terrain textures. Living planets should now show more variety:

Lush Terrain Planets:


Living Desert Planets:


My texture pack also allows you to replace the single texture for non-living planets with terrain textures:



The eagle-eyed among you may notice that the terrains still suffer from graphical glitches occasionally. There's not a lot that can be done to improve this because of the limited rendering engine employed by FFED3D. However, AndyJ is trying some experiments with the terrain mappings to see if we can try and resolve some of the more obvious glitches.

Stay tuned!
 
By the way, which in-game font are you using in those screenshots?
Oh, it's called Discognate:

http://www.1001freefonts.com/discognate.font

Download it and install it, and then you can set it in the ffed3daj.cfg file:

gameFont=Discognate
gameFontSize=14
Incidentally, terrains are getting even better now. Living planets now have rock faces:



And non-living planets have a much smoother transition between high plains and low plains:

 
Many thanks. I like that font in the game :smilie:

The terrains are just looking better and better. Hope they're ready for release really soon!
 
The terrains are just looking better and better. Hope they're ready for release really soon!
Thanks! The new terrains will only work with the next release of AndyJ's build, so as soon as that is available, then I'll release the terrains pack too.

I'm not sure how long that will be though, as I know he's working on other features/fixes in the build.

It'll be worth the wait though!

;)
 
Not sure how quick it'll be, I doubt until at least the end of the week - but it's definitely moving in the right direction :)

I'm still 'digging away' at the terrain code though (groan!).
Progress has been a bit interrupted by the bank-holiday weekend and fighting off the afermath of a bad case of flu... boo!

This screen is a good example of the issues that I'm trying to fix:

The triangle just above 'Ceres' shows how sometimes a single pixel is stretched across the triangle, and to it's left the solid green area is probably that the texture is repeated so many times within the area - it becomes so tiny that it appears to be a solid colour!

So the challenge has been how to figure out which triangles aren't drawing correctly - and how to correct them! :eek:

Not exactly easy, as obviously we're dealing with procedurally generated terrains, and the code that produces them is pseudo-assembly language and essentially undocumented. And unlike a lot of terrain texturing, we need to have triangles mapped with textures in the correct scale and alignment in certain areas so that they form continuous ridge-lines...
So how do you work out which triangles these are on a planet? Never mind whether the texture needs to be oriented 'up' or 'down', 'left' or 'right' for a cliff that may run North/South, East/West or anything in between relative to the planet?

Well there was already a test on a data value that appeared to be height related, and through experimenting with this found that smaller areas of ridge lines could be identified, but not their individual triangles or their orientation.
Did a bit of research on Google to see if that might throw out any hints how to proceed, but drew a bit of a blank.

I then got looking at those troublesome triangles a little closer, and wondered if perhaps there was some pattern to those that were textured ok VS those that were wrong... perhaps the order that their points were defined in differed and if so, perhaps there would be a link? A bit more digging and I found where a triangle's points were defined, and in 6 different orders. So I tried assigning a different coloured hillside texture for each order along the ridge to see if there was a correlation. EUREKA! The areas that have texture issues are always the using the same 2 or 3 colours!
But... this was only the top half of a ridgeline, and there were 6 more defining the lower half. And as it turned out even the triangles that look ok, well they weren't always using the whole texture, might be slightly misaligned (sloped) and/or mirrored left to right.

For any ridgeline, I need to identify both rows of 6 triangles, and for each triangle then need to correct their texture mapping (U & V co-ordinates) of which I think there's at least another 12 combinations to work though!

Here's an idea of how this looks as I work through it:


The 'good' news is that once the mapping for a triangle is determined, it works for the whole ridgeline. The bad news is that other ridgelines need different mappings. And I've identified 5 different areas so far I think! :eek:

Mars in particular has a lot of issues...

Is this mean to be a ridged area, or simple snowy terrain ... I'm tending toward saying it's the latter and saving myself from a rubik's-cube-esqe puzzle!!!

And although the shoreline cliffs are looking great in the pictures, even with these, there's still some texture mirroring in there to work out. I've switched to coloured textures with arrows on them now to help work that out!

It's just a long slog ahead now, working through the texture UV mappings until I get the right values for each triangle, and for each area. But yeah, hopefully it's going to be worth it! :D

Originally I was wanting to look at the atmospheres for the next release, but once the terrain texturing is sorted out I'll push out a build!

[edited 28/08/2018 to update image URLs to postimg.cc]
 
Last edited:
My goodness! :eek:

You guys are doing some amazing work here! I was playing the most recently released build yesterday and loving how things are looking, but this promises to be another great leap.

Can't wait! :):D
 
Just wanted to pop in and say excellent work! You guys have really made this game come alive for me again. I felt age 14 all over, for the last week or so. Keep up the great job, I'm really excited to see what else you guys can do :D
 
Top Bottom