-
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
hatches/patterns don't work in vcs 2.0.beta #541
Comments
we are aware of this. @aashish24 and Kitware are going to fix this. This is duplicate of bug #493 . |
Thanks for the script @jypeter. We will fix it hopefully soon. |
This would be really useful to have the ability to stipple over mesh or boxfilled graphics.. I'm not sure how useful VCS will be for me until stippling is available.. |
@aashish24 @dlonie any progress on this? |
@doutriaux1 @jypeter I have to remember what was the bug or how much @doutriaux1 had developed the code. I doubt that we can get this one in 2.2 (other higher priorities for now) but we can try. |
@aashish24 I think most of the code is already in, my guess is that my test png were too big. If you could explain me how to pass a VTK-made pattern rather a png as texture I think we would be set. |
@dlonie @aashish24 I guess we're moving this to 2.3... |
@dlonie is looking into this but I don't think we can make into 2.2 |
@aashish24 @doutriaux1 Should we hold this off until the vtk/vcs layer rewrite? It looks like significant effort that will just be replaced in the near future. |
It's not a feature I use often, because I tend to forget about it, so it can wait a bit more, if need be Hey, @chaosphere2112 , that's another example you can use for the gallery once the problems are fixed! :) |
@dlonie I won't suggest that. Can you describe the problem you are running into? I was hoping that it should not be a lot of work but I haven't look at the code. I can see some complications. |
@jypeter Added to the list 👍 |
Here's where I stopped:
If We should really just leave this code alone until we can rewrite in to a cleaner, better documented format where it's clear how each task is carried out. This is going to tricky to implement and will need a custom override for the GL2PS exporter to get this working completely (GL2PS can't handle textures, I'll have to manually inject them into the image). I'd rather just get it right the first time and not have to deal with the fallout that will come from modifying this function. |
@dlonie I wouldn't worry about the cleaness of the code as far as we can write a method that applies the texture to the data layer. Once we have that function, we can always use that when we re-structure. Let's talk more about it today. May be I am missing sometihng. |
Talked with @aashish24, and I'll add a function that applies a texture to an actor and add a handler to the vector graphics exporter to copy the texture data over. This will leave the following tasks to the VCS team:
|
This is going to requires some C++ extensions to VTK to add a specialized GL2PSExporter subclass (Can't override the proper virtuals from Python). Do we have an existing C++ layer that I can add to, or should I add a new subproject? |
No existing C++ layer but in VCS there is some C code. May be within VCS, we can create a sub-project for it? |
@sankhesh I love the diversity of hatches, but I agree with @doutriaux1 and @durack1 and confirm that transparency is the most crucial feature. I will exclusively use the hatches function to display regions of significance. |
Sure. I'll make the pattern background transparent. |
@sankhesh transparent by default would be awesome.. If it's not too hard, also being able to toggle that would also be useful functionality, if it's already in there and easy to expose that would be ideal.. |
@durack1 i think the toggle might just add a level of complexity which can easily be replace by simply plotting the data once, once with pattern on, once w/o... The simpler the code the easier it will be to maintain! |
@doutriaux1 my preference is to add well documented functionality, with intelligent defaults.. If there are options for granular control I'd like them exposed for power users.. |
@doutriaux1 @durack1 @aashish24 @bonfils2 I added a parameter called
|
@sankhesh so you made the opacity a list, correct? That's a great idea, I was thinking of just one value applied to all levels, but that's even better! |
@durack1 what is stippling? Another pattern style? |
@doutriaux1 @sankhesh so the transparent grey dots in the figure above |
so like hatch10 but horizontal? @sankhesh how hard is it to add patterns? Could we somehow pass some png or vtk object instead of a pattern number and use this? |
@doutriaux1 @sankhesh if there are a bunch of VTK options like this, it'd be great to expose them too.. The hatch/patterns above are pretty 1980s technology in my opinion.. They look pretty klunky.. |
@doutriaux1 if we have access to more functionality/patterns/options and modernization through the VTK backend, then expose it.. There's no good reason to limit functionality in the off chance that you might want to change the backend renderer some day.. That's way too conservative.. The plotting tools and options in UV-CDAT should be up-to-date and bleeding edge as of 2015-08-27.. In the case that a functionality wasn't available in the future, this would need to be caught with an error message.. Which would happen anyway.. And obviously other tweaks and bugfixes would also be needed if the backend renderer changed.. My recommendation would be modernize and expose everything we have! Make it the best it can be.. |
but that's exactly why vcs lived through 30years or so worth of languages and technologies 😉 you need flexibility. Every time I introduced rigidity it came back to haunt me. We can always hook up things from the backend directly if needed for "expert" users. |
vcs.backend gives you access to VTK so if you want to moveon to the VTK world purely you can still do it. But that's no longer vcs. |
@doutriaux1 neither of the comments above are a reasonable justification to limit forward development in my opinion.. I think it's a way way too conservative approach.. There aren't many folks who have clung to the ever reliable Windows 1995, just because it's been around 20 years.. I want to plot 21st century graphics using UV-CDAT, whether it's |
@sankhesh : small dots would be great too! |
How about this? - I can add additional patterns (stipple and small dots) to the mix and get these changes merged in. Once that is done, I can look at adding the ability to pass a PNG image to the backend. I'll add that as a separate issue. |
@sankhesh that would be a great start.. What other graphics modes/patterns/hatches are available in |
@durack1 The current code-base uses vtkImageCanvasSource2D to generate the pattern images. All the above patterns are generated using the same. |
Fixes issue CDAT/cdat#541
Fixes issue CDAT/cdat#541
The test script pasted at the end is supposed to plot a map with hatches, and a canvas with some test patterns
The test script I used
The text was updated successfully, but these errors were encountered: