Skip to content

Latest commit

 

History

History
320 lines (276 loc) · 25.6 KB

index_old.md

File metadata and controls

320 lines (276 loc) · 25.6 KB
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs=" crossorigin="anonymous"></script> <script src="/twentytwenty/js/jquery.event.move.js"></script> <script src="/twentytwenty/js/jquery.twentytwenty.js"></script> <script>$(window).on('load', function() { $(".twentytwenty-container").twentytwenty({move_with_handle_only:0, click_to_move:1}); });</script> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> <style> iframe[seamless]{ background-color: transparent; border: 0px none transparent; padding: 0px; overflow: hidden; } </style>

Jason Deacutis
jasondeacutis@gmail.com

Outline

Early Access "Cold War Gone Hot" tank simulation game.
GHPC is short for "Gunner, use High Explosive Anti Tank round on enemy Personnel Carrier!" (yes, its nerdy)

{% include image.html src="/content/GHPC/T-55s.jpg" inline=1 %} {% include image.html src="/content/GHPC/Night Fire.jpg" inline=1 %} {% include image.html src="/content/GHPC/T-72s.jpg" inline=1 %} {% include image.html src="/content/GHPC/Abrams.jpg" inline=1 %}

Reticles

Gunsight crosshairs are integrated with the ballistics system, elements are procedurally placed to ensure projectiles always hit their mark as we tweak our amunition over the course of development. Supports both "old-fashoned" light-blocking reticles, & holographic/reflex reticles. All reticles were meticulously recreated from their real-world counterparts, using written & photographic reference (often difficult to find).

{% capture c %}{% include image.html src="/content/GHPC/Reticles/reticles_small.jpg" href="/content/GHPC/Reticles/reticles.png" inline=1 w=980 h=490 %}{% endcapture %} {% capture f %} Reticles for T-55, BRDM-2, T-72, AT-4 Spigot, TPKU-2B (Russian Commander Periscope), TOW, & M60A3. {% endcapture %} {% include figure.html content=c footer=f %}

{% capture c %}{% include compare.html a="/content/GHPC/Reticles/t72-day.jpg" b="/content/GHPC/Reticles/t72-night.jpg" labelA="Day" labelB="Night" pos="0.55" style="width=100%; aspect-ratio:980/551" %}{% endcapture %} {% capture f %}Nearly every gunsight since WW2 has an internal light for use at night
(reticles are actually white!).{% endcapture %} {% include figure.html content=c footer=f footerStyle="max-width:600px" %}

{% capture c %}{% include image.html src="/content/GHPC/Reticles/t55_labeled_small.jpg" href="/content/GHPC/Reticles/t55_labeled.jpg" inline=1 w=980 h=729 %}{% endcapture %} {% capture f %}Russian T-55 gunsight with labels{% endcapture %} {% include figure.html content=c footer=f style="max-width:720px" %}

{% capture h %}Stadiametric rangefinding allows quickly determining the distance of a target based on its apparent size.{% endcapture %} {% capture c %}{% include image.html src="/content/GHPC/Reticles/stadia_small.jpg" href="/content/GHPC/Reticles/stadia.png" inline=1 w=605 h=200 %}{% endcapture %} {% capture f %}T-72 stadia showing a US M60A3 at 500 meter distance increments{% endcapture %} {% include figure.html header=h content=c footer=f %}

Thermal Imaging (FLIR)

Approximation of Infrared light, used to identify heat sources such as vehicles & infantry. Vehicle engines, gun barrels, & tracks are heat sources that can change temperature independently. In addition, the sun's position is used to determine the ambient environement temperature. Surface details are obtained using a semi-physically-based light model: surface brightness, roughness, & metalness are used to estimate heat emittance, determining how bright or dark it appears in thermal imagers. This achieves decently realistic results without needing much manual labor.

