Skip to content

Judge Dredd

Judge Dredd is a premium VPW table build featuring extensive Blender/Octane rendering, a complex 8-level GI fading system, RTX dynamic ball shadows, the Deadworld crane mechanism, pursuit gate wobble effects, and a comprehensive flasher pipeline. One of the most technically ambitious VPW projects.

Build Notes

Octane Shell Baking for UV Packing

To bake multiple objects with different UV maps into a single texture: duplicate the source geometry, extrude outward by 0.001, apply a perfectly clear material (no IOR) to this "shell", then repack the shell's UVs. When Octane's camera baking renders through the shell, original textures project onto the new packed UV layout. Set UV Set to 2 for multi-UV objects, 1 for single-UV objects like the playfield.

Insert Cutout Alpha Masks

Black outlines around insert cutouts are caused by VPX's poor alpha blending on playfield images. Raise the alpha mask cutoff value aggressively. For cleanest results, cut holes with hard binary edges (fully transparent or fully opaque) rather than relying on alpha blending.

Plastic Ramp DL Tuning

DL at 3 is often too low for baked plastic ramps. Testing at 5, 7, and 10 reveals higher values bring out edge highlights. However, higher DL decreases apparent opacity, so source texture opacity may need increasing to compensate.

nFozzy Physics-Driven Drop Targets

The standard flipper subs (SolRFlipper, SolLFlipper) replace legacy VP9-era flipper code. The _Collide subs are essential. Apply appropriate physics materials to all collidable objects. Fine-tuning primarily involves flipper strength and table slope; other nFozzy parameters should be left at defaults.

Insert Glow Lights

Create a subtle glow by adding a second, larger, very dim VPX light at playfield level over each insert. Low intensity to avoid visible spots -- only produces a faint halo.

Primitive Fading Architecture: Top/Under System

The redesigned GI/flasher fading uses "top" and "under" primitives instead of ON/OFF. Both are always visible. The under prim holds the current base state. When transitioning, the top prim gets the target state at full opacity, then fades from opaque to transparent, revealing the under prim. This avoids pop artifacts from visibility toggling.

VPX Lighting Fundamentals

VPX lighting is additive: overlapping two lights doubles brightness. VPX "lights" are flat horizontal discs, visible from below at high Z values in VR. Flashers are preferred for above-playfield illumination.

Scripting

Lampz Color-Changing Inserts

Crime Scene inserts with 4-color capability use 9 primitives stacked: 1x OFF, 4x ON (one per color), 4x BULB (one per color):

Sub DisableLightingColor(pri, DLintensity, lcolor, ByVal aLvl)
    if Lampz.UseFunction then aLvl = Lampz.FilterOut(aLvl)
    Select case lcolor
        case 1:pri.material = "InsertBlueOn"
        case 2:pri.material = "InsertRedOn"
        case 3:pri.material = "InsertYellowOn"
        case 4:pri.material = "InsertGreenOn"
    end select
    pri.blenddisablelighting = aLvl * DLintensity * 0.4
End Sub

VBScript "Me" Keyword

In VPX VBScript, Me inside CapBall3_Unhit() refers to the CapBall3 object itself. Pattern for one-time captive ball creation: Sub CapBall3_Unhit(): Me.Enabled = 0: End Sub.

Debug Ball Position Dump

dim b,i:b=getballs:for i = 0 to ubound(b): debug.print b(i).x & " " & b(i).y & " " & b(i).z: next

Balls in subways show negative Z values.

InRect for Spatial Ball Detection

Define rectangular zones on a hidden layer, check whether ball XY falls inside them. Combined with Z height, distinguish playfield, wire ramp, plastic ramp, and subway positions in a single timer loop. More performant than trigger-based approaches.

RTX Ball Shadow System

Uses a VPX light collection to cast dynamic shadows. Practical limit: 10-15 lights (68 is far too many). Typically 6 bulbs near slingshots is sufficient. Process maximum 3 balls simultaneously.

Global GetBalls Array

Call GetBalls once globally (gBOT = GetBalls) after all balls are created. Prefix with g to avoid name collisions. Eliminates redundant GetBalls calls per frame.

GI Step Values from WPC ROMs

JD has 5 GI channels with values 0-8. Use debug.print in the GI update sub to trace values. All 5 strings appear to fade together, but modes like Blackout use different patterns.

Crane Timer

Runs at 1ms interval controlling rotation speeds and ball tracking. Reducing to 5ms breaks ball pickup. Timer only active when crane moving. Cannot be optimized without breaking functionality.

Rubberizer Bug Fix

Lane guide corner collision passing rubberizer threshold caused flippers to feel like velcro. Fix: add check that vely must be negative:

ElseIf parm <= 2 and parm > 0.2 and activeball.vely < 0 Then

Pursuit Gate Wobble

Check active ball velocity in trigger _Hit. Use threshold (Activeball.vely < -20) for significant impacts. Scale amplitude: WobbleValue = -Activeball.vely / 15.

Flasher Fading Speed

FlasherSpeed coefficient should be 0.8-0.85, not 0.99. Lower coefficient makes fading finish faster, improving performance.

LUT Selector with Limited Keys

Left+right magna held together: right magna alone for super game, left magna alone before game start cycles LUTs. LUT selector disabled once game starts.

3D & Art

Additive Flasher Rendering

Render with environment lighting off and only the flasher lamp active. Use desaturated brightness as alpha channel. Layer on top of base GI texture using additive blending. Do NOT render GI and flasher simultaneously.

Semi-Transparent Texture Fading

When fading between overlapping primitives, semi-transparent pixels cause opacity to stack. Solution: top prim's texture must have only fully transparent or fully opaque pixels (binary). Bottom prim can have semi-transparency.

Depth Bias and Reflections

Depth bias works in opposite directions for direct view and playfield reflections. Setting -100 on OFF prim makes reflection correct but direct view wrong. Proper solution: make OFF prim geometry slightly contracted, so ON prim always covers it.

Plastic Transparency Fix (Octane)

Remove bottom face of plastic mesh and replace it with decal geometry as the backface. Makes the decal a physical part of the plastic rather than a separate floating plane.

Playfield Render Resolution

Target 4K (2160x3840). Render at double (8K) for cleaner denoiser results, then downscale. Extra detail gives denoiser more information.

Blender Export Rules

Always check "do not apply modifiers" when exporting to VPX. Lattice deformers should remain unapplied. Disable "Apply Modifiers" to preserve correct geometry.

Octane GI Clamp

Default GI Clamp (~5000) causes firefly noise. Set to 3-5 to eliminate. When reducing, remove compositor denoise node to avoid denoiser conflicting with itself.

Creating Plastics from Images

Flupper's method: PNG outline in Photoshop, Inkscape trace bitmap to SVG, import SVG to Blender, convert to mesh. Manual method: Import JPG as reference, trace shapes, extrude thickness, duplicate face for decal mapping.

Troubleshooting

POV Z Scale Breaks Physics

Changing Z scale in POV physically alters collision geometry. Never touch Z scale when adjusting cabinet POV. Only adjust FOV, Layback, and Inclination.

VPX 10.7 WebP and File Size

Table over 300MB. WebP provides significant lossless compression over PNG. Develop in 10.6, swap to full-resolution WebP for 10.7 release. Layer manager in 10.7 has crash bugs.

Texture Import Crashes

Multiple 200MB+ texture packs totaling over 1GB can cause VPX crashes. Use reduced-resolution textures (2K) for development, full-resolution for final release.

Debug.Print Performance

Active debug.print statements affect performance. Comment out all prints before release.

Game Knowledge

Crane Mechanism

  • Magnet solenoid: #1
  • Crane doesn't mechanically lift -- ball pushes it up via bump in metalwork on driveshaft
  • Motor calibration is "biggest issue of owning a real one"
  • Opto disc has cutouts to detect "parked" position

GI Channel Behavior

5 GI channels don't fade independently. GI turns off for Blackout mode, some Deadworld sequences. Flashers operate independently at any GI level.

B&W Comic Book LUT

Black and white LUT added for "comic book look" (original Judge Dredd comics were B&W).

Resources

  • VBScript documentation: vpforums.org/Tutorials/vbsdoc.html
  • Photopea (free online Photoshop): photopea.com
  • Octane Prime (free version): home.otoy.com/render/octane-render/demo/#prime
  • UV-Packer addon for Blender (free): automatic UV atlas packing
  • HDR textures work in VPX if you first load a normal texture then overwrite with HDR