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

Questions about particles rendering

Open Rookiemin opened this issue 4 years ago • 34 comments

dear author,i have a question.
What does the color of the particles represent speed? direction? or?

Rookiemin avatar Oct 07 '20 03:10 Rookiemin

The color of particles represent their speed.

BTW, the latest code doesn't use multiple colors for particles any more.

RaymanNg avatar Oct 09 '20 10:10 RaymanNg

Thank you very much. i get it. my another question , when the earth is operated , the wind field will be redrawn. How to cancel this?

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月9日(星期五) 晚上6:45 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] about particles color (#45)

The color of particles represent their speed.

BTW, the latest code doesn't use multiple colors for particles any more.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 09 '20 11:10 Rookiemin

You can remove the corresponding event listener here, but I suggest to keep this listener to ensure particles are rendered correctly

RaymanNg avatar Oct 10 '20 04:10 RaymanNg

What do I need to do to solve this problem?

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月10日(星期六) 中午12:37 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] about particles color (#45)

You can remove the event listener here, but I suggest to keep this listener to ensure particles are rendered correctly

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 10 '20 07:10 Rookiemin

You can try to remove the event listener first, and see if you encounter any problem, if so you can post it here

RaymanNg avatar Oct 13 '20 01:10 RaymanNg

After I remove the event listener and manipulate the earth again, the visualization will become messy, and the last wind field trace will overlap the current trace.

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月13日(星期二) 上午9:46 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] about particles color (#45)

You can try to remove the event listener first, and see if you encounter any problem, if so you can post it here

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 13 '20 02:10 Rookiemin

Sorry, I forgot that the screen space changes with the camera movement, so you have to redraw the particles trails

RaymanNg avatar Oct 13 '20 05:10 RaymanNg

Thank you very much. Dear author,  I got another problems. Does the particle trajectory have elapsed time? After loading my data, the streamline will slowly fade away after a period of time, but your streamline will not fade away. ------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月13日(星期二) 中午1:41 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] about particles color (#45)

The screen space changes with the camera movement, so you have to redraw the particles trails

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 13 '20 07:10 Rookiemin

Does the particle trajectory have elapsed time? Yes, it will fade out after some time.

You can try to decrease the fadeOpacity in the panel to see whether your steam line fade out

RaymanNg avatar Oct 14 '20 00:10 RaymanNg

dear author,in the process of learning code,I have some questions as follow。 1.In the previous version, the color represented the speed value.  So how do the color and speed values match? For example: What does red represent? What does yellow mean? 2.How is the direction of the trajectory calculated?

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月9日(星期五) 晚上6:45 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] about particles color (#45)

The color of particles represent their speed.

BTW, the latest code doesn't use multiple colors for particles any more.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 20 '20 13:10 Rookiemin

So how do the color and speed values match? For example: What does red represent? What does yellow mean? This question was already answered in the previous README

How is the direction of the trajectory calculated? The code has already told you about that, trajectory is calculated through RK2(Runge-Kurta second order) method, and the input points of RK2 are calculated by bilinear interpolation.

RaymanNg avatar Oct 21 '20 14:10 RaymanNg

On the latest version, I loaded my  nc file, but the life cycle of particles ended but the particles were not regenerated.  What do I need to do to solve it?

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月21日(星期三) 晚上10:25 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

So how do the color and speed values match? For example: What does red represent? What does yellow mean? This question was already answered in the previous README

How is the direction of the trajectory calculated? The code has already told you about that, trajectory is calculated through RK2(Runge-Kurta second order) method, and the input points of RK2 are calculated by bilinear interpolation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 22 '20 08:10 Rookiemin

  1. How do you generate your .nc file?
  2. Check your browser console to see if there is any WebGL error

RaymanNg avatar Oct 22 '20 08:10 RaymanNg

1.According to your data format, then use python generated nc file. 2.No error message.

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月22日(星期四) 下午4:55 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

How do you generate your .nc file?

Check your browser console to see if there is any WebGL error

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 22 '20 09:10 Rookiemin

Does your .nc file meet the requirement of the README? For example, nc file should be in NetCDF version 3 format

RaymanNg avatar Oct 22 '20 09:10 RaymanNg

符合,加载上我的nc数据之后,可是实现可视化的效果,但是粒子轨迹会慢慢变稀,最后轨迹全部消逝。 这个现象是什么原因??

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月22日(星期四) 下午5:27 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

Does your .nc file meet the requirement of the README?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 22 '20 10:10 Rookiemin

This is weird, did you modify the WebGL code?

Is it possible for you to send me the .nc file(via Email or upload to this issue) so that I can make a diagnosis for your problem?

RaymanNg avatar Oct 22 '20 10:10 RaymanNg

我没有修改代码,另外我的nc文件给您发不过去,您是否能提供另一个邮箱?

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月22日(星期四) 晚上6:56 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

This is weird, did you modify the WebGL code?

Is it possible for you to send me the .nc file(via Email or upload to this issue) so that I can make a diagnosis for your problem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 22 '20 11:10 Rookiemin

Well, could you upload your file here (does not require sign up) and send me the code?

RaymanNg avatar Oct 22 '20 12:10 RaymanNg

我已上传,取件码为iw4trw

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月22日(星期四) 晚上8:12 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

Well, could you upload your file here (does not require sign up) and send me the code?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 22 '20 12:10 Rookiemin

Emmm.... Seems good here, how long does it take before all particles disappear?

RaymanNg avatar Oct 22 '20 12:10 RaymanNg

I think I figured out why particles disappear, your wind speed is too slow, hence the particles are almost still and then fade out.

Maybe I should allow a larger speed factor.

For a quick fix you can:

  1. Maximize the fade Opacity
  2. Set the dropRate and dropRateBump to zero

RaymanNg avatar Oct 22 '20 12:10 RaymanNg

您加载了我的数据?  我按照您的建议试了一下,粒子轨迹还是会消失,

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月22日(星期四) 晚上8:44 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

I think I figured out why particles disappear, your wind speed is too slow, hence the particles are almost still and then fade out.

Maybe I should allow a larger speed factor.

For a quick fix you can:

Maximize the fade Opacity

Set the dropRate and dropRateBump to zero

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 22 '20 13:10 Rookiemin

There is probably something wrong with the rendering, I need to take further investigation. It may take a few days.

RaymanNg avatar Oct 22 '20 14:10 RaymanNg

I found that there are lots of NaN values in your NetCDF data, and I think this is the reason why particles rendering is wrong.

Could you remove these NaN values and try again?

image

RaymanNg avatar Oct 22 '20 14:10 RaymanNg

我试过了,而且我的数据,这些地方没有值,如果把这些移除了之后,就不是想要的效果了

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月22日(星期四) 晚上10:31 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

I found that there are lots of NaN values in your NetCDF data, and I think this is the reason why particles rendering is wrong.

Could you remove these NaN values and try again?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 23 '20 01:10 Rookiemin

Sorry, I meant set all NaN to zero and try again, not delete the values themselves

RaymanNg avatar Oct 23 '20 02:10 RaymanNg

对的,我就是把它们设置为0,但是由于我的nc文件是洋流数据,陆地上是没有值的,把它们设置为0之后,陆地上也会有粒子显示,这和洋流的效果不相符。 您能明白么?------------------ 原始邮件 ------------------ 发件人: "Rayman"<[email protected]> 发送时间: 2020年10月23日(星期五) 上午10:13 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "Rookiemin"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

Rookiemin avatar Oct 23 '20 02:10 Rookiemin

You should have told me about that...... (It it also my mistake not to ask your full problem context)

You actual problem is rendering particles in specified area (in your case is ocean), right?

RaymanNg avatar Oct 23 '20 03:10 RaymanNg

非常抱歉,怪我之前没有给您说清楚。我的主要问题是,我粒子轨迹是可以显示出来的,但是粒子轨迹一段时间之后不在重新生成,导致轨迹消失。但是我看您的风场轨迹不会消失。所以,我想问如何让轨迹不消失

------------------ 原始邮件 ------------------ 发件人: "RaymanNg/3D-Wind-Field" <[email protected]>; 发送时间: 2020年10月23日(星期五) 中午11:13 收件人: "RaymanNg/3D-Wind-Field"<[email protected]>; 抄送: "啥也不会的小菜鸟"<[email protected]>;"Author"<[email protected]>; 主题: Re: [RaymanNg/3D-Wind-Field] Questions about particles rendering (#45)

You should have told me about that...... (It it also my mistake not to ask your full problem context)

You actual problem is rendering particles in specified area (in your case is ocean), right?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Rookiemin avatar Oct 23 '20 03:10 Rookiemin