The only way to get a realistic effect is to use a VCF (voltage controlled filter) to replicate the way an engine sounds under load/acceleration/coasting etc.
Digital reproduction of the actual engine noise is fairly easy but the realism takes time/trouble to achieve.
Fun fact - around 30 years ago I started developing just such a system. The idea at the time was to make a sound source that was linked to a cars accelerator and could be used to select any motorised sound you wanted (from a menu). Speakers under the car could make your car sound like a steam train pulling out of a station or rev like an F1 car whilst doing 20mph in a city centre.
I got the individual system modules working (digital reproduction) and VCF/amplifier but never managed to link all three processes together to work realistically. Work, time and money finished that project off. Might be time to revive it!