Only the sensors or visualizers written with custom shaders need to be migrated to URP/HDRP. The rest of them will work without any changes.
Which means the Depth Camera, RGBD Camera, DepthBuffer Lidar and the Point Cloud Visualizers need to be migrated.
In addition to the shader, the post-processing steps are also different in URP/HDRP. In the built-in pipeline, the post-processing is applied in the OnRenderImage
method of the script. In URP/HDRP, the post-processing steps are different.
Note
Now only support migrating the Depth Camera and RGBD Camera to URP/HDRP.
-
Create the URP project
-
Install the ROS-TCP-Connector package
-
Copy the
UnitySensors
andUnitySensorsROS
folders to the project -
Update the materials from
Window
->Rendering
->Render Pipeline Converter
. Tick theRendering Settings
andMaterial Upgrade
then clickInitialize And Convert
-
Open
DepthCamera
Shader Graph, changeActive Targets
fromBuilt-in
toUnivsrsal
, then change the material toFullscreen
and clickSave Asset
-
Go to the
Settings
folder, create a newURP Universal Render
asset calledURP-DepthCamera-Renderer
, and add theFull Screen Pass Renderer Feture
on it -
On the
Full Screen Pass Renderer Feture
, select theDepthCamera
Shader Graph as thePass Material
. -
Add the
URP-DepthCamera-Renderer
to theRenderer List
ofDefault Render Pipeline Asset
, such as theURP-HighFidelity
asset. And tick theDepth Texture
selection -
Select the
DepthCamera
andRGBDCamera
prefabs, set their renderer toURP-DepthCamera-Renderer
-
The Depth Camera and RGBD Camera should work normally in URP
Migrating to HDRP is relatively simple. You need to:
-
Create the HDRP project
-
Install the ROS-TCP-Connector package
-
Copy the
UnitySensors
andUnitySensorsROS
folders to the project -
Update the materials from
Window
->Rendering
->HDRP Wizard
. ClickConvert All Built-in Materials to HDRP
-
Open
DepthCamera
Shader Graph, changeActive Targets
fromBuilt-in
toHDRP
, then change the material toFullscreen
and clickSave Asset
-
Add a custom pass volume in the scene via
Volume
->Custom Pass
. Set theMode
toCamera
, drag the Depth Camera or RGBD Camera in the scene to theTarget Camera
. Add theFull Screen Custom Pass
in theCustom Passes
list. Set theFullScreen Material
toDepthCamera
Shader Graph. -
The Depth Camera and RGBD Camera should work normally in HDRP