I have to write a paper (for graphics class in college) about collision analysis of vehicles in point cloud environment. I’m new to unreal engine. I have some experience in c++.
I’m trying to create a code that changes color of ‘touched’ or overlapped points in point cloud when a car is placed in point cloud.
At the moment I have no luck with finding good tutorial/demo or piece of documentation to show me how to achieve this.
I am not familiar with the Lidar plugin, however the process to achieve what the video showcased shouldn’t be to difficult to create.
Basically you require a mesh that has collision and can change color.
Create a material that has a Float 4 parameter, which will allow you to change the color of the mesh during runtime.
Setup a new Blueprint Actor and add the required mesh that will change color.
Add a collision for the mesh.
Setup the code so that when the car, boat, sphere or whatever is overlapping the mesh it changes color from one to another using the exposed parameter.
You can scatter meshes using the painter tool. If you are required to use the Lidar plugin, I assume you require a different setup like this:
Create a point cloud in UE4 using the Lidar plugin, or import a point cloud from a Lidar data file.
Add collision detection to the point cloud by creating a collision mesh. This can be done by using the “Create Collision” feature in UE4.
Implement a custom collision event in C++ to listen for collision between the vehicle and the point cloud. This event will be triggered when the vehicle collides with one or more points in the point cloud.
In the collision event, use the Unreal Engine’s built-in functionality to change the color of the “touched” or overlapped points in the point cloud.
It may be helpful to look at the official documentation of Unreal Engine and Lidar plugin, as well as tutorials and examples that demonstrate the use of collision detection and physics in UE4.
Keep in mind that this is a high-level overview and there may be additional steps required to achieve exactly what you want. Also, you can consider using Blueprints, which is UE4’s visual scripting system, to achieve the same goal without writing C++ code.