Wish: Add logo / Watermark to render

Hi guys, I have a wish for Rhino that would speed up work when rendering and that is a post effect to add an image (logo) on top of renderings.

When sending renderings off to clients it’s often nice to add a logo on it and that requires a bit of work in Photoshop to do, but it isn’t a difficult task, just time consuming.

Would it be possible for you to add this to the wish list?
What we would need is quite simply the ability to choose alignment, offset and size.
Alignment would be Top/bottom and Left/right + an offset.
Offset would be in X and Y in pixles or &
Size would be in pixles or in % of width of rendering. (it should always be 1:1 IMO so one (the width) dimension should be enough)

Cheers

7 Likes

Excellent wish!

I see a variety of watermark “wish items” in YouTrack both for Printing and Rendering.
The watermark item is captured and we know about it.
I just don’t have any idea what the development priority might be.

I fully understand :slight_smile:
And it would only happen if those working on the post process pipeline would think it’s a good idea too. I would love to see many things happen in the post process stack so shout when and if it’s worked on.
It would be handy though. (I guess I already wish for the ability to add text there too… with tagging of date and viewport name too :wink: But a single image in a corner would go a long way for a long time, but it would need to support alpha channels of course… :wink: )

1 Like

Based on reading through the internal discussion notes on the multiple YouTrack items surrounding this feature request, I’m confident the developers are well aware of the need. It looks like it ended up being more complicated.
What appears to be substantial work has been done, but not finished, and nothing ready to expose to customers yet.

Cheers

a related more general purpose wish I’ve asked several times in the last decade or so is adding a foreground image (as opposed to background image). Something that will fill the entire viewport, and with a transparency channel will show its content on to of the viewport content.

These will be extremely useful for thee things super useful things:

  1. Title/logo artwork (like a manual way of watermarking/labeling)
  2. Vignetting (so I can put a white faded airbrush around the perimeter of the viewport so the viewport boundary does not hard clip ground shadows.
  3. Perspective matching with foreground/occlusion objects. Example: I want a photo of a hand holding a 3D model of a coffee cup: some fingers will be in from of the cup some behind. So I need a foreground + background image (unless we want to get fancier with alpha channels that send portion of the image to the foreground)

I love the idea of a smart/procedural watermark feature like @holo is asking, but in the meantime a _ForegroundImage that’s general purpose for multiple uses will go a long way, and it would be a nice V7 feature to brag about in your press releases.

There’s a lot of clarity that this will help a lot of users, in a lot of industries, in many skill levels. The only question I have now is:

How many likes to this post do you need to make it happen?

Best,

Gustavo

5 Likes

If I knew that, I’d be a rich man in short order.
Sadly…

This sounds like a potential addition to the post effects system @andy. If it were just view captures, I would say someone could hack together a foreground channel conduit for experimenting.

2 Likes

That’s great to hear Steve. Currently about 90% of the images we produce for internal and client reviews are realtime viewcaptures, and the other 10% is done in Octane/Vray so any Rhino’s rendering post-process will not help us. I hope you can take this into account.

Best,

G

1 Like

Looks like there are a few functions I need to add to RhinoCommon before we can prototype anything with a script. I’ll see if I can get these added this week.

6 Likes

That sounds great, in fact my main wish is actually to have a realtime foreground feature, but since that was an old wish I though maybe a different approach through the renderer post effects could be easier to wish for :smile:

Added a few new functions to RhinoCommon last week. Specifically, I added the ability to load an image from a URL and the ability to draw a non-square sprite.

You need to be using the latest WIP for this to work.

Run the following python script to get something like this

import Rhino
import System.Drawing
import scriptcontext
import rhinoscriptsyntax as rs

class CustomConduit(Rhino.Display.DisplayConduit):
    def __init__(self):
        url = 'https://gist.githubusercontent.com/sbaer/bebd530d103a56cdd0076156af66f54b/raw/a92efce9ef85fd09316a42afcd899bd0e2d19b15/greetings.png'
        self.image = Rhino.Display.DisplayBitmap.Load(url)

    def DrawForeground(self, e):
        size = e.Viewport.Size
        center = Rhino.Geometry.Point2d(size.Width*0.5,size.Height*0.5)
        imageSize = self.image.Size
        scaleX = size.Width / imageSize.Width
        scaleY = size.Height / imageSize.Height
        scale = scaleX
        if scaleY > scaleX: scale = scaleY
        width = scale * imageSize.Width
        height = scale * imageSize.Height
        e.Display.DrawSprite(self.image, center, width, height)

if __name__== "__main__":
    conduit = CustomConduit()
    conduit.Enabled = True
    scriptcontext.doc.Views.Redraw()
    rs.GetString("Pausing for user input")
    conduit.Enabled = False
    scriptcontext.doc.Views.Redraw()
5 Likes

That looks really cool Steve. Any ideas of how that could be turned into something that humans also could use? And why images from an URL and not a local folder?

Thx,

Gustavo

1 Like

@Holo can probably tweak this to be useful to humans. Local paths to files are already supported in the SDK, I just added URL support in order to make this easier for me to publish the sample.

2 Likes

@Holo,
holo_holo

1 Like

Challenge accepted and thanks for the confidence! :wink:
I just have to rebuild my homecomputer first, replacing an AMD card with a new RTX 2060 Super and setting up a raid after a harddrive crash, so I don’t think it will be done in the first two days though.

I am using the full path trace rendering mode of my Rhino model and in the post effects I see a watermark option. I click the plus sign and set my font size, color and transparency but the never see a place to add the text for my watermark. Any ideas?

Yeah, well, it doesn’t seem like I am a fast computer builder, does it… :smiley:
But the computer runs like a dream and truth is that I totally forgot about this promise…

UPDATED TO LATEST VERSION
None the less, here is a plugin for you to test. It asks you to locate a PNG (to support transparency) and then sticks it in the upper right corner of all views. (It does not work for rendering, but works for raytraced)

There are three commands:

  • LOGO_FULLSCREEN
  • LOGO_FULLSCREEN_OFF
  • LOGO_FULLSCREEN_REMOVE

-The first one will ask you for a png to use (if you cancel it will still run fullscreen) and then store that file location for the next times you use it on that Rhino file. (Sticky value)
-The second one turns off the display conduit
-The third one deletes the sticky values (both image path and conduit) so you can choose another image next time you run the first command.

EDIT: THIS HAS NOW BEEN UPLOADED TO THE PACKAGEMANAGER

Install instructions etc can be found in this thread at post 35

TODO:

  • Rename the plugin since it now works on all views.
  • Make a better alignment at the top corner for logos that are taller than wide.
  • Command to set the % size of the computer screen for the Logo to use.

@gustojunk
please test it out and report all kinds of issues, wishes etc.
If/when it’s OK then I’ll push it to food4rhino / packagemanager.

3 Likes

STATUS UPDATE:
OK, I just realized I could add the conduit and just leave it on.
EDIT: The updated version is in the post above

Then it stays on for all viewports even after mode changes and that way we can use viewcapturetofile to save it to disk (as a form of rendering).

This also works if the viewcapturetofile has a multiplier for size like here where I used 2x (it was a small view to begin with):

And then I store the conduit name as a sticky value and that way I can turn it off again when ever I want from another command. That’s even cooler than running it only in fullscreen for a moment.

I’ll work on the image size and placement when I have time and I’ll make an update.
Just bug me if it takes too long :wink:

image

-Pascal