Impressive work!!!
I’m really curious about the modification on the camera actor…I mean, the actual focus is always done in keyframes or the modification on the class improve some aspects?
Impressive work!!!
I’m really curious about the modification on the camera actor…I mean, the actual focus is always done in keyframes or the modification on the class improve some aspects?
Inspiring work! I really love the feel of the camera shots!
The internet is a wonderful thing for that
Impressive work! I would personally add a little bit wind to your trees
Beautiful work, only thing I see is that in the last pic you might want to bring in the camera a bit since you can see some areas where there are fewer details(trim, rubble seams, etc.). Every other picture looks excellent!
Technical breakdown of RinCity Train Station.
RinCity Technical breakdown:
A. Unreal 3 to Unreal 4 asset conversion.
B. Physical Based material cheat/shortcut (Master Material).
C. HDR lighting n Lightmass.
D. True focus Camera BluePrint.
E. Output.
F. Summary for the conversion.
A. Unreal 3 to Unreal 4 conversion:
Things that I did for the conversion:
There’s no longer ASE support (which is what I typically use for simple static meshes)
There’s no longer VERTEX Lighting bake support.
(took me 5 days every night to complete LM for all the assets).
There’s no spline actor to mesh conversion export from UE3.
There’s no BSP UE3 to UE4 export.
Location and rotation from the original scene.
Vertex re-paint.
Scale in UE4 finally do 1 unit 1 cm.
Having all my source files, makes a non issue.
Make profile for FBX static mesh export in to speed things up in export.
(important one to check: Smoothing groups, Tangents and Binormals, and Preserve edge orientation.)
No vertext lighting, means lightmaps (spelling gave me a headache already lol).
I decided to use lightmap for my indirect lighting for quality and performance test reasoning. (UE3 scene was using indirect lighting bake too.)
The technique I use is to break the geometry, do UV unwrap in planar as much as possible, then copy it back to the original mesh as UV2 (or whatever desired).
3. Spline is used for the UE3 hanging rail. Spline actor export from UE3 only shows the spline point, and doesn’t show anything other than that.
The way I solve is to export part of the scene to obj and recreate the spline object as best as I can and export it as a single static mesh for UE4 (and lightmapped it too off course XD).
4. Was thinking to re-create BSP, but ended up thinking it’ll take too much time. Ended up with pretty much an obj Export from UE3,
cleaned the triangle, set proper Material IDs and finally lightmapped it XD.
Vertex painting for the object for material blend is A LOT OF INFO to copy.
It gets to the point that it’ll chug your Notepad scroll. Because of I decided to just do vertex repaint in the UE4 scene.
Plus its a lot of fun to do material blend paint using vertex (Vertex Paint addict here :P)
Ok so now all my mesh are half the size than the intended scale, but considering the amount of time it took to bake the lighting, I dediced not to do 2x scaling as I’m not planning to walk around in demo.
I did found a way to scale it to proper 2x by using attach to function. (basically select all object, then attached it to a box that has 0,0,0 coordinates, then scale the box to x2 and then voila).
B. Physical Based material cheat/shortcut (Master Material).
Material obviously don’t translate from UE3 and UE4 and to begin with, PBS is the reason to go to Unreal 4
In my scene I create a basic master material that I use for 90% of the scene assets.
I would like to save time as much as possible, hence I didn’t do much with the diffuse texture and normal map. I did some metal parameters textures and use as much as specular mask from my old scene as my roughness base as possible.
I use a simple lerp function and 2 constants to control my roughness that’s derived from specular mask.
The rest of 10% materials I create are for:
C. HDR Lighting and lightmass.
Lightmass took forever to build lighting, to mitigate this, I did a quick simple evnrionment with box (that built less than 30 second) to estimate the light color and value for the scene.
*It took 23 hours on the build where I didn’t know the previous light build busted my cpu radiator coolant, my poor i7 building lightmass under fire lol. In properly cooled machine it’ll roughly render around 5 hours.
As you all have known, HDR if you’re not careful can be a double edge sword.
People get confused on what value they need to put in the light intensity.
If you were to make a scene with proper light bulb and sunlight and time of day cycle, you need to make sure you know what’s your light bulb ratio towards the sun and moon and what type of light you’re using.
I think it’s best to measure light in Exposure value range considering we’re dealing with HDR.
Here’s some technical value that I found out that might help some people figuring out their lighting.
Why are the real internal value important?
It’s because you have to know what value to put for anything that will be affected by the Tone mapper (e.g emissive)
People who do real world lighting and photography exposure will understand UE4 lighting easier than others. In the end, it’s all about light Ratio.
Since I’m not trying to match proper light bulb value with my sun, I didn’t use the real sun value (which if you were to go with sun typical EV 14-16 = 40,960 - 163,840.
I want my sun and hemisphere ratio to be 1 to 4 EV (3 EVs brighter) so in my case I just use the value of
Directional light 768 and lightmass Environment scale 96 rather than dealing with extreme numbers value.
At the end of the day as long as your light ratio is proper and you set the eye adaptation limit properly, it’ll be the same regardless the EV level you use.
Also don’t forget that FOG will also require to use the HDR value to match
Multiply the value of your fog in the color picker (in my case I set mine to be value 32 and 20)
My Skybox emissive multiplier is 35.
D. True focus Camera BluePrint.
The idea is to animate the camera using real world variable input and capture some of the proper camera characteristic.
The closer you focus, the narrower the FOV supposed to be and vice versa.
The input variable I placed in BP are as following:
blueprint is created based on Camera Actor (which is very prone to crash during compile on 4.02 to 4.1.1 XD)
The stuff I override are these:
Once you got the effective focal length, then to convert it to Horizontal FOV I use formula:
FOV = 2ATAN(x/(2s2))
(where x = the size of the film horizontal, s2 = effective focal length)
For some reason unreal FOV description said it’s Vertical FOV, but after testing I figure it is a Horizontal FOV, so you can hooked final value directly to the Field of View of the camera.
(Horizontal size of the film of a full frame 35mm sensor is 36mm)
://en.wikipedia.org/wiki/Sensor_size#Common_image_sensor_formats
In case people wondering how to make that ATAN calculation in BP:
So those pretty much handle the effective focal length based on Focus distance and Lens focal length.
Things gets complex when trying to control the DOF and I believe I might get things wrong here (I’m looking for discussion on these for UE4 implementation).
I started by trying to understand the variable I’m overriding from the docs: https://docs.unrealengine/latest/INT/Engine/Rendering/PostProcessEffects/DepthOfField/index.html
Since I’m trying to imitate true focus, then I override these with constant:
DOF Focal Region = 0
DOF Scale = 1
Now then we’re left with the need to figure out:
Near transition region, Far transition region, and Bokeh size
To figure Near focus and Far Focus limit you need to figure out hyperfocal of the camera configuration:
HyperFocal = (f^2/N*c) + f
(where f = focal length, N is Aperture, c is Virtual Circle of Confusion)
Hyperfocal: ://en.wikipedia.org/wiki/Hyperfocal_distance
Once Hyperfocal result is achieved, now here’s the calculation of the Near focus distance and far focus distance:
://www.dofmaster/equations.html
Dn= s1*(H-f)/(H+ s1 - 2f)
(where Dn = Distance Near focus, s1 = focus distance, H = hyperfocal, f = focal length of lens)
Df= s1(H-f)/(H-s1)
(where Df = Distance Far focus, s1 = focus distance, H = hyperfocal, f = focal length of lens)
Once you figure that out you just substract the focus point with Dn for Near focus range
and focus point with the Df for Far Focus range and feed it to unreal DOF parameters.
Finally we got the Maximum Bokeh size: (need input for people who understood in Unreal4)
confused me as I think there should be FAR bokeh size and NEAR bokeh size.
In case I just do a calculation for Infinity Bokeh size.
will be OK for most cases where your subject is in focus on the foreground without any foreground out of focus element (makes the near blur wrong after certain focus distance because Near blur becomes larger than far blur, hence why I hacked in a force near bokeh size to 2.0 for certain scene)
In any case,
To calculate infinity bokeh size, you need to figure out magnification ratio
(check the FOV calculation 2 pic above, there’s small stub in the picture that shows the Magnification ratio)
magnification ratio = s2 / s1
(where s2 = final focal length , s1= focus distance,
Once I got the magnification ratio:
I use formula to calculate Far end largest bokeh
Cfar = f*M/N
(where Cfar = Bokeh size at infinity, f = focal length, M = Magnification ratio, N = Aperture
(check the result is multiplied by 100, because Unreal wants the bokeh size in Percent)
And that’s it for the calculation. Congratulation for reading up to down here.
Now here comes the problem of the entire setup XD
For the above reason, making the scene focus animate the way I want it becomes very tedious, I hope the community or Epic developer team can help me out on this
That’s it for the True Focus Camera blueprint (took me quite a while to complete the BP because of the shenanigans or probably lack of knowledge on my end lOl)
Some final tips for the Camera: make sure to cap Maximum Bokeh size to not be larger than 20 or else it’ll kill your GPU (like CRASH your GPU kind of kills)
These settings for real size bokeh is typically only used for Cinematic and not in game as it can be very heavy in perf.
I didn’t post my original BP because it’s kind of hairy and it has some extra info for personal test so I post only the important nuggets in breakdown, but should allow people to re-create the camera if needed.
E. Output.
is straight forward After Effects editing from all the BMP frame outputted in matinee. (for some reason JPG output didn’t work for me)
But incase anybody wondering it’s outputted to:
MainConcept H.264 1080P 30FPS @CBR 20Mbps Profile: High, Level 5.1
Then Vimeo and Youtube does additional encoding on top of it after the upload XD
F. Summary for the conversion.
At the end of the day small project turns out to be quite a task to complete.
It’s not as simple as I’ve planned to begin with but the end result didn’t disappoint me and I get more familiar with UE4
Unreal 4 Physical based shaders, HDR lighting, Tone Mapper curve, Temporal AA and blueprint blows me away.
It made my 3 weeks effort worth the while UE4TW
The only thing I wish UE4 had in the future is either GPU Based Lighting baked (like Octane render) or realtime precalculate radiosity that’s stable and light in performance like Enlighten.
I’ll post some screen comparison between UDK and UE4 version at some point in the future.
Please don’t hesitate to ask question, flame me if I made stupid mistake for any of the camera calculation above and/or help me out in figuring out the proper way to do DOF control in UE4
Thanks for looking at my video post and reading the breakdown.
A work of beauty, well done!
Thanks for very informative technical breakdown
Yeah I’ve been doing my best by following tutorials… but it’s difficult when you get stuck, maybe I just need a clearer view of what I want to make.
Lovely work. The end result is really great
Awesome job (even if I don’t remember seeing the UDK version) !
Glad you guys liked the videos, hope you guys find the breakdown useful
Looks fantastic, well done!
Beautiful scene, great work! =)
is fantastic work.
But that’s not nearly all I want to say.
HUGELY - THANK YOU!!!
The technical breakdown of what you’ve done is amazingly detailed and generous of you and your time, knowledge, effort and wisdom.
I owe you!
Hey appreciate the acknowledgement and glad if my breakdown can help people.
The idea is for people to get inspired and make cool stuff that in return inspired me to make better things and jump start virtuous circle
Great work. Can we have a download link?
Stunning work and a ton of thanks for the technical breakdown! Very good read
Thanks for the interest.
Currently it’s just an empty scene with nothing interactive so I’m not sure releasing the realtime version of scene is a good idea.
I might change my mind in the future when I got time, but I’m currently busy working on another Unreal 4 mini project
@Daerst Glad that you found the breakdown useful.
Great work, The breakdown was kind but the images are too small to realy help. Anychance you could just strip out the scene assets and just provide a basic empty scene with your sun lighting/HDR and world light settings etc all left at what they were for the scene, also the camera within the scene would be helpfull and all blueprints including the focal tricks. Basicly just empty scene with sun setup/camera/post pro etc. That would be super handy. Cheers KB
@KingBadger3D Thanks for the compliment.
The light ratio is only proper for my particular setup only, you can still use it if you want.
I specify in the breakdown:
Directional light 768 and lightmass Environment scale 96 …
Also don’t forget that FOG will also require to use the HDR value to match
Multiply the value of your fog in the color picker (in my case I set mine to be value 32 and 20)
My Skybox emissive multiplier is 35.
If you were to follow that number by the text and have light bulb on your scene, you’ll be setting it’s lumens down to value of single digits. Hence why I wrote the extensive information about unreal HDR Lighting system numbering in the breakdown to suite people needs in their lighting.
As for the camera breakdown, the image I post is 100% image size, I didn’t resize it.
My original camera BP it’s a lot more confusing as I put many test instructions, not to mentioned the final result is imperfect hence why I didn’t release it. I hope people re-create it in order to understand it then improve upon it.
Tbh, the system is effective when the user understood how it works fundamentally.
There’s a classic saying Give a man a fish; you have fed him for today.
Teach a man to fish; and you have fed him for a lifetime, hence the extensive breakdown
I sincerely apologize if the breakdown is confusing and not helping