Author Topic: Maxscript render to texture - How to remove error message and not show the vfb  (Read 3136 times)

2019-08-08, 15:02:15

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
This is the error message that I'm getting.

Code: [Select]
===== Warning(36) =====
Distributed rendering from a free (non-camera) view can lead to incorrect results.
If you see incorrectly overlapped objects, render from a camera view.

Then even with the vfb:off switch it still shows the vfb.

Code here:
Code: [Select]

fn shakeAndBake o pxl =
(
  local o = $
  o.iNodeBakeProperties.removeAllBakeElements()
  diffuseColor = Corona_DiffuseColor()
  diffuseColor.outputSzX = diffuseColor.outputSzY = pxl
  diffuseColor.fileType = (getDir #image+"\\"+o.name+"_diffuse.png")
  diffuseColor.fileName = filenameFromPath diffuseColor.fileType
  diffuseColor.enabled = true
  o.INodeBakeProperties.addBakeElement diffuseColor
  select o
  --This is where the vfb is set to off but it still shows
  render rendertype:#bakeSelected vfb:off progressBar:true outputSize:[pxl,pxl]
  )
theObject = shakeAndBake theObject 512
« Last Edit: 2019-08-08, 21:13:43 by 3dwannab »

2019-08-14, 12:28:38
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12758
  • Marcin
    • View Profile
Sorry, but I do not understand the issue. Can you please describe what you are doing and what is happening?

You are using Render To Texture feature via maxscript?
And then you are getting some error message, and you would like to close that error message and hide the VFB?
Is that correct?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2019-08-14, 12:35:09
Reply #2

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
If you select an object with a corona material applied and run that code above it gives an error in the corona error dialog like so:

How can this be avoided?


Regards hiding the vfb, it still displays even though vfb:off is in the bakeselected function.

2019-08-14, 13:15:03
Reply #3

rowmanns

  • Corona Team
  • Active Users
  • ****
  • Posts: 1892
  • Corona for 3ds Max QA Team
    • View Profile
Hi,

That error message only should appear if you have DR enabled when rendering with a non camera view.

Is there a chance you have DR enabled?

Thanks,

Rowan
Please read this before reporting bugs: How to report issues to us!
Send me your scene!

2019-08-14, 16:54:01
Reply #4

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
That was it. Thanks, it's always the simplest things. I thought it had something to do with the bakemap function.

Is there a way possible to not open the vfb during rendering out the baked maps inside the bakemaps fn with vfb:off?

2019-08-15, 10:04:55
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12758
  • Marcin
    • View Profile
So you had DR enabled, and that's why the error message would pop up? Right?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2019-08-15, 10:11:51
Reply #6

rowmanns

  • Corona Team
  • Active Users
  • ****
  • Posts: 1892
  • Corona for 3ds Max QA Team
    • View Profile
Hi,

Are you talking about the Max VFB or the Corona VFB?

If it's the Corona VFB you can use something like CoronaRenderer.CoronaFp.showVfb(false) to hide it.

https://corona-renderer.com/wiki/maxscript

Cheers,

Rowan
Please read this before reporting bugs: How to report issues to us!
Send me your scene!

2019-08-15, 10:35:47
Reply #7

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile

So you had DR enabled, and that's why the error message would pop up? Right?

It wasn't a scene created by me, it was from someone else.


Are you talking about the Max VFB or the Corona VFB?

If it's the Corona VFB you can use something like CoronaRenderer.CoronaFp.showVfb(false) to hide it.

https://corona-renderer.com/wiki/maxscript
Corona. Ok, I know of that method. It's just I thought that it should not show with vfb:off.


Thanks.