| In recent years,with the development of computer graphics,interactive scenarios have increasingly appeared in a variety of virtual environments.Among them,the interaction between fluids and solids has attracted widespread attention from researchers.The interaction between fluid and solid can make the fluid animation more vivid and real.Therefore,the interaction between fluid and solid is often applied in various fields such as game special effects,animation production and virtual reality environment.In this paper,two new simulation methods are proposed respectively for two different fluid-solid interaction scenarios: large-scale water surface and object interaction,water droplet and glass window interaction,in order to obtain faster and realistic interaction simulation effects.Firstly,in order to simulate the real motion of objects on the water surface,this article uses different methods to model the water surface waves in different regions,and uses the method of projection grid to draw a large-scale water surface scene.In order to simulate the real movement of water droplets on glass windows,this paper uses particle system and random number method to construct static water droplets of different shapes on glass windows.It lays the foundation for the simulation of two kinds of interactive scenes,including large-scale water surface and object interaction,and water droplet and glass window interaction.Secondly,in the process of simulating large-scale water surface interaction with objects,there are problems of unrealistic object motion and unrealistic interaction wave generation.Therefore,the interaction process is simplified into two independent processes:object motion process and interactive wave generation process,which are simulated separately.In the process of simulating the movement of the object,the wave force is introduced,combined with the custom wind factor,to achieve the effect of the object floating with the water wave;in the process of generating the interactive wave,a normal distribution function is introduced to calculate the triangular surfaces of the object,so that the simulation effect is more realistic.Thirdly,in the current rain scene,there is a problem of unrealistic simulation of the movement of water droplets on glass windows.Analyze the force model of the water drop,this paper considers gravity,wind,surface tension,the adsorption force of water droplets on the surface,and air resistance to calculate the velocity of water droplets.Consider the affinity between the adjacent grid and the water drop,introduce the wind factor and bending factor,simulate the natural wind and impurities on the glass,and then determine the movement direction of the water drop,showing the details of the real water drop movement.Finally,with the help of Unity3 D engine,Shader Lab and Cg languages,two real-time simulations of different interaction scenes are designed and implemented: large-scale water surface and object interaction,water droplet and glass window interaction. |