http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#UNITStatement http://www.web3d.org/x3d/content/examples/Basic/Units/index.html Sept 25, 2017 * tested 2-step(wrapper scale for length) and 1-step (each field scaled) methods with particle physics 1-step with FULL^ derived unit factors - ps_geometry_gravity_brittish.x3d looks same as ps_geometry_gravity_si.x3d - ps_geometry_wind_brittish.x3d looks same as ps_geometry_wind_si.x3d 2-step, and with a MINUS_ONE^ factoring of derived units - ps_geometry_gravity_brittish.x3d looks same as ps_geometry_gravity_si.x3d x ps_geometry_wind_brittish.x3d blowing particles much faster than ps_geometry_wind_si.x3d H0: I'm doing something silly wrong H1: something about the power and log heuristic formula for blending speed for windphysics http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/particle_systems.html#WindPhysicsModel ^MINUS_ONE - when computing derived units -including force- if the unit has length or length*length or length*length*length then take one length factor from the factor FULL forcefactor = massfactor *lengthfactor; MINUS_ONE forcefactor = massfactor; FULL areafactor = lengthfactor * lengthfactor; MINUS_ONE areafactor = lengthfactor; force - base or derived? when computing derived units, force can be derived or (as per specs) explict base. http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#Standardunitscoordinates One way to handle is to parse all the declared base units, then when computing derived units, start with force, and if already set, then skip, else compute from base units. Then when you get to Torque, you can use force and it might be from base, or it might be derived. this is what I'm doing now. I compute both torque and moment as derived units. torque = force x length moment (moment of inertia) = mass * length**2 Sept 24, 2017 * Michalis-style 2-step: length-scale-at-runtime + everything-else-at-parse-time * specversion and unitscalefactor stored in all executionContexts * compile-time tinkering variables for: -- whether to scale top scene or only scale subscenes (set to scale-top = TRUE) -- whether to only apply UNIT statement to spec v3.3 scene files (set to TRUE) * UNCAs (unit cateogries) added to FIELD_OFFSET / field attributes in perl -- avoids lookup table -- except length cateogry UNCAL_LENGTH not applied at parse time. done at rendertime x geocoordinates not done, still using GD lat,long in degrees as per v3.2 specversion -- v3.3 should be angle base units (radians by default), and over-ridable with UNIT statement Example scenes: unit.wrl vs unit.x3d - unit.wrl is v2.0 so won't apply units (tiny cylinder not at 90) - unit.x3d is v3.3 so does apply units to main scene so can see both cyl, and at 90 unit_meters.x3d - should scale all sub-scenes -feet,inches,yards- to about the same size Sept 5, 2017 Thanks also to Michalis of Castle Game Engine for sample units.* scenes, tips on how to parse, """ 1. Express angles in degrees (instead of radians). My implementation does it at parsing time, so when reading I simply do "RotationRad := ParseFloat(Lexer) * Reader.AngleConversionFactor;", where the AngleConversionFactor takes into account eventual degrees->radians conversion determined by reading UNIT declarations. After parsing I have everything in radians, so it's simple. If you deal with physics, you may need to do similar conversion for some physical values like forces, mass. 2. Apply scaling to the scene. This allows authors to use lengths in kilometers instead of meters, and still integrate with other scenes that use meters. This case is equivalent to surrounding the whole scene in Transform with scale, in my implementation. "" and link to his online doc page on UNITs https://castle-engine.sourceforge.io/x3d_implementation_core.php and in githup examples https://github.com/castle-engine/demo-models/blob/master/x3d/units.x3d https://github.com/castle-engine/demo-models/blob/master/x3d/units.x3dv https://github.com/castle-engine/demo-models/blob/master/x3d/units_helper.x3dv (I downloaded a .zip of the repo, and extracted the 3 scenes)