Closed martijnrondeel closed 10 years ago
Hm, I haven't tried the scripts on windows, can you attach the jsons in question?
Compressed the files into a .zip: http://www.mediafire.com/download/msykpcmn5hokt47/z1.zip There are 5 .json files (z1, z2 etc.).
Okay, I tried to run the script on linux, and things seemed to work fine, so I'll have to try on windows next. Bear with me. While I'm doing that, can you tell me what python version you are using? I'm also not familiar with Anaconda, so I'm not sure if there are any relevant changes to look for in there.
I am using Python 2.7.8. Anaconda is basically a package for windows that comes with PIP and alot of other packages installed.
Don't worry about getting it to work with windows too much, I have managed to get it working on Debian. However, it generates .json files, shouldn't it generate .cvf files?
Not to my knowledge, no, Chunky uses .jsons as input, as does the command line renderer. If you're already on debian, fire up a python prompt:
NumberOfFramesGenerated=<someNumber>
for i in range(NumberOfFramesGenerated):
subprocess.call(["java", "-jar", "/path/to/ChunkyLauncher.jar", "-render", "interpolated-"+str(i), "-scene-dir /path/you/specified/as/output/directory", "-target 50"])
Replace 50 with whatever you see fit, but it will take a while whatever you set it to. Update: I see the documentation still states .cvfs will be generated, let me just fix that.
I am using this script to render:
#!/bin/bash
for i in seq 0 1001; do
echo "rendering:" $i
java -jar ChunkyLauncher.jar -render interpolated-$i
done
However, because the scene was made on a Windows machine in every interpolated-$i.json file there is this line:
"world": {
"path": "C:\\Users\\Martijn\\AppData\\Roaming\\.minecraft\\saves\\Project_Zombie",
"dimension": 0
}
I have the world save now downloaded to my debian machine, but that'd mean I will have to change that path line in 1001 files hehe. Any idea how I could solve this?
Yes I encountered that issue once, when I too edited scenes on Windows. I think this would be a valuable feature to have, a command line switch to change the paths, but for the time being, edit the input jsons by hand, and rerun Chunkymator on them. (You'd still have to some jsons, but not 1001 of them) Alternatively, you could use sed, but I wouldn't want to have to escape all those backslashes.
Update: Actually, scratch the last. The last json is duplicated and then manipulated. So if you only change the file path in the last input json, that should be used in all the outputs.
Alright, managed to get it all working :+1: Thanks for the help! I'll post the result in /r/Chunky once it's done (probably takes a few days hehe).
I'd actually try running it at a low target (~5) and see if it is working first. I'm still hammering out some camera angle issues.
Will try that now.
Ok running 1001 renders now at 3 SPP each, when that is done, what'd be a good program/script to turn them into a video file?
I use:
ffmpeg -f image2 -i interpolated-%d-5.png -r 25 test.avi
Replace 5 with your target SPP. But ffmpeg seems to be such a moving target, I have no idea if these switches will make sense on your platform. In any event, I'm using ffmpeg 0.10.12
I've just pushed a new version, if you have any camera issues, try using the new version. (44c0eb592463cb39417e66c38ce09cfa1ab65dab) You can also turn the images into a video before all of them are completed, so you should have a good inkling on whether the frames rendered are okay.
Works really nice so far: http://youtu.be/hufDXy2pgT8
I'm wondering, is the sun interpolated too? Because that'd make even cooler videos. And which java params would you recommend to use (if any) with Chunky?
I started work on that, but I haven't finished it. I'll try to have that done today, but I'd appreciate it if you could test it.
I've got what seems to be working on branch sun (28e2f0e08579a89c9add514be9c17a08e1ccab5a). Give it a go when you can. Of course, if all the inputs specify the same sun position, nothing interesting will happen. So try to have the sun moving across the sky between frames.
I'll test that now!
Ok first thing I tried was having a scene with no movement except the sun that goes from the front of the building to the back (like a 360). This doesn't work because the program expects that there is movement/doesn't see the sun as correct movement.
Will try one now with movement and sun movement.
The reason you can't have just a sunset (appealing as that would be) is that the length of the video is calculated from the distance traveled.
It seems like there are still camera issues. This is the first waypoint for the animation, it's meant to look like this:
But it gets rendered like this:
And is this from the latest on Sun branch?
Yes
I'll run some more tests tonight, to see what the hell is going wrong. Is the sun moving as expected?
Wasn't able to see that because the render was off, but I'll try make one now where it should be displayed.
Whatever I do, the render keeps oriented like this:
Instead of being aimed at the ship. Here are the .json files: http://www.mediafire.com/download/96iankcdn55a2z8/x4.zip
Well as a testcase, you could approach the ship from the other side. But if you're up for it, take a look at https://github.com/matthiasvegh/Chunkymator/blob/master/morph.py#L38. Whatever the solution is, the problem is located there. So try -pi/2, +- pi, removing it altogether, I'm really not sure. I'll be playing with it today, but if you manage to fix it before I do, you're more than welcome to send a PR.
One thing before I do my analysis, the current behavior is to always for the camera to always look in the direction of travel. Can you check if this is what is happening?
Ahh, I set the render up to always stay focused on the ship and just move sideways. If it looks into the direction of travel that explains why the ship isn't in the render.
I previously interpolated the camera angle as any other parameter, but the oscillations were quite unsightly, so this approach seemed to make more sense, but if you would like to be able to strafe like this, open up an issue for it, and I'll see if I can add a switch for it.
Alright I'll do that.
Getting this error when using Chunkymator to generate files from 5 .json points: