3D-Wind-Field icon indicating copy to clipboard operation
3D-Wind-Field copied to clipboard

The wind field can be displayed clamp to ground?

Open Amber-372 opened this issue 4 years ago • 5 comments

Thank you for this great project. And I want to know the wind field can be displayed clamp to ground? like the following picture.

Amber-372 avatar Aug 06 '20 10:08 Amber-372

I don't think you can force the particles to move on the ground easily, because height is varying.

If you want to do that with this demo, at least you need to provide the WebGL program the height information, and set the particle height according to its location.

P.S. I recalled that Cesium provide an API for rendering something on the ground. If performance is not your concern, you can read the Cesium document and try it out.

RaymanNg avatar Aug 06 '20 12:08 RaymanNg

I don't think you can force the particles to move on the ground easily, because height is varying.

If you want to do that with this demo, at least you need to provide the WebGL program the height information, and set the particle height according to its location.

P.S. I recalled that Cesium provide an API for rendering something on the ground. If performance is not your concern, you can read the Cesium document and try it out.

If height of every grid was known, is there any easy way to achieve effect like picture above,but in a GPU render way. the picture above is cesium polyline, so it's performance bad. It can't run smoothly.

Amber-372 avatar Aug 06 '20 14:08 Amber-372

I think you need to deal with below two difficulties:

  1. How to get the height data. Cesium probably stores it somewhere, but you may need to dig in its source code to find out, or you will need to provide the height data which matches the terrain yourself.
  2. How to use height data in WebGL program. Generally grid data is passed through texture in WebGL program, you can read the texture in the Fragment Shader and set the height for each particle

P.S. Sometimes WebGL program suffers from precision problem, I am not sure whether particles can always be bound to the ground correctly and accurately.

RaymanNg avatar Aug 07 '20 04:08 RaymanNg

I think you need to deal with below two difficulties:

  1. How to get the height data. Cesium probably stores it somewhere, but you may need to dig in its source code to find out, or you will need to provide the height data which matches the terrain yourself.
  2. How to use height data in WebGL program. Generally grid data is passed through texture in WebGL program, you can read the texture in the Fragment Shader and set the height for each particle

P.S. Sometimes WebGL program suffers from precision problem, I am not sure whether particles can always be bound to the ground correctly and accurately.

I have the height data already. so what bothers me is difficulty 2. What I need to render is just a small bound, but lat/lon interval is high precision. And High precision and small bound data seem rendering strangely. but it's another question.

Amber-372 avatar Aug 07 '20 06:08 Amber-372

I think you need to deal with below two difficulties:

  1. How to get the height data. Cesium probably stores it somewhere, but you may need to dig in its source code to find out, or you will need to provide the height data which matches the terrain yourself.
  2. How to use height data in WebGL program. Generally grid data is passed through texture in WebGL program, you can read the texture in the Fragment Shader and set the height for each particle

P.S. Sometimes WebGL program suffers from precision problem, I am not sure whether particles can always be bound to the ground correctly and accurately.

I have the height data already. so what bothers me is difficulty 2. What I need to render is just a small bound, but lat/lon interval is high precision. And High precision and small bound data seem rendering strangely. but it's another question.

i'm sorry to bother,In the past for so long,but I was wondering if you'd solved the problem. If it has been resolved, can you give me some idea of the solution? Thank you!

xiaosen7 avatar Sep 22 '22 02:09 xiaosen7