-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lines drawn behind data #1143
Comments
@aashish24 @dlonie any progress on this? |
On another project at the moment, I'll take a look when I switch back to UV-CDAT. |
ok, Iremember you did some magic a while back for the continents that had the same issue, do you remember about which function it was calling? thanks |
I took a look at the branch and made a few comments. Try printing out the layers in setLayer to see if there are multiple renderers with layer 0 -- that's the most likely culprit. |
If the lines are in the same layer/renderer as the data, try the approach in aa05421 -- it may be a z-fighting issue. |
BTW, is this supposed to be assigned to me? It sounds like @doutriaux1 is working on it. |
Assign to you for the lines thing. Will look at it if you don't beat me to it. I'm off today though. |
Did try the layer set them to very high number. Also it works for other projections like robinson. I think the z fighting thing is indeed the issue. |
The issue is that the renderer with the isofill data is being moved up to a higher layer, obscuring the tick marks. It's not the absolute highest layer, which is why the continents etc still appear above it. Apply this patch to print the plot type and the renderer addresses + layers:
We see the renderer with the isofill data (
I've tracked it down to this being the renderer returned from |
Looking again at the full output with that debugging output: https://gist.github.com/dlonie/8c0a3404d9e70d8a59ac it looks like several renderers get moved to higher layers in subsequent plot calls. Is this expected? Seems like it'd cause problems. |
I think it's renderer |
got it! Thanks @dlonie for pinting us in the right direction. We needed to create different renderers in case priorities were different overwise the last object added to the renderer was used for all actors in renderer. Will update the branch and create new baseline soon. |
ok @dlonie I think the issue I was runnnig into was due the number of layers getting too big I had the setLAyer setting the VTK layer to: |
I ran the script a few times with tracing enabled ( The only difference a good and bad run was:
Sure enough, adding the debugging output below shows that the points are coming out infinite some times, but not others:
E.g.
Not sure what's going on there, but it looks like an enormous quad is being mapped through the projection code? Maybe you'll have some ideas what's happening here? |
yes you draw the lines accross the globe you need to follow the line with small deltas in order to get the min/max values that the projected data will actually occupy. Values go from degrees to meters hence the big numbers. What is worrisome is that it seems the numbers comming back from the projection change all the time. In the previous code (master) I used to call TransformPoints/GetBOunds for each points, to avoid this I guess, I thought doing this way would make things faster, is there a way to getbounds skipping the inf? |
Agreed, the randomness is troubling. My bet is it's a numerical stability issue -- I'm not sure whether the code is intended to be used with inputs that have 20 orders of magnitude. |
I got it I had a left over
in the end the total number of points came out as: Npts*Npts+1 so the first point was probably whatever is in the memory when VTK created the first point. |
@dlonie @aashish24
can you please take a look at my branch:
https://github.com/doutriaux1/uvcdat/tree/issue_587_projected_ticks
it works fine in most case but for polar projections somehow the data gets drawn on top of the tick marks not matter what. Any idea on how to force VTK to respect priority/layer ordering?
@chaosphere2112 you're welcome to take a look as well 😉
Here's the code:
The text was updated successfully, but these errors were encountered: