Creating urban environments

20 September 2016

Hi everyone, it’s Mitch here.
In today’s dev blogpost I’ll be looking at the process of creating urban environments in BeamNG, particularly at the interface of heightmap terrain and mesh objects. I’ll be building heavily on the workflow already established in LJFHutch’s tutorial, so you may want to read that first if you’re a modder interested in the technique. This time, instead of just modeling the roads, I’ll be modeling the entire terrain in Blender.

An urban area consists of terrain that has been heavily landscaped to make way for highways, tunnels and streets. The density of the roads is so great that the natural form of the landscape has all but disappeared, so instead of starting the modeling process with the terrain, I will begin by laying out the roads.
vgzhei0

The first step is to create the shape of all the roads planned for the map as bezier curves (splines). This will allow me to use the splines to shape both the roads lying on terrain and, later on, the overpasses.

With the road layout completed as bezier curves, it is time to begin assigning meshes to the curves. Using the array and curve modifiers, the roads can be made to follow the bezier curves and basic lane and shoulder widths can be determined.
m0pgi2e

Once completed, the perimeter vertices of the road meshes can be selected using ctrl+shift+alt+M. Duplicated and select the perimeter vertices, split them to their own object and apply all modifiers. Now I can begin bridging the areas between road perimeters with faces, filling in the empty spaces between roads with what will become terrain.
nxkh56k

The terrain will have large polygons and be lacking in detail, but this can later be improved upon using the sculpt tool.

Once all the area between roads has been filled, I have the basis for a heightmap which can be rendered in 16-bit BW using the technique in LJFHutch’s tutorial (the image below has exaggerated contrast for clarity). If imported into BeamNG’s level editor, the resulting terrain will contain smooth roads and sloping terrain.
rpc4uj4 zx1rcoj

However, the roads won’t be very safe to drive on yet as all the bridges and overpasses are missing. I can create these by returning to Blender,copying the existing road meshes and then sliding them along their curves until they occupy the desired location of the overpasses. The meshes can be extruded to become 3D, and guardrail geometry added to the edges. If the guardrails are complex they will require a simplified copy of the overpass mesh (still deformed by the bezier curve) to use as a collision mesh when it comes time to export to .dae.
rq32d37

Check that the start of the overpass butts up neatly against the end of the road. Then extrude the end of the road approximately 5 metres and lower it by 0.2m to generate a ramp which gradually falls away from under the overpass. This will result in a heightmap which recedes once the overpass begins, and will eliminate any potential spiky artifacts at the transition, caused by rapid changes in terrain height. You can see how this works in the cross-section below:
8dneulu

After exporting all the overpass meshes to a .dae, loading the mesh in the BeamNG level editor, and aligning it with the heightmap, I now have a perfectly drivable urban landscape.
gzuonpe 3oe75dg

To add roadside details such as curbs, simply select an edge loop of the road mesh, split it to a new object, and begin extruding the shape of the curb. In the image below, the road will be rendered to a terrain heightmap, and the curbs will be meshes which perfectly align with it. There’s no need to worry about getting a smooth curve, as this is already taken care of by the bezier curves, influencing the mesh’s modifiers. Make sure to keep a working copy of the bezier curbs and their road meshes, and duplicate them before converting to mesh and exporting. That way any road changes you make retain the influence of the bezier curve.
in9vnl0

Additional arrays of objects can be added along the curves, and even exported as forest items for fast rendering of objects like guardrail supports, but that will be covered in a future tutorial.
5unvlxv

Substance Designer – procedural textures

05 September 2016

Hi guys, my name is Christin.

I’m working as 3D Artist for BeamNG and I would like to show you a bit of my daily work in Substance Designer.

We use this program to create new textures, i.e for the buildings in the upcoming Italy level, so lets look into this: How to create a simple procedural texture in Substance designer.

Let’s get started!

substance_designer_01

First of all: you use packages in Substance Designer (a package is the sbs file).

All the content you create for a texture (graphs, resources, 3D meshes and so on) are in one package.

You can also organize all the data in your package with folders.

First step: create a new package with a new graph:

substance_designer_create_new_package_02

substance_designer_create_new_graph_03

Afterwards, choose a template for the graph, change the name and change the resolution to (4096 or 2048):

