Logo in Rhino Canvas

Hi everyone,

I wonder if there is a way of set a logo in the upper right corner of the rhino canvas by using GH such as in this image:

Is that a wallpaper? Or you do it differently?

Thanks in advance

You can draw a bitmap in screen space:

Thanks for the Info @AndersDeleuran always very helpful. Just one question, when zooming out or navigate through the canvas how I can be sure the logo is still in the right position. I understand that the bitmap refers to a 3d point in rhino space

1 Like

Here’s a quick go, where we compute the (2D) point position using the viewport and bitmap information:


02_DrawEmbeddedSpriteBitmap_CowiRightUpperCorner.gh (10.3 KB)

2 Likes

Wow, thank a lot @AndersDeleuran , that is awesome!

1 Like

No worries. One thing though: Note how the colors fade when using a rendered viewport:

Because of the gamma/linear workflow washing colours out. I’m not sure how to avoid this yet for screen space drawn stuff. I’m sure there is a better solution (e.g. using a different method than DrawForeground, or McNeel fixing this potential “bug”), but setting the gamma to 1.0 and adjusting the shadow/material settings accordingly is a workaround:

1 Like

I just recalled this topic and replacing DrawForeground with DrawOverlay appears to solve the gamma issue:


02_DrawEmbeddedSpriteBitmap_CowiRightUpperCorne_01.gh (10.2 KB)

2 Likes

One last thing @AndersDeleuran . Do you have tht component updated to R8? It appears as an old. Also is it easy to scale the logo?

I wouldn’t recommend using the new script editor yet, but the code probably also works in its IronPython mode.

You can multiply the bmw and bmh variables by an input parameter (e.g. similer to the Offset parameter). Or simply resize the logo png prior to encoding it (which is using this code by the way). Edit: There we go:


02_DrawEmbeddedSpriteBitmap_CowiRightUpperCorne_02.gh (9.8 KB)

1 Like

Again I can’t recommend using it, but this appears to work:

1 Like

Thank you veeery much for your help @AndersDeleuran . I suppose you do not recommend it yet due to the amount of bugs users are finding. I will give it a try. Thanks again for the help! :slight_smile:

1 Like

Indeed, it’s unfortunately still not ready for production (in my opinion/experience). One day :pray:

1 Like

Ohh awesome! This has been bugging me! I’ve been trying to keep graphics consistent across display modes. Thank you I’ll try these methods

1 Like