Author Topic: Create Watermarks  (Read 2118 times)

2017-06-21, 15:50:42

Kilja

  • Active Users
  • **
  • Posts: 38
    • View Profile
    • Twitch
Hello

I sometimes have to put on Watermarks on the renderings, with the name of the architecture firm.
I could easily do it afterwards in Photoshop, but i hate every step i have to do outside of rendering, because even after the smallest change in the image you have to do the steps in Photoshop again. So i tried it in 3ds max, i made just a plane and put a material with the opacity map from the logo on it.

The Problem is in evening scenes the white logo becomes grey. And with self illumination it is white, but it is effected by bloom and glare which is not what i want.

How would you create something like this in 3ds max and corona?

Thanks for help

2017-06-21, 16:53:57
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5511
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Try this:
  • assign CoronaLight material to your watermark object
  • uncheck emit light
  • plug CoronaOutput map in to texmap slot
  • make sure affect by tonemapping is unchecked
  • plug CoronaColor texmap in to CoronaOutput's input slot
  • uncheck input values are in linear colour space
  • set desired colour
  • hit render and check result in VFB with right click inspection tool - pixel values should perfectly match as long as you won't be messing with tonemapping settings while rendering
I'm not Corona Team member! Everything i say, is my personal opinion only.
R.I.P. Niki Lauda

2017-06-21, 17:49:01
Reply #2

Frood

  • Active Users
  • **
  • Posts: 1223
    • View Profile
    • Rakete GmbH
There is no acceptable solution atm. for this unfortunately.

Before cVFB got all the advanced features which CoronaOutput could not fully reverse anymore, I used to had a plane linked to the camera with a material like romullus described in the max startup scene (examples and only one of many problems with such an approach - even if not using DOF or B&G which are the most obvious).

My previous solution for this (a max render effect, so nice!) did not harmonised with Corona at all.

I was about to request some map/mage overlay some time ago but declined because I do not want to have an even more complex VFB in Corona. But maybe... :]



Good Luck



Never underestimate the power of a well placed level one spell.

2017-06-21, 19:46:56
Reply #3

PROH

  • Active Users
  • **
  • Posts: 963
    • View Profile
Well, I would really like to be able to ad a logo/watermark directly in Corona VFR. Maybe a solution like the one in VFB+. Which by the way is free now :)

2017-06-21, 21:37:59
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5511
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I wonder who will be the first to ask post to facebook button in Corona VFB? :]
I'm not Corona Team member! Everything i say, is my personal opinion only.
R.I.P. Niki Lauda

2017-06-21, 21:49:20
Reply #5

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 2268
    • View Profile
I wonder who will be the first to ask post to facebook button in Corona VFB? :]

That's not a good idea.

As for adding a Post to Instagram in the Corona Image Editor so you can use all its filters and effects on your photos, well that's a different story! :)

2017-06-22, 00:06:58
Reply #6

Jahman

  • Active Users
  • **
  • Posts: 45
  • Panteleev Sergey
    • View Profile
    • some of my scripts for 3ds max
Pretty doable.
Change logo image path to yours.

Code: [Select]
/*
/ Script: Overlay custom logo over rendered image
/ Author: Panteleev Sergey
/ Year: 2017
/ Contacts: fatbbc @ gmail.com/
*/
try (destroydialog X ) catch ()
rollout X " Logo overlay by Jahman" width:250 (

spinner logoXoffset "x:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40 across:3
spinner logoYoffset "y:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40
spinner alphaMult "alpha:" range:[0.0,1.0,1.0 ] fieldwidth:40 scale:0.05

button preview "preview logo overlay"

local rend
local logo = openBitMap "C:\Users\User\Documents\firefox-256.png"

on preview pressed do (

try ( unDisplay rend ) catch()
rend = getLastRenderedImage()

if isKindOf rend bitmap and isKindOf logo bitmap do (

pasteBitmap logo rend [0,0] [ logoXoffset.value, logoYoffset.value ] type:#blend alphaMultiplier:alphaMult.value
display rend

)


)
)
createDialog X pos:[100,100]

2017-06-22, 07:16:10
Reply #7

Christa Noel

  • Active Users
  • **
  • Posts: 894
  • God bless us everyone
    • View Profile
    • dionch.studio
Pretty doable.
Change logo image path to yours.

hi Jahman, that's a nice idea, how did you read my mind :P

a suggestion:
to prevent string literal, you guys can add "@" to your filePath which will become
Code: [Select]
@"C:\Users\User\Documents\firefox-256.png"or
to change it to bitmap selection dialog, you use selectBitmap()
Code: [Select]
/*
/ Script: Overlay custom logo over rendered image
/ Author: Panteleev Sergey
/ Year: 2017
/ Contacts: fatbbc @ gmail.com/
*/
try (destroydialog X ) catch ()
rollout X " Logo overlay by Jahman" width:250 (

spinner logoXoffset "x:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40 across:3
spinner logoYoffset "y:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40
spinner alphaMult "alpha:" range:[0.0,1.0,1.0 ] fieldwidth:40 scale:0.05

button preview "preview logo overlay"

local rend
local logo

on preview pressed do (

try ( unDisplay rend ) catch()
rend = getLastRenderedImage()
logo = selectBitmap()

if isKindOf rend bitmap and isKindOf logo bitmap do (

pasteBitmap logo rend [0,0] [ logoXoffset.value, logoYoffset.value ] type:#blend alphaMultiplier:alphaMult.value
display rend

)


)
)
createDialog X pos:[100,100]