It all depends on what you want to create. But don’t worry too much about the templates.
You can change the outputs every time. The templates are just a little help and time saver.

substance_designer_template_graph_04

Substance Designer creates automatically the outputs based on the template you chose before.

substance_designer_new_package_new_graph_05

Finally you can start to create your graph! Just choose a node from the library or press the space bar to choose an atomic node. You can find these nodes also in the atomic node bar.

substance_designer_node_library_06

You can create a link between 2 nodes.
Click on the little circle and drag the noodle (link) to an input of a node and plug it in.

substance_designer_connect_two_nodes_07

In the end the graph can be very complex. So try to keep it organized all the time.

You can use the frames and comments functions to keep track of things.
substance_designer_complex_graph_08

Final step: Set the graph to parent and change the resolution of the graph and export your outputs.

substance_designer_export_09

And done, hope you enjoyed this short outlook 🙂

Version 0.6.1 released

29 July 2016

Lots of fixes and some new content as well 🙂

Physics

  • Fixed a crash to desktop when physics were paused for a long time

Vehicles

  • Added wood planks prop:
  • Miramar: added 3 skins:
  • Barstow: Added wheelie bar, minor jbeam improvements
  • ETKI: Added “Dreid” skin, added oil cooler, fixed rally struts causing physics crash, raised tow hitch to clear dual exhaust, minor texture/UV fixes
  • SBR4: Fixed front brake mesh stretching when turning, increased suspension damping, added hill climb variant
  • H45 Ambulance: Added license plate
  • Rock Props: Added refnodes for more reliable spawning
  • Miramar: Added skinnable 2nd channel UVs
  • Sunburst: Unmirrored the window UVs
  • Dry Van Trailer: Increased travel on the trailer feet, minor jbeam improvements
  • Haybale Prop: Fixed bad refnodes for more reliable spawning
  • Barstow, Burnside, 200BX, ETK800, ETKC: Improved behavior of inter part coltris for more reliable collisions (others still wip)
  • Moonhawk: Fixed race variant using sport tires
  • D35/H45: Fixed off road leaf spring breaking heavy duty axle
  • T75: converted wheels to 16 rays from 14
  • Covet: Fix hatch spoiler shaking
  • Vehicles with rear doors/ramps: Standardized open/close binding to “o” for kbd