{% include image.html src="/content/GHPC/FLIR/m60a3_1.jpg" href="/content/GHPC/FLIR/m60a3_1.png" inline=1 %} {% include image.html src="/content/GHPC/FLIR/m60a3_3.jpg" href="/content/GHPC/FLIR/m60a3_3.png" inline=1 %} {% include image.html src="/content/GHPC/FLIR/m60a3_5.jpg" href="/content/GHPC/FLIR/m60a3_5.png" inline=1 %} {% include image.html src="/content/GHPC/FLIR/m60a3_4.jpg" href="/content/GHPC/FLIR/m60a3_4.png" inline=1 %}
M60A3 TTS's FLIR at night, losely based on real sources (early WIP).

SDF Maps

2D map rendering is harder than you'd think. GHPC has terrains over 8x8km in size & players need a zoomable map.
A static image needs to be very high resolution, it takes a lot of space, & even still it doesn't support a lot of zooming.
A mesh based map allows infinite zoom, but may be difficult to generate or require level of detail for performance.

Signed Distance Fields compromise & allow low resolution textures to encode vector graphics that can be infinetly zoomed. They enable easy styling of borders & anti aliasing cheaper than traditional triangle MSAA. The SDFs are procedurally generated based on the forest, road, & building masks that we already use for vegetation generation & terrain materials. There's a lot of room for optimization, but there was no need given how fast it was already running (<1ms).

{% capture c %}{% include image.html src="/content/GHPC/SDF/contour.gif" inline=1 style="width=100%; aspect-ratio:1" %}{% endcapture %} {% capture f %}Anti-aliased contour lines rendered directly from the heightmap file.{% endcapture %} {% include figure.html content=c footer=f style="max-width:490px" %}
{% capture c %}{% include image.html src="/content/GHPC/SDF/map.gif" inline=1 style="width=100%; aspect-ratio:1" %}{% endcapture %} {% capture f %}Multiple SDFs allow multiple colors & are combined with shaded relief.{% endcapture %} {% include figure.html content=c footer=f style="max-width:490px" %}

Day-Night Cycle

Realtime sky simulation, based on a simplified solar system model. Takes into account the map's global coordinates. Includes seasonal sun elevation, moon phases, & earthshine. The moon is also simulated as a light source & its brightness is affected by phase.

{% capture c %}{% include image.html src="/content/GHPC/Sky/sunpath_small.jpg" href="/content/GHPC/Sky/sunpath.png" inline=1 w=702 h=394 %}{% endcapture %} {% capture f %}Sunpath over the course of a year{% endcapture %} {% include figure.html content=c footer=f %}

{% capture c %}{% include image.html src="/content/GHPC/Sky/moon2.gif" inline=1 w=615 h=122 %}{% endcapture %} {% capture f %}Moon phase cycle {% endcapture %} {% include figure.html content=c footer=f %}

{% include embed-youtube.html id="kvQDc_CfAFo" %}

Driver AI

Developed the first iteration of the driver AI, allowing vehicles to navigate to a destination while avoiding obstacles.

AI Vision Occlusion

Developed the first iteration of the AI vision occlusion. A mesh is used to determine how obscured a target is. PhysX raycasts are very efficient for static meshes, so this actually turned out to be very performant. Houdini procedurally generates a mesh using the forest masks that we use for procedural vegetation placement. The masks are vectorized, extruded, & the triangle count is reduced to reasonable amounts (<10,000 tris).

{% capture c %}{% include image.html src="/content/GHPC/Vision Collider.jpg" inline=1 w=1905 h=893 %}{% endcapture %} {% capture f %}Red is the invisible mesh. This prevents AI from seeing through forests.{% endcapture %} {% include figure.html content=c footer=f %}

Crowd-sourced mod to port content to Arma 3 from preceding games (military sandbox).
I worked as a small part of a massive team of passionate community members.

{% include image.html src="/content/CUP/small/chernarus autumn.png" href="/content/CUP/chernarus autumn.png" inline=1 %} {% include image.html src="/content/CUP/small/chernarus summer.png" href="/content/CUP/chernarus summer.png" inline=1 %} {% include image.html src="/content/CUP/small/chernarus winter.png" href="/content/CUP/chernarus winter.png" inline=1 %} {% include image.html src="/content/CUP/small/czech.png" href="/content/CUP/czech.png" inline=1 %}
{% include compare.html a="/content/CUP/A2.jpg" b="/content/CUP/A3.jpg" labelA="ArmA 2" labelB="CUP" style="width=100%; aspect-ratio:16/9" %} ## Blender Material Tool Hopefully soon to be integrated into Alwarren's [ArmA Toolbox](https://www.armaholic.com/page.php?id=20519 "armaholic.com") addon for [Blender](https://www.blender.org/features/). {% include image.html src="/content/CUP/barracks.jpg" w=980 h=466 %} {% include image.html src="/content/CUP/rvmat.png" w=980 h=430 %} A very nice optimization of ArmA's material system is the combining of materials into a single "[Multi Material](https://community.bistudio.com/wiki/Multimaterial "bikipedia")". This can drastically reduce the amount of CPU drawcalls, especially when there are hundreds of models on screen. {% include compare.html a="/content/CUP/ATC-multi.jpg" b="/content/CUP/ATC-mask.jpg" labelA="Combined" labelB="Mask" pos="0.42" style="width=100%; aspect-ratio:980/495" %}

Personal Projects

Minecraft Clone

1-Month stab at recreating Minecraft for fun. Implemented dynamic voxels & infinite terrain. {% include image.html src="/content/MC-sunset.jpg" href="/content/MC-sunset.png" style="width:100%; aspect-ratio: 16/9;" %}

N-Body Gravity Physics

A N-Body simulation simulates all objects as sources of gravity. For example, all the stars in the Milky Way galaxy pull on the Sun, & the Sun pulls on all the stars. This is particularly expensive because the calculations increase exponentially with the body count (O(n^2)).

{% capture c %}{% include image.html src="/content/Physics/BH.gif" inline=1 %}{% endcapture %} {% capture f %}Barnes-Hut algorithm reduces # of calculations by simulating clumps of bodies as one (O(n*log(n))).{% endcapture %} {% include figure.html content=c footer=f footerStyle="max-width:475px" %}
{% capture c %}{% include image.html src="/content/Physics/nbody.gif" inline=1 %}{% endcapture %} {% capture f %}Multi-threaded, cache-coherent, Burst compiled, brute-force approach. For 4096 bodies, compared to the unoptimized starting point, this resulted in a speed up from ~600ms per frame to ~6ms (mostly from cache-coherency). PhysX collisions are now the bottleneck. {% endcapture %} {% include figure.html content=c footer=f footerStyle="max-width:390px" %}

Realtime Raytracer, Pathtracer, & Raymarcher

Raytracing, Pathtracing, & Raymarching all form images by simulating rays of light entering a camera for every pixel. They're compulationally expensive compared to traditional triangle rasterization, but they can handle much more complicated graphical effects. They are not necessarily challenging to program, but they are difficult to optimize. All renderers here were made from scratch in Unity running on a GTX 1070 Ti without the use of RTX.

{% capture c %}{% include image.html src="/content/Shader/Raytracer/RT.jpg" href="/content/Shader/Raytracer/RT.png" inline=1 %}{% endcapture %} {% capture f %}Traditional lights are simulated as "point" sources, meaning they are infinetly small & cast sharp shadows (rare in reality). Raytracing can properly simulate light sources with shape & size, creating soft shadow penumbra.{% endcapture %} {% include figure.html content=c footer=f footerStyle="max-width:850px" %} {% include video.html src="/content/Shader/Raytracer/soft.mp4" %}

{% capture h %}Pathtracing is an extension of raytracing where every collision "bounces" the light ray. When a ray hits a mirror, a ray is reflected. An impefect mirror defocuses the ray into a cone (blurry reflection). A white wall defocuses the ray across a hemisphere. These bounces results in a grainy image when too few rays are used, but given enough time the result is a near perfect simulation of light.{% endcapture %} {% capture c %}{% include video.html src="/content/Shader/Raytracer/PT.mp4" inline=1 %}{% endcapture %} {% capture f %}Notice the slightly blurry reflections, & indirect illumination of the sphere’s dark side from light bouncing off the ground.{% endcapture %} {% include figure.html header=h content=c footer=f %}

{% capture c %}{% include image.html src="/content/Shader/Raymarcher/raymacher1_small.jpg" href="/content/Shader/Raymarcher/raymacher1.png" inline=1 %}{% endcapture %} {% capture f %}Raymarching has a high upfront cost, but it can also achieve complexity otherwise impossible with triangles (extreme non-realtime example).{% endcapture %} {% include figure.html content=c footer=f %}

Reverse Engineering - Battlefield 3

Disclaimer: All reverse engineering I conduct is purely for educational purposes. I do not claim to be responsible for any of the original work.

{% capture c %}{% include compare.html a="/content/Reverse Engineer/BF3/bf3_alley_ingame.jpg" b="/content/Reverse Engineer/BF3/bf3_alley_blender.jpg" labelA="BF3" labelB="Blender" inline=1 %}{% endcapture %} {% capture f %}An alley (from the first campaign level) imported into Blender without textures for analysis.{% endcapture %} {% include figure.html content=c footer=f %}

{% capture c %}{% include image.html src="/content/Reverse Engineer/BF3/bf3_alley_blender_dof.jpg" href="/content/Reverse Engineer/BF3/bf3_alley_blender_dof.png" inline=1 style="width:100%; aspect-ratio: 16/9;" %}{% endcapture %} {% capture f %}Fully textured scene coming soon™{% endcapture %} {% include figure.html content=c footer=f %}

Render Analysis {% capture c %}{% include image.html src="/content/Reverse Engineer/BF3/alley_drawcalls.gif" inline=1 style="width:100%; aspect-ratio: 16/9;" %}{% endcapture %} {% capture f %} A wireframe is shown for each drawcall issued. BF3 makes heavy use of instancing, so most of the geometry is drawn in relatively few drawcalls (~300 here). Only unlit surface color is shown, but simultaneously other PBR data is being drawn (deferred rendering). {% endcapture %} {% include figure.html content=c footer=f %}

To understand how the texturing was achieved, I wrote a Python script in Blender to convert shader assembly to a material node network.

{% capture c %}{% include assembly.html %}{% endcapture %} {% capture f %}M4A1 rifle DirectX pixel shader assembly{% endcapture %} {% include figure.html content=c footer=f style="max-width:475px" %}
{% capture c %}{% include image.html src="/content/Reverse Engineer/BF3/dxbc_normal.jpg" inline=1 %}{% endcapture %} {% capture f %}Example section responsible for reading the normal map{% endcapture %} {% include figure.html content=c footer=f style="max-width:490px" %}
Converted to Blender Material Node Network {% include image.html src="/content/Reverse Engineer/BF3/bf3_m4a1_dxbc_nodes.jpg" href="/content/Reverse Engineer/BF3/bf3_m4a1_dxbc_nodes.png" %} The result is a near pixel perfect recreation of how the rifle appears ingame.
{% capture c %}{% include image.html src="/content/Reverse Engineer/BF3/bf3_m4a1_desert.jpg" href="/content/Reverse Engineer/BF3/bf3_m4a1_desert.png" inline=1 %}{% endcapture %} {% capture f %}Desert camoflague variant, with every bumb & scratch exactly as ingame{% endcapture %} {% include figure.html content=c footer=f style="max-width:485px" footerStyle="max-width:80%" %}
{% capture c %}{% include image.html src="/content/Reverse Engineer/BF3/bf3_m4a1_black.jpg" href="/content/Reverse Engineer/BF3/bf3_m4a1_black.png" inline=1 %}{% endcapture %} {% capture f %}Ordinary black variant uncovered by bypassing the desert camo part of the node network{% endcapture %} {% include figure.html content=c footer=f style="max-width:485px" footerStyle="max-width:80%" %}
Ultimately the goal was to fully automate this process to work for all art on screen, but developing the automation proved to be time consuming & I never got around to finishing it.

