Issue with a Library Item composed of multiple images

Issue with a Library Item composed of multiple images

iklimis
Advocate Advocate
254 Views
2 Replies
Message 1 of 3

Issue with a Library Item composed of multiple images

iklimis
Advocate
Advocate

Hey Forma Team!,

I have been experimenting with the new terrainTexture representation, which really helped us in our feature development.

 

The process works great as is when there is a single image ready to be transformed into an array buffer, uploaded and create a Library item based on it. 

 

In our situation, however, there is an additional factor to consider: 
The case when we need to add some watermarks and copyright text inside the main image 
So then the Library Item created must be composed of 3 total images: The Main image (that covers the whole canvas), the watermark and the copyright image as you see in the attached illustration.

iklimis_2-1730931057339.png

 

 



Trying to solve this issue I firstly tried composing the set of images creating the main image Element. Then creating a watermark element and inserting in to the first Element as a Child Element. I noticed however that the Main image is layered on top of the child image causing the Child Image not to show.

Then the next step was to make the watermark image the Main Element and the Child of that would be the Main Image - which worked great..!

Then the final step was to create another child Element of the copyright image and also add it along with the Main image Element - something like this code below

iklimis_0-1730930943361.png

 


So now the issue in question: 
When creating a commination of images as a Library Item the Preview image is always of the Main Element (that has the child elements inside) 
In our case the Main Image would be a watermark and not the terrain imagery resulting in a preview that looks like this 


iklimis_4-1730931399083.png

 

 

Have you thoughts of resolving this issue ??

Thanks a lot 
Giannis

 

0 Likes
255 Views
2 Replies
Replies (2)
Message 2 of 3

kristoffer.dyrkorn
Autodesk
Autodesk

Hi!

 

Adding a logo and attribution information to a texture image (in the way of hierarchical storage / composition of multiple images) is not directly supported by the SDK. Here are two possible ways ahead: 


- One solution would be to blend in the logo and attribution information to the image itself, so it becomes one image, and then upload it. This requires more work before uploading the image, but the browser's Canvas API can support in the blending operation. Also, the image (with logo and attribution) will be completely self-contained. 
- to blend in the logo to the image itself, like the previous option here, but to store the attribution information as textual metadata. We already have support for storing textual attribution/licensing information about geodata inside Forma, but I don't think we currently expose this in detail via the SDK.

So, I think the best immediate solution here would be the first alternative - and in the mean time we could refine the SDK to support users providing attribution information when uploading terrain textures.

 

 

 

Best regards,

 

Kristoffer 

Autodesk Forma

0 Likes
Message 3 of 3

iklimis
Advocate
Advocate

Hey @kristoffer.dyrkorn, thanks for your reply

The thought about creating a Canvas and forming an image that embeds both the watermark and the copyright text had crossed my mind, and I actually tried it but the problem is when you try that approach the file gets 4,5 times larger When you draw an image onto an HTML <canvas> element and then retrieve it as a blob, it’s stored in an uncompressed format. 

That is quite an issue when the user downloads Terrain images with a lot of detail because  the time the image Buffer needs to be uploaded gets increased significantly to Forma Library.


The existing approach -creating a main Element and 2 child elements -works great with the only exception of the Preview Thumbnail . 

What it would be great as a feature and solve this issue would be a 'z-index' type of attribute when the Forma Element is being created. This would solve the layering issue when a terrain images is composed of watermarks and copyright texts.

something like this perhaps? 

iklimis_0-1731662008433.png


let me know your thoughts 
Giannis



0 Likes