Replay System

  • Fixed replay spikes in the most common cases (not all of them)
  • Modified replay save directory, they are now stored in replays/*.rpl
  • Fixed memory leak of replay resources when deleting a vehicle
  • Fixed possible crash if spawning a vehicle while recording a replay
  • Bumped replay version: files recorded with previous versions will no longer be readable (this will continue happening until the replay system is stable enough)

AI

  • Added functionality to set and control (as fixed speed or as a max speed limit) the speed of the entire route planned by the AI
  • Updated the app to facilitate manual route setting (above) functionality
  • Bug fix related to offroad chase mode
  • Added function (setAiPath) to scenariohelper to facilitate the usage of ai.driveUsingPath API to its full extent

Terrains / Scenarios

  • Added Downhill Rally scenario:
  • Improvements to Utah: roads, rocks and cliffs
  • Changed scenario’s camera to use the “default mode” from option settings
  • Changed scenario’s camera to remember last camera used between resets

UI

  • UI App editor no longer requires “advanced mode”
  • Fixed UI apps freezing after opening empty file selector in Replay app

General Bugfixes

  • Vehicle will no longer go to manual shifting mode when shifting up/down for the first time (explicitly press ‘Q’ instead)
  • Added log error for vehicle meshes without a material
  • Added obj:getDistanceFromTerrain(node_id) function to vehicle Lua. This function returns the vertical distance of a node (node_id) from the heightmap
  • Changed “Reload vehicle” action to basic function, will work without “Enable advanced functions” selected
  • Vehicle configurations and replay files will no longer be moved when cleaning cache or updating the game
  • Fixed a random crash when the game or computer is inactive for long periods of time or when opening other apps/windows
  • Fixed crash with Decals using broken materials
  • Fixed crash on Forest with broken materials
  • Fixed bug on Options – Antialiasing
  • Fixed window size not set correctly some times at startup, making some shaders not work properly
  • Fixed “auto place” of vehicles spawning on places other than the desired position
Instructions on how to update the game here.
Bug reporting/Help Thread here.

Version 0.6 released

22 July 2016

Highlights

  • Added new vehicle ETK I Series


  • Couplers – Hook vehicles together
  • Preview of the Garage mode
  • Brake thermals – Different types of brake pads, Brake pad temperature, Brake efficiency changes
  • Hotlapping app – App for measuring lap times for individual tracks.
  • Added first version of experimental replay system. Replay files are only working locally for now and will not be readable by future versions. See known bugs below.

Physics

  • Improved overall stability of the physics core
  • Added couplers, which can attach two nodes together into one
  • Brakes now use both of wheel axle nodes for brake reaction torque if no brake “nodeArm” has been defined. This improves the behavior of brake reaction torque (on the brake pads)
  • Physics core stops executing LUA when an error happens. Previously the physics core continued to execute LUA, spamming the log with error messages
  • Triangles with zero drag and lift do not affect aerodynamics anymore
  • Fixed a dynamic collision bug that appears when few nodes exist in the terrain
  • Environment’s sea level temperature can be changed now in the physics core, previously it was hardcoded to the average Earth temperature (15 degrees Celsius)
  • Fixed movement of spawning vehicles when simulation is freezed
  • Vehicles

    • Added new dry van trailer, towable with the T-Series
    • Added new bollard prop
    • H-Series: Added new ambulance variant, weakened driveshaft, added new 5.5L V8, fix rear leaf spring shackle colliding with body
    • D-Series: Added optional trim and running boards, weakened driveshaft, added new 5.5L V8, made tailgate openable
    • Roamer: Added optional running boards, weakened driveshaft, added police spotlights, added new 5.5L V8
    • Grand Marshal: Added taxi variant, added police spotlights and antenna, added new 5.5L V8, added adjustable race suspension
    • ’88 Pessima: Added vented hood, added widebody kit, added some aftermarket spoilers, added skin for “Custom”, more damping on rally suspension
    • Moonhawk: Made lettering removable, weakened driveshaft, added “Race” variant with adjustable suspension
    • Sunburst: Fixed skidplate making stock bumper deform, added some aftermarket spoilers, added front splitter, added widebody kit and “Hill Climb” variant, increased suspension damping for race and rally, lowered rear suspension roll center, strengthened some suspension parts
    • SBR4: Fixed ABS not working, fixed speedometer limit, added widebody kit
    • Added brake thermals properties to all cars
    • Added brake pad choices to all cars’ brakes
    • Replaced fake superchargers with real ones, using a new supercharger simulation
    • Bolide: Increased suspension damping, more realistic engine inertia to help control wheelspin
    • Barstow: Added roll cage, added skinnable second channel UVs, modified stage 1 supercharger to fit under scooped hood
    • 200BX: Improved rear suspension geometry to greatly reduce compliance steer with wide tires; “Demon” config has more stable handling now
    • Covet: More damping for race/rally suspension
    • ETK K-Series: Fixed some engine meshes being in the wrong place, re-added missing radiator tubes, added imperial gauges
    • ETK 800 Series: Re-added missing radiator tubes, now defaults to imperial gauges to be more consistent with the other cars
    • T-Series: Fixed front license plate being inside the heavy duty bumper, lowered fifth wheel, added coltris to cargo box for less object clipping, reduced brittleness of cargobox panels, fixed instability of cargo box floor when rear doors opened, fix wheel hub/brake drum flexbody problem
    • Pigeon: Fixed stabilizer wheels missing/broken
    • Improved ABS settings for better braking distance with anti-lock brakes
    • Reduced radiator strength for most cars (they had become nearly invulnerable)
    • Improved trunk flexbody spiking on cars with trunks
    • Tightened gearing on rally configurations
    • Separated small trailer and giant flail to their own separate vehicles, now attachable with couplers
    • Fix wrong offsets on ETK F13 and Dreid RallyPro wheels
    • Made classic-style lightbar properly breakable
    • Removed clutchtorque values from all cars’ engines because the drivetrain simulation now auto-calculates a suitable value
    • Removed nodeCoupling nodes/beams from all cars suspensions no longer needed with more advanced 3 point brake torque reactions
    • Tweaked all carbon fibre materials to darker and smaller pattern
    • Small Trailer: Suspension reworked, added support to use common wheels
    • Barstow: Fixed seat support beams
    • 200BX: More damping on base and sport versions, less anti-dive geometry in the front suspension.
    • Semi: Tires have more direct handling but a bit less maximum grip
    • Cannon: Improved the firing method, it now works fine in slow motion. Made the overall veahicle heavier and more stable. Fire button remapped to “RB” on xbox gamepad
    • H15: body panel rigidifiers weaker but not breakable now, to reduce chance of mesh stretching
    • Input

      • Some bindings changed: see PDF here and changes:
      • Many debug bindings are now more consistently using “CTRL” combination key, to prevent accidental use.
      • Added left-shift binding to increase camera speed (Relative and Flying cameras)
      • Improved recovery system (‘insert’ key): it now remembers the path even after reloading or resetting the vehicle
      • Tweaked keyboard steering, you can now choose between Grip and Drift filters (in steering bindings), which should be suitable for more driving styles
      • Fixed inability to invert mouse camera axes
      • Fixed steering not working while radial menu is active
      • Fixed buggy radial menu render while using flying camera
      • Simplified FPS and Advanced Metric panels into a single binding (ctrl+f and ctrl+shift+f) that cycles through both panels
      • Fixed dragAI helper not working corretly for some car orientations
      • Internal cameras now use the zoom buttons to change FOV

      User Interface

      • Mainmenu: you can go back to it now and better visuals:
      • Fixed AI Control app not always populating list of map addresses
      • Added support for per-scenario UI layouts (add a “uilayout” key in the scenario json file)
      • Fixed damage UI app mixing data from several vehicles
      • Fixed flickering of UI apps in multiseat mode
      • Added lots of hints to loading screen
      • Fixed force feedback app not showing the full range of steering input
      • Fixed G-Force UI app trail line being too long
      • Fixed confusing gear binding names when shown out of context (e.g. filtered search)
      • Fixed some binding conflicts not showing up
      • Added vehicles as targets to AI Control:
      • Added smarter target selection for flee/chase AI modes
      • Updated vehicle debug app with two new options (“Ignite node minimal” and “Explode vehicle”)
      • Added extensive performance stats to all cars
      • Improved UI reaction times in Modmanager (not the disabeling and enabeling of mods themselves)
      • Implemented Hints for loading screen
      • Added filters and data fields in vehicleselector, that change with unit change (e.g 0-100km/h vs 0-60mph)
      • Improved the vehicle damage app
      • Added new engine damage app
      • Cosmetic changes to debug menu + disabeling some options if they aren’t available
      • Added reset button for ui theme
      • Added reset button for app layouts
      • Fixed warning about firewall blocking the game and making it impossible to connect to the android controller
      • New consistant image, for content, that doesn’t have an image
      • Added some Icons for xbox controller bindings
      • User can choose, if his custom configurations should be shown in the vehicleselector now
      • Slight cosmetic changes to help
      • Fixed ingame benchmark (in help)
      • Added ranges to filters in vehicleselector (e.g. value)
      • Help now shows a lavasoft warning
      • Display aero/hydro-dynamic forces in the collision triangle debug visualization

      AI

      • Optimized ai speed planning calculation
      • Upgraded manual mode to follow a set of user specified nodes and the ability to set user specified speeds (user path planning).
      • Implemented a race mode as part of the manual mode to loop over a closed circuit path for specified no of laps
      • Optimized graphpath shortest path finding code
      • Fixed bug related to isolated manual nodes (set as BeamNGWaypoints) in nav map
      • Further improvements and bug fixes to the chase mode

      Terrains

      • Polish work on Utah (improved road placement, rocks, etc)
      • Fixed tree stump on East Coast USA having a larger colmesh than it needed
      • Increased the lod of trash bins on East Coast USA and Utah
      • Utah: fixed strange lod issue with tunnel, added missing materials for the reduction mill
      • East Coast USA: Improved some AI roads
      • Made the red water of Small Island more water like
      • Added per level temperature curve based on time of day

      Misc

      • Added confirmation screen when clearing cache, launching safe mode
      • Added Lavasoft flag and incompatible OS flags for launcher
      • Added force 64bit launch button to launcher when in 32bit otherwise
      • Improved mod support for license plates
      • setDefault vehicle – allows custom default vehicle
      • Fixed bug with duplicated license plates using SteamID
      • Fix nomove goal problem with old format scenario’s goals
      • Fix Enable Competitive scenario conditions
      • Smoothed tire skidding and rolling sounds, should be less twitchy now
      • Added tire scrubbing sound effect
      • Refactored map tracking to only use object ids
      • Reworked and improved vehicle tracking, much cleaner and less error prone now
      • Added support for meshes render using translucent zwrite
      • Added reverse time for scenarios
      • Small speedup of vehicle loading
      • Tiremarks now stay visible much longer before disappearing
      • Relative Camera mode: you can store and restore positions now (see pie menu)
      • Fixed buggy quotes in chat app
      • automatically loading vehicle modules from the lua/vehicle/extensions/auto
      • added global variable detector: It warns if you add a variable in the global Lua scope.
      • optimized vehicle loading: loading all files into memory first to cluster disk access without delays inbetween
      • drawing a skeleton if no flexmeshes are present
      • renamed Lua extension callbacks to make more sense: init, oninit, onLoad > onExtensionLoaded, unUnload > onExtensionUnloaded
      • Game ships with proper cached collada files now which should result in faster loading times

      General Bugfixes

      • Fixed LUA serialization of float3 and Vector3F, added serialization of Quaternions
      • Fixed a crash while using “Save level as…” in editor
      • Fixed tire skidding sound delay: it should now be much easier to feel the tire grip limits
      • Fixed conflicting output in OutSim when multiseat is used
      • Fixed bullet-time progressive effect: first time an observer cam was triggered, the fade effect started from zero speed, rather than current speed
      • Fixed inability to start scenarios when coming from the same level in Freeroam mode
      • Fixed map data potentially surviving a level change
      • Fixed launcher on Windows Vista without SP2
      • Fixed crash on Material system when vehicles have invalid json files
      • Fixed crash on Forest when render more than 10k items on a render batch
      • Fixed raycast normals on terrain
      • Fixed crash on vehicle spawn related to sounds
      • Fixed crash when game windows is minimized for some time
      • Fixed camera reset on change game options
      • Fixed render artifact at the botton of flat surfaces
      • Minor fixes on graphic options

      Jbeam / Lua

      • Implemented realistic supercharger simulation
      • Implemented basic thermal turbo damage
      • Refactored Torque Curve App, fixed outstanding issues, overhauled visuals, added support for hybrid turbo + supercharger setups
      • Fixed turbo RPM shooting up while shifting, due to faulty wastegate actuator
      • Implemented much smarter ESC/TCS decision logic which helps keep control over the car in case multiple assistance systems are active at once
      • Required clutch torque is now automatically calculated if no value is present in jbeam
      • Fixed drivetrain bug with certain props where it expected ABS data to be existing
      • Fixed deform/break group visualization if a beam was part of more than one group
      • Added ability to poll scenario data from running scenario, for potentially dynamic displays in vehicles
      • Tweaked cruise control to accelerate with a fixed maximum acceleration
      • Added automatic indicator turn off
      • Added advanced damping to node grabbing to make it more controllable
      • More accurate measurement of non inertial G-forces on Z-axis, this improves engine’s oil starvation behavior
      • Improved brake angular velocity sensors
      • Added queueObjectLuaCommand (sends LUA commands to another vehicle), getNodeCount and getBeamCount functions to physics core
      • Improved arcade gearbox engine RPM buildup
      • Fixed drivetrain bugs that affected reverse gears
      • Fixed bug with oilTemperature when no engine exists
      • Tweaked spoiler jbeams for cars with spoilers

      Known Problems

      • Missing vehicle props (steering wheel, etc) in garage mode
      • Vehicles don’t spawn in the correct position in garage mode
      • Render artifacts with vehicle spotlights
      • Replay: Switching vehicles or levels may crash the game
      • Replay: Recording broken after vehicles lose parts
      • Replay: Audio and some visual effects not working
      Instructions on how to update the game here.
      Bug reporting/Help Thread here.

      « Newer Posts || Older Posts »