unrealaviation wrote in Sat Jun 29, 2019 3:13 pm:Is there any way to change the colour of the letters?
Big, bold black is a bit OTT...
In G91R1 we did all the liveries with canvas. It's not easy, but they work very well and, once loaded, they have the same features as the standard liveries. In some respects it is very similar to standard liveries, only for uploading it is necessary to use a NASAL script. Unfortunately, at least for now, it does not seem possible to directly use XML as is done for the environment. It would be very nice to complete the loading of the canvas with XML commands, maybe someone is already thinking about it, but I haven't seen anything, so I can't tell you about this.
I was asked to write a how-to to better explain how to activate a livery with canvases. I hope soon to have time to think about it as I believe it is very useful. It took a lot of tests and attempts to understand how it worked. However, I give you some references to the files you can watch. You will notice then that for the FIAT G91R1B it is possible to change livery through an XML configuration file that identifies the loaded liveries and their variants.
The FIAT G91R1B repository:
https://github.com/abassign/G91-R1B_HDThe NASAL Script for livery activation:
https://github.com/abassign/G91-R1B_HD/blob/master/Models/Liveries/set_livery.nasGiven the complexity of the aircraft, many objects have been defined that are listed in the first part of the NASAL file and that are activated with the command, for example:
- Code: Select all
ca = canvas.new({"name": "Fuselage",
"size": [ca_size,ca_size],
"view": [ca_size,ca_size],
"mipmapping": 1});
Defines the size of the livery and is obtained from a configuration file, in our plane it is possible to change the size of the livery. This allows you to be able to define very large liveries even from 16K! (which I tried and work! only for 8GB video cards up). If you use a small livery, for example 1024 (1K), you can run the aircraft on less powerful machines.
The second important thing in NASAL is to add the various objects to the canvas via the function:
[url]ca.addPlacement({"node": "A__G91_fuselage_int.weapon.door.001"});[/url]
For the rest I suggest you follow the code which I hope is clear enough. Obviously if you have problems write me that I answer you.
For a possible normal map it is necessary to execute a declaration, this is done for example with this command:
- Code: Select all
<effect>
<inherits-from>Aircraft/G91-R1B_HD/Models/Liveries/liveries_001</inherits-from>
<object-name>A__G91_fuselage_int.weapon.door.001</object-name>
You can see the effect here:
https://github.com/abassign/G91-R1B_HD/blob/master/Models/Liveries/liveries_001.effand it's pretty standard. Unfortunately the normal-map is not managed by the canvas (maybe I'm wrong, but if anyone knows how it's possible it would be very interesting)
I have tried, with success, to insert in a object a canvas with SVG image or vector objects or texts. This type of canvas allows you to insert something similar to the delcas and therefore obtain very interesting dynamic variations. I think that's what you want to do. But I recommend a trick ...
If you want to insert an animated canvas, first define an object (which I call a tray) on which to place the object! The tray can be placed above the surface at 1/10 mm ... The best thing about this solution is that it is possible to use a resolution for the tray much greater than that used for the fuselage. For example, you can make a hypothetical 1024x1024 resolution tray, but with a size, for example, of 100x100 mm. This means that a text is read very well up close, even if the resolution of the livery is low!
You can do it even on a traditional livery just define the tray separate from the livery.
ProblemWhen you use the multi user you can't run the NASAL code for the remote aircraft and therefore you don't see the canvas liveries or even the canvas objects! This is why I hope someone produces an XML command that associates a canvas