-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add cacheAsBitmap in the template host #8
base: master
Are you sure you want to change the base?
Conversation
This prevents the black boxes that required the disabling of cleartype or blur adding to templates individually.
I think it is I don't see any reason to why we shouldn't go with your implementation, just wanted to mention that it isn't specifically tied to Blur, and a more generic implementation would be to turn on cacheAsBitmap. I haven't spent time double checking this, so I might be wrong. |
As I alredy said in the forum: I don't think that this is a good idea, as it cures a wrong Windows setting with something that adds to the processing power needed for the templates to play. |
I think performance may be an issue I'll need to examine but the problem is html templates should have cleartype turned on for best appearance. |
I stil don't lke the idea. Normally people don't mix technologies and if you do, you simply add the blur by hand. Otherways you change the Windows setting dependant on the technology (Flash or HTML) used on the current job. |
I could be convinced that it isn't a good idea to cache the whole template as a bitmap. Adding this as a feature to the template generator - in a similar way that the anti-aliasing is done is a good idea. If only the latest source was on github @dotarmin |
@jesperstarkar: To have it as a setting in the TemplateGenerator seems a good idea, so that one can add it, if it makes sense. To add it in the TemplateHost as a fixed thing could be problematic in my opinion. |
I'm referring to the latest source of CasparCG/templategenerator. I can't put the feature in there as the version on github is several versions old. |
@silid Latest source code is located but is not pushed yet by Andreas. Will be done after vacation. |
This PR needs changes in TemplateGenerator to have the possibility to disable cacheAsBitmap in the temapltehost it-self. |
@dotarmin Any sign of the current source of TemplateGenerator in github yet? |
@didikunz The source has been changed and enables cacheAsBitmap on the whole template. I've been using this for a while and found it very helpful. Do you still think it will be problematic and why? |
@silid I would stongly recomend to have a setting for that, as I do not know, what happens with existing stuff and would not want to investigate a funny error, that appers, after a change of a variable name spelling error or the like. If it's a setting I can disable or enable it. If it is enabled fixed I would need to downgrade the whole toolchain if something werid happens because of this. I still think it's "shooting sparrows with a cannon". |
I feel this is risky because if starts to give funny errors and community users do not update the TemplateGenerator to include this option, then it will be problematic. Also, what happens with current flahs-templates when this is enabled on a TemplateHost-level? |
@dotarmin - this is one reason why not to use it as a setting. It solves the problem where people see the black boxes around text and actually smooths the workflow for combined html and actionscript templates as existing templates can now be used with cleartype turned on. It is no longer an either/or situation. @didikunz - It does nothing to variables or names. |
When we do a setting, could it be disabled in the TemplateHost by default, so that people with old TemplateGenrators get the setting disabled? In the new TemplateGenarator the setting could be enabled by default, so that new users get it enabled to make the black boxes disappear. That would be the best for both kind of users. |
@silid "It does nothing to variables or names." you missunderstud me. I know that. But when I need to open up an old template to correct a very, very minor issue, like a typo on a variable or so and then recomplie it with a new TempalteGenerator and it starts to behaive weird, then I am pissed off and a simple 2 Minute correction becomes a 2 hour or more issue. |
@didikunz This PR does not change the templategenerator or the template. It would have zero effect on editing old templates. |
How could that be? If I open an old template in my Adobe Flash / Animate an recompile it's a new template then :) |
Because this PR affects the templatehost - not the templategenerator. |
I have compiled all templatehosts with my PRs available for test here: https://drive.google.com/drive/folders/1sdVZjC0UCBWbw5LpUQs4PXaRqojCjWGa?usp=sharing They contain all PRs not just this one. |
I fully support merging this as is. |
Sorry for late feedback, vacation and election happened.. I also see potential problems with using this as default setting, there are potential performance problems with caching as bitmap, and possible masking problems as well, because the flash player will change how it redraws the display object and its children when cached. I remember that this was actually tested a long time ago, and I can't rembember why, but we removed it for some reason, probably because of performance. Have you tried to cache the template itself instead (eg
|
Yes - this does not work, it would also require recompiling templates. I think performance may be the only issue here, but there is only one cache per templatehost and I have not noticed any issues personally. Perhaps the hardware is a lot better since you tried a similar approach? Experience shows this actually solves problems with masks - i think because the whole template host is cached as one rather than individual components. If someone can show me a template where this mode breaks it - I'd love to see it! However - in order to proceed:
|
I still think @silid is right from the beginning here and I do still support adding caching to the THs globally. |
Ok, let's do that. As Flash is a dying technology and even I have to do the transition to HTML it probably makes sense to do that. |
I still think it should be disabled by default due to backward compatibility even if flash is dying technology. It's still widely used even if we're going towards HTML. An alternative would be to create a GitHub release with original templatehost and one release with cacheasbitmap enabled. Those who need cacheasbitmap can replace the original templatehost bundled with the server. |
@dotarmin I'd suggest the reverse.
|
For anyone interested in testing I have updated the templatehost files in in my shared folder. These are now named cg22 for the version change - note that CasparCG uses the first one it finds, so you will have to remove the cg20 versions for it to pick these up. |
ping @jeansson |
AS3 templates currently require either a blur filter in the template or disable cleartype on the server.
HTML templates perform better with cleartype enabled and so it might be preferable to enable blur on load of template into the templatehost so it isn't required in each and every template.