So, I’m kind of gauging to see if there is any interest in a few data tables, structs, and enums with chemistry related things. The idea for this is to not only be implemented into one of my current projects, but to also be a starting basis to do other “things”. I may also include more experimental stuff in the project as well, such as building elements, compounds, etc. This is all things I need for my project anyways…
Unfortunately, the float variables are not all 100% accurate due to the engine being a pain in my neck at the moment and adding decimal places and numbers were there shouldn’t be (for example, the HoV for Sodium is 97.42, UE4 makes it 97.419998). I suppose this is why the UE4 license states that the engine is not for military use
So yea. If anyone is interested in it, lemme know below.
As far as completion dates and other information, I don’t have that information yet, as I’m on day 001 for this particular system for the game. The first step is to get all of the elements into a data table and then go from there. I will probably end up expanding on properties of each element with more information if I need it in the course of development.
This has nothing to do with the engine but only with how floating-point numbers are represented in computers. Float is only represented by a rather small amount of bits and therefore its accuracy is very limited. Programming languages normally offer way more precise floating-point numbers but people using only Blueprints will basicly never need such accuracy. Floating-point numbers are mostly designed to be able to take values over a very large range but are less accurate as further the number is away from 0. If I remember correctly not even the value 0.1 can be exactly represented.
Since you are working with Chemistry constants I suppose you have values around 10^(-20)? Those will be way less accurate than your Sodium HoV
I edited the PITA out, as reading back on it, it seems that I am saying something that I am not.
I should have at least the periodic table finished up by the end of the week, at least, that’s the plan so far. Then it’ll be time to hit the books to re-learn everything, heh. Hopefully it’ll be like riding a bike.
Found out how to get around my floating point issues, which is actually a two-step processes if I am thinking this correctly:
In the data table, I’m splitting my float value into a 2 part float array. So, 7.1 * 10^-7 would be: 1) 7.1 and 2) -7.0 ; once I get ready to do stuff in blueprints, I take these float values, do (math stuff), and output it to a string variable.
Also, I added:
Allotropes
Atomic Radius
Covalent Radius
Van der Waals Radius
Thermal Conductivity
Thermal Expansion
Valence
Electronegativity
Electron Affinity
Electrical Types
Electrical Conductivity
Electrical Resistivity
Superconducting Point
Once I get a handle on what I have now, I am thinking about how to integrate the lattice formation for each element as well (this would work well in my project too). I think this would be good for “visualizing” the element. Thoughts?
Being a chemist by training myself I approve of this project.
Be careful with the accuracy of your numbers though. Splitting the numbers like you suggest should effectively yield a float with double precision (if I am not mistaken). This will greatly improve your accuracy but adding a very small number to a very large number
will still not work correctly.
If you are also interested in visualizing molecules, I might be able to help you. My day job is writing software for crystallographic research so I might be able to offer some insight.