2017-06-22, 09:11:21
Reply #8

Jahman

  • Active Users
  • **
  • Posts: 45
  • Panteleev Sergey
    • View Profile
    • some of my scripts for 3ds max
yeah, logo deserves it's own button


ps. Another way one could approach this task is to use Mix or Composite map with .png logo and then just render this map.
What I like about it is that you have tiling and rotations right from the box.

Code: [Select]
/*
/ Script: Overlay custom logo over rendered image
/ Author: Panteleev Sergey
/ Year: 2017
/ Contacts: fatbbc @ gmail.com/
*/
try (destroydialog X ) catch ()
rollout X " Logo overlay by Jahman" width:250 (

spinner logoXoffset "x:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40 across:3
spinner logoYoffset "y:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40
spinner alphaMult "alpha:" range:[0.0,1.0,1.0 ] fieldwidth:40 scale:0.05
button selectLogo "pick overlay image" across:2
button preview "preview logo overlay" enabled:false

local rend, logo

on selectLogo pressed do (

logo = selectBitMap caption:"Select overlay image"
preview.enabled = isKindOf logo bitmap

)

on preview pressed do (

try ( unDisplay rend ) catch()
rend = getLastRenderedImage()

if isKindOf rend bitmap and isKindOf logo bitmap do (

pasteBitmap logo rend [0,0] [ logoXoffset.value, logoYoffset.value ] type:#blend alphaMultiplier:alphaMult.value
display rend

)


)
)
createDialog X pos:[100,100]
« Last Edit: 2017-06-22, 09:39:18 by Jahman »

2017-06-22, 11:25:32
Reply #9

Frood

  • Active Users
  • **
  • Posts: 1223
    • View Profile
    • Rakete GmbH
That´s a good start. What would be the options to make this mockup batch/BB capable with persistent values for x/y/path (and additionally scaling which I would do resolution dependend) per scene/maxfile? Could it easily be done as render effect? Or maybe as pre/post render script with persistent custom attributes + setup dialogue? I had a quick glance at the code of infoOverlay but could not figure out what to change to make it work with Corona. It seems the standard function for render effects "on apply()" is never called by max after rendering with Corona, only after pressing "update effect" or "update scene" in the effect preview options.

Thing is, the whole thing will be only really useable if it works automatically when rendering is done.

The map idea is interesting. What about having a standard scene map with a special name as container for the overlay which would be searched and used by the script? Maybe x/y/scaling/placement could be taken from it for alignment so no GUI is necessary at all. Would have a few advantages for a script quickie: Image access is already defined in the scene, asset tracking works, parameters would be easy to access/change and stored in the scene, post render script would only run if that special map exists. Not sure if this could work in practice, just quick brainf***s.


Good Luck




Never underestimate the power of a well placed level one spell.

2017-06-22, 13:41:16
Reply #10

Jahman

  • Active Users
  • **
  • Posts: 45
  • Panteleev Sergey
    • View Profile
    • some of my scripts for 3ds max
For some unknown reason 'on apply' works for scanline only.
But nothing could stop us from creating a #postRenderFrame callback inside 'on create' event which would then apply the effects after each rendered frame.
Since rendereffect has no 'on delete' event we can check If any rendereffect with particluar classid is present in scene and remove #postRenderFrame callback if there's no such effects exist.

But the main disadvantage of the scripted rendereffect is that we should somehow save it within a scene in order not to have problems when rendering over the network or opening. I mean Missing Dll issue.

Manual batch watermarking seems much safer for me.

2017-06-22, 18:51:26
Reply #11

Frood

  • Active Users
  • **
  • Posts: 1223
    • View Profile
    • Rakete GmbH
For some unknown reason 'on apply' works for scanline only.

At least not with Corona. I´ve been using infoOverlay with mr/iray without issues. Seems to be up to the renderer to do the call. Maybe for some reason Corona cannot/will not pass a valid VFB handle which is required.

But nothing could stop us from creating a #postRenderFrame callback inside 'on create' event

Yes, seems to be the only approach atm.

But the main disadvantage of the scripted rendereffect is that we should somehow save it within a scene in order not to have problems when rendering over the network or opening. I mean Missing Dll issue.

Cannot confirm. When you used one in a scene and you don´t have the (scripted) plugin installed you just get a notification about a missing plugin when opening the file, that´s all. Backburner/Batch/Renderfarm: No problem.


Good Luck


Never underestimate the power of a well placed level one spell.