NokiMo
SkinRays
SkinRays

patreon


Tutorial Post 1: From Renders to Movie

Am going to start a tutorial series about how these videos are made. Will make videos about it if can get good at that kind of video. Will need to use a discord voice changer or the computer voice for narration, probably the voice changer since the computer voice still makes weird mistakes with how she pronounces things.

This is more a quick note to explain why the renders need adjustment to color sometimes to see the texture of her black hair and other things. The reason is that am trying to use the full range of color available. My target is an Oculus GO and that's what I use to watch and check the videos. In DeoVR the color settings need a contrast reduction of maybe -5% and a brightness boost of maybe +8% for these Dark Queen videos. Maybe it is my mistake, but one reason this happens is that am using the "yuvj420p" pixel format instead of the usual "yuv420p" format that 99% of videos use.

This J format uses all 256 levels of R, G, B not just 240 levels. The reason for 240 / yuv420p is historic I guess, TV broadcasts didn't want to use the extreme ranges for some reason. If interested in the details John Carmack last year wrote about it and so it has been how SkinRays videos are made ever since. All this is to say once the frames are rendered, the ffmpeg command to assemble the frames into a movie goes like this:

ffmpeg  -start_number num -framerate fps -i input-LR%03d.jpg -c:v libx264 -preset fast -crf 18 -x264-params mvrange=511 -maxrate 50M -bufsize 25M -pix_fmt yuvj420p -movflags +faststart output.mp4

You can find reasons for all the other settings here. Maybe once I get a Quest 2, if I get a Quest 2, the settings might change but maybe not for awhile; there are lots of GO's out there. If can get a noticeably higher quality on the Quest will post multiple or assume you can find them on vrporn.com or a place that will take a high quality upload and make lots of options for download. Looks like they compress things so the 4K downloads are 1/5 the size of my uploads! Probably I use a much higher bitrate than necessary, but am just following the guidelines.

Assumes am in a directory of frames named input-LR001.jpg, input-LR002.jpg (if the first frame is in range 0-4 you don't need the -start_number num at the beginning.) The -LR001 suffix in the name is a SkinRays convention from the previous step in the process. A script assembles a two-eye LR frame from a Left eye render and Right eye render, named input-L001.jpg and input-R001.jpg, respectively. The prefix input can be anything of course and can include the directory in the prefix.

The dark Dark Queen frames got me started and have been taking too long to start this anyway, so just had to pick something and go. This is probably less interesting to people than the stuff that goes on in Daz Studio to make the render in the first place. That will be a video series I think so might not be ready for a bit. Could make a text post first maybe but by now most people's eyes are glazed over.

Comments

Sorry for the late reply! You probably already figured this out, but here's my answer anyway! ... There's still a -framerate option I just checked with the latest (April 4 2022) version. It only works with images not video input, so maybe you tried it with a video? I would have to see your ffmpeg command to be sure. I see what is happening though. ffmpeg default framerate is 25fps so you got a clip 500/25 = 20s long. I am guess your -r was after your -i so it just upconverted the output framerate from 25 to 60. The animation speed is still 25fps but frames are being repeated to hit 60. Putting the -r after the -i repeats (or drops) frames to hit a target fps, but animations stay the same speed. You need -framerate before the -i with images (or -r before the -i with a video) to set speed of the animation since that's the ffmpeg ingestion speed. I should make a post about this, it confused me too at first. For what you want to do, this is how I would do it, using defaults to keep the example simple: "ffmpeg -framerate 60 -i frame%02d.jpg clip.mp4" followed by "ffmpeg -stream_loop 9 -i clip.mp4 -c copy clip_looped.mp4" (-stream_loop 9 will loop it 9 times after the first time, you always have to subtract 1 with -stream_loop. I've had to get very familiar with ffmpeg over the last few years! I use it instead of a video editor, for pretty much everything.)

Has ffmpeg changed options since this? I'm using version 2022-03-07-git-e645a1ddb9-full_build-www.gyan.dev. The "-framerate FPS" option doesn't do anything, help file shows "-r FPS". I'm trying to create a 60 fps video. I've create 50 frames, which I've duplicated 10 times for looping, total of 500 frames. My video says it is 60 fps, but it shows as 20 seconds long, so playback is slow motion. Not sure where it came up with 20 seconds out of this input.

Epicuren

Ok, thanks for letting me know. Didn't have any problems using the section plane the other day. Maybe it's been fixed.

actually it sends out the rays as a first step in path tracing so never mind, maybe it would be 2x faster.

also, daz will crash if you use section planes in the latest version 4.14, you need to turn section caps on. That's a new setting in Render Settings when using iRay.

Found this camera that has two section planes built in so can clip scene to the fov. Only need one plane for 180 so I don't use it, but fyi (need to copy/paste link they don't seem to work in comments): https://www.deviantart.com/heroineadventures/art/Iray-Interior-Camera-V1-4-758604718

That's a clever little trick, thanks for that.

True but it isn’t twice as long to do 360 as 180, all the light calculations take the same amount of time up front before it takes into account the viewport. But Daz could allow us to access stereo rendering which I think iRay already can do, just isn’t something Daz passes along to us. Here’s a trick though: put a section plane as a child to the camera (same position so zero out the translation) but rotated along X axis 90 degrees (maybe -90 forget without checking.) This will cut out all the scene stuff not in the 180 frame so less time is spent on it. also let’s you use outdoor dome light indoors without needing windows to do it all. Thing is it can cut out realism by removing stuff you might need for reflections or shadows. Still, it cuts down render time lots.

It's a shame daz doesn't provide some support for VR (like blender), because native180 would massively cut down on render times.

that’s right

Ok, so you're rendering a full 360 image and then cropping it?

For 180 I use those same two cameras, but keep only half of each image (centered)

I'm interested to know how you render 180 degrees in Daz. I can do 360 images using two spherical cameras set 6.4cm apart, then stitch them together afterwards. But I can't work out how to do 180 degrees.

thx it is pretty simple but i guess was just trial and error. hope to get to it soon

This is fantastic, thanks. I'm very interested in your process, especially how you figured out the Daz settings.

DoCK


Related Creators