3D target point rendering method and apparatus, device, and storage medium
View Patent ↗Disclosed in the embodiments of the present disclosure are a three dimension (3D) target point rendering method, apparatus, a device and a storage medium. The method comprises: selecting and determining a preset number of mesh vertexes in a target model as initial 3D target points; acquiring first depth information of the initial 3D target points, and determining a non-hidden 3D target point based on the first depth information; determining a display size and a rotation angle of the non-hidden 3D target point; and rendering the non-hidden 3D target points based on the display size and the rotation angle.
1 . A three dimensional (3D) point rendering method, comprising:
selecting a preset number of mesh vertex points in a model as candidate locations for rendering a 3D point, wherein the model comprises a virtual 3D model of an object;
acquiring first depth information of each of the selected mesh vertex points;
determining a non-hidden mesh vertex point from the selected mesh vertex points based on the first depth information;
determining a display size and a rotation angle of the non-hidden mesh vertex point; and
rendering a 3D point at the non-hidden mesh vertex point based on the display size and the rotation angle.
2 . The method according to claim 1 , wherein after selecting the preset number of mesh vertex points in the model, the method further comprises:
acquiring a rotational angular velocity of the model; and
updating the candidate locations for rendering the 3D point in response to the rotational angular velocity being greater than an angular velocity set value.
3 . The method according to claim 2 , wherein acquiring the rotational angular velocity of the model comprises:
acquiring a first rotation Euler angle of the model in a previous frame and acquiring a second rotation Euler angle in a current frame; and
determining the rotational angular velocity of the model based on the first rotation Euler angle and the second rotation Euler angle.
4 . The method according to claim 1 , wherein determining the non-hidden mesh vertex based on the first depth information comprises:
obtaining second depth information of the model;
determining an initial 3D target point with the first depth information less than or equal to the second depth information as the non-hidden mesh vertex point; and
determining an initial 3D target point with the first depth information greater than the second depth information as a hidden mesh vertex point.
5 . The method according to claim 1 , wherein determining the display size of the non-hidden mesh vertex point comprises:
acquiring a size range of the non-hidden mesh vertex point; and
selecting, for each of non-hidden mesh vertex points, a size value within the size range as the display size of the non-hidden mesh vertex point.
6 . The method according to claim 1 , wherein determining the rotation angle of the non-hidden mesh vertex point comprises:
acquiring a first ray direction in which a virtual lamp is projected to a set plane and ray direction a second ray direction in which a center point of the model is projected to the set plane; and
determining an included angle between the first ray direction and the second ray direction as the rotation angle of the non-hidden mesh vertex point.
7 . The method according to claim 1 , wherein rendering the 3D point at the non-hidden mesh vertex point based on the display size and the rotation angle comprises:
rotating the non-hidden mesh vertex point around a center point of the non-hidden mesh vertex point by the rotation angle; and
rendering the rotated non-hidden mesh vertex point based on the display size.
8 . The method according to claim 1 , wherein the rendered 3D point is a point with brightness exceeding a set brightness value.
9 . An electronic device, comprising:
at least one processing apparatus; and
a storage apparatus, configured to store at least one program,
the at least one program, when executed by the at least one processing apparatus, causes electronic device to:
select a preset number of mesh vertex points in a model as candidate locations for rendering a 3D point, wherein the model comprises a virtual 3D model of an object;
acquire first depth information of each of the selected mesh vertex points;
determine a non-hidden mesh vertex point from the selected mesh vertex points based on the first depth information;
determine a display size and a rotation angle of the non-hidden mesh vertex point; and
render a 3D point at the non-hidden mesh vertex point based on the display size and the rotation angle.
10 . A non-transitory computer-readable medium, wherein the computer-readable medium stores a computer program, and the computer program, when executed by a processing apparatus cause the processing apparatus to:
select a preset number of mesh vertex points in a model as candidate locations for rendering a 3D point, wherein the model comprises a virtual 3D model of an object;
acquire first depth information of each of the selected mesh vertex points;
determine a non-hidden mesh vertex point from the selected mesh vertex points based on the first depth information;
determine a display size and a rotation angle of the non-hidden mesh vertex point; and
render a 3D point at the non-hidden mesh vertex point based on the display size and the rotation angle.
11 . The electronic device according to claim 9 , wherein after selecting the preset number of mesh vertex points in the model, the electronic device is further caused to:
acquire a rotational angular velocity of the model; and
update the candidate locations for rendering the 3D point in response to the rotational angular velocity being greater than an angular velocity set value.
12 . The electronic device according to claim 11 , wherein the at least one program causing the electronic device to acquire the rotational angular velocity of the model comprises a program causing the electronic device to:
acquire a first rotation Euler angle of the model in a previous frame and acquiring a second rotation Euler angle in a current frame; and
determine the rotational angular velocity of the model based on the first rotation Euler angle and the second rotation Euler angle.
13 . The electronic device according to claim 9 , wherein the at least one program causing the electronic device to determine the non-hidden mesh vertex point based on the first depth information comprises a program causing the electronic device to:
obtain second depth information of the model;
determine an initial 3D target point with the first depth information less than or equal to the second depth information as the non-hidden mesh vertex point; and
determine an initial 3D target point with the first depth information greater than the second depth information as a hidden mesh vertex point.
14 . The electronic device according to claim 9 , wherein the at least one program causing the electronic device to determine the display size of the non-hidden mesh vertex point comprises a program causing the electronic device to:
acquire a size range of the non-hidden mesh vertex point; and
select, for each of non-hidden mesh vertex points, a size value within the size range as the display size of the non-hidden mesh vertex point.
15 . The electronic device according to claim 9 , wherein the at least one program causing the electronic device to determine the rotation angle of the non-hidden mesh vertex point comprises a program causing the electronic device to:
acquire a first ray direction in which a virtual lamp is projected to a set plane and ray direction a second ray direction in which a center point of the model is projected to the set plane; and
determine an included angle between the first ray direction and the second ray direction as the rotation angle of the non-hidden mesh vertex point.
16 . The electronic device according to claim 9 , wherein the at least one program causing the electronic device to render the 3D point at the non-hidden mesh vertex point based on the display size and the rotation angle comprises a program causing the electronic device to:
rotate the non-hidden mesh vertex point around a center point of the non-hidden mesh vertex point by the rotation angle; and
render the rotated non-hidden mesh vertex point based on the display size.
17 . The electronic device according to claim 9 , wherein the rendered 3D point is a point with brightness exceeding a set brightness value.
18 . The non-transitory storage medium according to claim 10 , wherein after selecting the preset number of mesh vertex points in the target model, the computer program further causes the processing apparatus to:
acquire a rotational angular velocity of the model; and
update the candidate locations for rendering the 3D point in response to the rotational angular velocity being greater than an angular velocity set value.
19 . The non-transitory storage medium according to claim 10 , wherein the computer program causing the processing apparatus to determine the non-hidden mesh vertex point based on the first depth information comprises a program causing the processing apparatus to:
obtain second depth information of the model;
determine an initial 3D target point with the first depth information less than or equal to the second depth information as the non-hidden mesh vertex point; and
determine an initial 3D target point with the first depth information greater than the second depth information as a hidden mesh vertex point.
20 . The non-transitory storage medium according to claim 10 , wherein the computer program causing the processing apparatus to determine the display size of the non-hidden mesh vertex point comprises a program causing the processing apparatus to:
acquire a size range of the non-hidden mesh vertex point; and
select, for each of non-hidden mesh vertex points, a size value within the size range as the display size of the non-hidden mesh vertex point.