Author Topic: Animated RTT/baked maps do not save  (Read 3758 times)

2018-02-14, 18:04:29

casinowilhelm

  • Active Users
  • **
  • Posts: 31
    • View Profile
Hi there - I'm trying to bake a sequence of texture maps in the usual way that works with all other renderers. However, Corona only saves one frame (frame0000) and then overwrites it continually with each new frame it bakes. So it is impossible to bake a sequence.

I saw the earlier bug about RTT not saving at all unless you have "elements active" ticked on the render elements. That is still the case, but this is specifically about baking sequences.

Using corona 1.7, 3ds max 2017.
« Last Edit: 2018-02-14, 18:39:42 by casinowilhelm »

2018-02-14, 18:53:48
Reply #1

casinowilhelm

  • Active Users
  • **
  • Posts: 31
    • View Profile
In the meantime I hacked this script together, which does it one frame at a time

Code: [Select]
fn BakeBeautyCorona Fnum chan obj size =
(
--Clear all render elements
obj.iNodeBakeProperties.removeAllBakeElements()

--Preparing the Bake Elements:

be2 = Corona_Beauty() -- instance of the bake element class
be2.outputSzX =be2.outputSzY = size --set the size of the baked map --specifythe full file path, name and type:
x = (Fnum as integer)/TicksPerFrame
formatNum = formattedprint x format:"04d"
be2.fileType = (getDir #image+"\\"+obj.name+"_beauty"+formatNum+".png")
be2.fileName = filenameFromPath be2.fileType
be2.enabled = true --enable baking

--Preparing theobjectfor baking:
obj.INodeBakeProperties.addBakeElement be2 --add second element
obj.INodeBakeProperties.bakeEnabled = true --enabling baking
obj.INodeBakeProperties.bakeChannel = chan --channel to bake
obj.INodeBakeProperties.nDilations = 1 --expand the texture a bit
select obj --we are baking the selection, so we select the object

        --Call the renderer to bake elements:
render rendertype:#bakeSelected vfb:off progressBar:true outputSize:[size,size]
0
)--end fn


--set your frame range here in frames
for frameNum = 0f to 10f do
(

--Call the Bake function with the object and the desired size
--format: BakeDiffuseAndLighting frameNum channelToBake objectName resolution

BakeBeautyCorona frameNum 2 $object1 512
BakeBeautyCorona frameNum 2 $object2etc 512

slidertime  = frameNum

max select none
)
« Last Edit: 2018-02-15, 11:30:14 by casinowilhelm »

2018-02-14, 19:23:28
Reply #2

Njen

  • Active Users
  • **
  • Posts: 557
    • View Profile
    • Cyan Eyed
All you need to do is use a UVW XForm modifier, then animate the u and v coordinates using negative integers corresponding to how many UDIMs you have. Btw, this is not an issue with Corona, it's how Max works, as there is the same behaviour when using Scanline.

[Update] I just realised that you are probably talking about rendering out the same map over time, rather than multiple UDIM tiles, right? If so, then my comment doesn't really apply.
« Last Edit: 2018-02-14, 19:27:53 by Njen »

2018-02-15, 11:01:47
Reply #3

casinowilhelm

  • Active Users
  • **
  • Posts: 31
    • View Profile
Thanks, yes I was talking about rendering the same map over time. Although UDIM support in corona would also be great :)

2018-02-15, 16:01:38
Reply #4

casinowilhelm

  • Active Users
  • **
  • Posts: 31
    • View Profile
The problem with my hack is that it sometimes fails randomly with this message: "error in configuration file config-'c:\users\mike\appdata\local\autodesk\3dsmax\2017 - 64bit\ENU\plugcfg\corona\15532570.conf' correct/delete it and restart 3ds max"

So it would be great to get this bug fixed properly.

2018-09-04, 16:41:17
Reply #5

Pedrodeleo

  • Users
  • *
  • Posts: 2
    • View Profile
Hello there casinowilhelm!

Did you get any solution for this problem?

I've been cracking my head for a few days and finally solved the mystery, but could'solve the problem itself.
I also tried to run your script with no success, but the problem in this case is probably between the computer and the chair :)

I put an attachment of one of my failed attempts, if you can shed some light to help me I'd reeeeally appreciate a lot!

And let's wait for the final and real solution with full support to animated render to texture anytime.

2020-05-21, 14:42:05
Reply #6

casinowilhelm

  • Active Users
  • **
  • Posts: 31
    • View Profile
Well it's 2020 and this bug is still ongoing :)

2020-05-21, 15:02:54
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9255
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Sadly it looks that idea to fully support RTT was completely abandoned by Corona team. It's not even on roadmap anymore :[
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-05-22, 11:51:51
Reply #8

casinowilhelm

  • Active Users
  • **
  • Posts: 31
    • View Profile
Possibly true...
« Last Edit: 2020-05-22, 12:04:44 by casinowilhelm »