By deoli
#291678
Hello,

First of all thanks to JD et al for the new plugin. Although I still have to find a way to quickly and easily convert my old scenes, it is the FUTURE!

One of my old scenes I need to revise is this project for a family home:

http://www.youtube.com/watch?v=lF0_N42CEhc

This walkthrough was done about one and a half years ago with the then availible tools. But when I try to export an animated camera with C4D11/MW171/Plugin183, for every frame rendered the camera stays in the same position.

Opening up the .mxs files for frame 0015 for example, I see there are 16 cameras in the scene, one for each frame from 0000 to 0015 - so far so good.

The active camera is cameraname14 (the highest numbered, and last in the list) but it's position is as for frame 0000; position for frame 0001 is the first in the list and just called cameraname (no number); frame 0002 is cameraname0; frame 0003 is cameraname1; and so on. So, for frame 0015 the view I want to get rendered is in fact cameraname13!

Is this done by the new plugin? Or is this to do with C4D11? When I open up the original .mxs for frame 0015 (rendered in 2007) there is only one camera at the right position.

Sorry for faffing around, I just spent all night getting the scene ready only to realise this after a couple of hours sleep... yawn.

Thanks for the help.
By JDHill
#291683
Hi deoli,

Thanks, you found a new bug. It took only a couple of minutes to find the problem, so it will be fixed in the next update. I tried to write a COFFEE expression you could use as a workaround, but unfortunately it doesn't look like that's possible.

JD
By deoli
#291686
Thanks for the quick reply. At least now I know what to do for the rest of the day: export frame by frame... 8) yeah!

I'll look into COFFEE... and make some too, that's exactly what I need!
By deoli
#291700
By the way, are animated textures supported? Is there something I'm missing? I don't seem to be able to make them work with MW. It's a simple image sequence applied to the color slot, so the only thing that changes from frame to frame is the texture reference.
By JDHill
#291704
This is working fine here:

- create a material
- move to frame 0
- set path in color channel
- add keyframe
- move to frame 1
- set a different path
- add keyframe
- move to frame 2
- set a different path
- add keyframe
- render frames 0-2

I assume this is similar to what you're referring to?
By deoli
#291707
Erm, no, actually I was talking about the "Animation" tab in the Texture Channel of a C4D material where you can assign an image sequence directly to a material without the need for keyframing.

But thanks for giving me the obvious idea... :roll: although it means more manual frame by frame labor. Definitely need to sort the COFFEE situation out, (or) I'll be here all night...

Thanks a lot!
By JDHill
#291710
Well, as far as I know, the Animation tab will not work, since it's meant to be used with things like .avi and .mov movies, which are not supported by Maxwell for use as textures. About the camera-animation issue, I was saying that it will not be possible to fix it via COFFEE, but let me see if I can come up with a batch file or something...check back here after awhile.
By deoli
#291714
Sorry I take that back! - Animated textures DO work! But only when exporting with "Options/Export Animation" and "Procedurals/Render to disk" checked. That's awesome! (I've only tried image sequences - I might try .avi or .mov later)

But then that's where my initial problem comes back to haunt me - since, with the animated camera bug, I can't export the whole animation, but have to do it frame by frame:

The thing is, the filename of the created procedural texture is always called color_AniMat_m1_f0000.tga when exporting single frames, so the file gets overwritten for each following frame. Erm, I suppose the f0000 at the end might be a good place to reflect the frame (in the original scene) the texture applies to? Don't know if that's possible. When exporting an animation the framecount rises but it always starts with f0000, even if I export frames 50-80 of the C4D scene.

Sorry about the COFFEE, I was getting carried away with the obvious pun :P . But if you could find a solution, and it's not too much hassle, that would be HUGE!
By JDHill
#291716
Yes, you will need to render out the animation, due to the animated texture aspect. I have a couple of ways to do that. First, using a .bat file:
Code: Select all
mxcl -mxs:camanim_0000.mxs -camera:Camera  -d -nowait
mxcl -mxs:camanim_0001.mxs -camera:Camera  -d -nowait
mxcl -mxs:camanim_0002.mxs -camera:Camera0 -d -nowait
mxcl -mxs:camanim_0003.mxs -camera:Camera1 -d -nowait
mxcl -mxs:camanim_0004.mxs -camera:Camera2 -d -nowait
mxcl -mxs:camanim_0005.mxs -camera:Camera3 -d -nowait
mxcl -mxs:camanim_0006.mxs -camera:Camera4 -d -nowait
mxcl -mxs:camanim_0007.mxs -camera:Camera5 -d -nowait
mxcl -mxs:camanim_0008.mxs -camera:Camera6 -d -nowait
mxcl -mxs:camanim_0009.mxs -camera:Camera7 -d -nowait
mxcl -mxs:camanim_0010.mxs -camera:Camera8 -d -nowait
So, the output name of the scene was 'camanim', and the camera was 'Camera'. You would need to modify this to work with your mxs and camera names. If you see, the sequence for camera names is [frame - 2], except for the first two, which will be using the normal camera name.

Another way is to use a .vbs file, which looks more technical, but is much easier to adapt to different animations:
Code: Select all
sub main
  
  dim mxs, cam, i, maxFrame

  mxs = "camanim"
  cam = "Camera"
  maxFrame = 10
  
  dim shell
  set shell = CreateObject("WScript.Shell")

  for i = 0 to maxFrame
    
    dim mxsNum, camNum
    
    mxsNum = right(cstr(i + 10000),4)
    
    if i > 1 then
      camNum = i - 2
    else
      camNum = ""
    end if
    
    dim cmd
    cmd = "mxcl -mxs:" & mxs + "_" & mxsNum & ".mxs" 
    cmd = cmd & " -camera:" & cam & camNum 
    cmd = cmd & " -d -nowait"

    shell.run cmd, 1, true
     
  next

end sub

call main
Here, you just need to modify the 'mxs', 'cam', and 'maxFrame' assignments near the top of the procedure to suit what you are exporting.

So basically:

1. use the plugin to render out the animation and close down MXCL when it starts rendering
2. open the animation output folder in Explorer
3. right-click > New Text File to create a .bat or .vbs file, whichever you prefer
4. open the new file and copy the text or code above
5. edit the text/code to suit your mxs and camera names
6. save the file, then double-click it in Explorer

Let me know if this helps.
By deoli
#291718
Wow! :D

I might just have some WINE after all that COFFEE :lol: , here... let me pour you some.

I'll have to adapt it a bit, since I'm rendering on several machines, but you definitely saved my day (and night).

Thanks a lot :!:
Maxwell Render training

Also, feel free to ask here - if there is no tutor[…]

Can anyone tell me where I can download older plugins?

I need Sketchup Version 4.2.4 - 14 Jan 2020

Why the sphere don't reflect the ground? are you h[…]

ilgioma - Gallery

Thanks tim :D :D Leo