Reverse Engineering - ArmA Terrain

Disclaimer: All reverse engineering I conduct is purely for educational purposes. I do not claim to be responsible for any of the original work.

{% capture c %}{% include image.html src="/content/Reverse Engineer/ArmA/utes.jpg" href="/content/Reverse Engineer/ArmA/utes_4k.jpg" inline=1 style="width:100%; aspect-ratio: 16/9;" %}{% endcapture %} {% capture f %}Work in progress port of ArmA 2's Utes map into Blender, by reverse engineering & extracting from the gamefiles (Enlarge for 4k).{% endcapture %} {% include figure.html content=c footer=f %}

{% include image.html src="/content/Reverse Engineer/ArmA/Stratis_satellite.jpg" inline=1 a_style="width:100%; aspect-ratio:1;" %} {% include image.html src="/content/Reverse Engineer/ArmA/Stratis_heightmap.jpg" inline=1 a_style="width:100%; aspect-ratio:1;" %} {% include image.html src="/content/Reverse Engineer/ArmA/Stratis_mask.jpg" inline=1 a_style="width:100%; aspect-ratio:1;" %}
ArmA 3's Stratis satellite, heightmap, & surface type textures extracted & stitched together (8192x8192, reduced here for legal reasons).
{% include image.html src="/content/Reverse Engineer/ArmA/stratis_mesh.jpg" href="/content/Reverse Engineer/ArmA/stratis_mesh.png" inline=1 a_style="width:100%; aspect-ratio:490/276;" %} {% include image.html src="/content/Reverse Engineer/ArmA/stratis_objects.jpg" href="/content/Reverse Engineer/ArmA/stratis_objects.png" inline=1 a_style="width:100%; aspect-ratio:490/276;" %} {% include image.html src="/content/Reverse Engineer/ArmA/stratis_bounding_boxes.jpg" href="/content/Reverse Engineer/ArmA/stratis_bounding_boxes.png" inline=1 a_style="width:100%; aspect-ratio:490/276;" %}
Terrain heightmap as a mesh, followed by bounding boxes of all the objects on the map (to debug before replacing with models).

3D Art

I'm more of a programmer than an artist, but I dabble when I can.

Fully procedurally modeled & textured using Blender, with some artistic liberties taken. {% include image.html src="/content/Art/an-prc-117g_small.jpg" href="/content/Art/an-prc-117g.png" style="width:100%; aspect-ratio: 16/9;" %}

Fully procedurally modeled & textured using World Machine's erosion simulation. {% include image.html src="/content/Art/WM_small.jpg" href="/content/Art/WM.jpg" style="width:100%; aspect-ratio: 16/9;" %}

Planetary

{% capture c %}{% include image.html src="/content/Art/earf3.png" href="/content/Art/earf3.png" inline=1 style="width:100%; aspect-ratio: 16/9;" %}{% endcapture %} {% capture f %}Earth (Realistic){% endcapture %} {% include figure.html content=c footer=f %}

{% capture c %}{% include image.html src="/content/Art/earth_small.jpg" href="/content/Art/earth.jpg" inline=1 %}{% endcapture %} {% capture f %}Earth{% endcapture %} {% include figure.html content=c footer=f %}
{% capture c %}{% include image.html src="/content/Art/orbit.gif" inline=1 %}{% endcapture %} {% capture f %}Retro Vector Orbit{% endcapture %} {% include figure.html content=c footer=f style="max-width:480px" %}