[go: up one dir, main page]

CN111598992B - Partition removing and rendering method and system based on Unity3D body and surface model - Google Patents

Partition removing and rendering method and system based on Unity3D body and surface model Download PDF

Info

Publication number
CN111598992B
CN111598992B CN202010271116.4A CN202010271116A CN111598992B CN 111598992 B CN111598992 B CN 111598992B CN 202010271116 A CN202010271116 A CN 202010271116A CN 111598992 B CN111598992 B CN 111598992B
Authority
CN
China
Prior art keywords
plane
point
model
rendering
normal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010271116.4A
Other languages
Chinese (zh)
Other versions
CN111598992A (en
Inventor
肖建如
吕天予
周振华
马科威
杨诚
矫健
李晓林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiaao Information Technology Development Co ltd
Original Assignee
Shanghai Jiaao Information Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaao Information Technology Development Co ltd filed Critical Shanghai Jiaao Information Technology Development Co ltd
Priority to CN202010271116.4A priority Critical patent/CN111598992B/en
Publication of CN111598992A publication Critical patent/CN111598992A/en
Application granted granted Critical
Publication of CN111598992B publication Critical patent/CN111598992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/40Hidden part removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/08Volume rendering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides a partition removing rendering method and a system based on a Unity3D body and a face model, wherein the method comprises the following steps: and a coordinate conversion step: obtaining a model local coordinate in a Unityloader, and converting the obtained model local coordinate into a world coordinate; normal line transmission step: transmitting any point P and plane normal N in a plane to the unitshader through the cpu; and a plane judging step: judging whether the point on the model is above or below the plane; and a data rendering step: if the point on the model is above the plane, not rendering the point; if a point on the model is below the plane, the point is rendered if v < 0. The application achieves the purpose of dividing the plane model by the vector and normal angle determined by the model point and the plane internal point.

Description

Partition removing and rendering method and system based on Unity3D body and surface model
Technical Field
The application relates to the technical field of model segmentation, in particular to a partition elimination rendering method and system based on a Unity3D body and a face model. And more particularly to a Unity3D model based surface curve measurement method.
Background
At present, the calculation amount of the segmentation model in the cpu is very large, and each triangular surface needs to be processed and then three-dimensional reconstruction is carried out.
In the prior art (chinese patent application No. 200910006405.5, which discloses a "three-dimensional model segmentation apparatus and method"), such a method for detecting a segmented model in a plane cannot guarantee real-time performance and good performance, although the three-dimensional reconstruction of the segmented model can be realized.
The prior patent document CN108479067a (application number: 201810325677.0) discloses a method and apparatus for rendering a game screen. The method comprises the following steps: acquiring a control meeting preset transparency; generating a grid model according to the control; synchronously loading a grid model corresponding to the control in the process that the control is displayed on the game picture; and respectively rendering pixels which are not blocked by the grid model and pixels corresponding to the control in the game picture.
Disclosure of Invention
Aiming at the defects in the prior art, the application aims to provide a partition elimination rendering method based on a Unity3D body and a surface model.
The application provides a partition elimination rendering method based on a Unity3D body and a plane model, which comprises the following steps of
And a coordinate conversion step: obtaining a model local coordinate in a Unityloader, and converting the obtained model local coordinate into a world coordinate;
normal line transmission step: transmitting any point P and plane normal N in a plane to the unitshader through the cpu;
and a plane judging step: judging whether the point on the model is above or below the plane;
and a data rendering step: if the point on the model is above the plane, not rendering the point; if a point on the model is below the plane, the point is rendered if v < 0.
Preferably, the coordinate conversion step:
and obtaining the local coordinates of the model in the Unityloader, and converting the obtained local coordinates of the model into world coordinates through a matrix built in the Unityloader.
Preferably, the normal transmission step:
the data above the planar normal will be rejected;
data below the plane normal will be rendered.
Preferably, the plane judging step:
judging whether the point on the model is above or below the plane:
interpolating the coordinates of the point Xn on the model with the incoming in-plane point P to obtain a vector XnP, calculating XnP the dot product v of the plane normal N, if v >0, the point Xn being above the plane; if v <0, point Xn is below the plane.
Preferably, the data rendering step:
if v >0, the point is not rendered, and if v <0, the point is rendered.
The application provides a partition removing and rendering system based on a Unity3D body and a plane model, which comprises
And a coordinate conversion module: obtaining a model local coordinate in a Unityloader, and converting the obtained model local coordinate into a world coordinate;
normal line transmission module: transmitting any point P and plane normal N in a plane to the unitshader through the cpu;
and the plane judging module is used for: judging whether the point on the model is above or below the plane;
and a data rendering module: if the point on the model is above the plane, not rendering the point; if a point on the model is below the plane, the point is rendered if v < 0.
Preferably, the coordinate conversion module:
and obtaining the local coordinates of the model in the Unityloader, and converting the obtained local coordinates of the model into world coordinates through a matrix built in the Unityloader.
Preferably, the normal transmission module:
the data above the planar normal will be rejected;
data below the plane normal will be rendered.
Preferably, the plane judgment module:
judging whether the point on the model is above or below the plane:
interpolating the coordinates of the point Xn on the model with the incoming in-plane point P to obtain a vector XnP, calculating XnP the dot product v of the plane normal N, if v >0, the point Xn being above the plane; if v <0, point Xn is below the plane.
Preferably, the data rendering module is characterized in that:
if v >0, the point is not rendered, and if v <0, the point is rendered.
Compared with the prior art, the application has the following beneficial effects:
1. the application achieves the purpose of dividing the plane model by the vector and normal angle determined by the model point and the plane internal point.
2. The application eliminates the model of volume rendering by using the face model as a carrier through Colormask 0.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a schematic diagram of a point on a judgment model provided by the application above or below a plane.
Detailed Description
The present application will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present application, but are not intended to limit the application in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present application.
The application provides a partition elimination rendering method based on a Unity3D body and a plane model, which comprises the following steps of
And a coordinate conversion step: obtaining a model local coordinate in a Unityloader, and converting the obtained model local coordinate into a world coordinate;
normal line transmission step: transmitting any point P and plane normal N in a plane to the unitshader through the cpu;
and a plane judging step: judging whether the point on the model is above or below the plane;
and a data rendering step: if the point on the model is above the plane, not rendering the point; if a point on the model is below the plane, the point is rendered if v < 0.
Specifically, the coordinate conversion step:
and obtaining the local coordinates of the model in the Unityloader, and converting the obtained local coordinates of the model into world coordinates through a matrix built in the Unityloader.
Specifically, the normal line transmission step:
the data above the planar normal will be rejected;
data below the plane normal will be rendered.
Specifically, the plane judgment step:
judging whether the point on the model is above or below the plane:
interpolating the coordinates of the point Xn on the model with the incoming in-plane point P to obtain a vector XnP, calculating XnP the dot product v of the plane normal N, if v >0, the point Xn being above the plane; if v <0, point Xn is below the plane.
Specifically, the data rendering step:
if v >0, the point is not rendered, and if v <0, the point is rendered.
The application provides a partition removing and rendering system based on a Unity3D body and a plane model, which comprises
And a coordinate conversion module: obtaining a model local coordinate in a Unityloader, and converting the obtained model local coordinate into a world coordinate;
normal line transmission module: transmitting any point P and plane normal N in a plane to the unitshader through the cpu;
and the plane judging module is used for: judging whether the point on the model is above or below the plane;
and a data rendering module: if the point on the model is above the plane, not rendering the point; if a point on the model is below the plane, the point is rendered if v < 0.
Specifically, the coordinate conversion module:
and obtaining the local coordinates of the model in the Unityloader, and converting the obtained local coordinates of the model into world coordinates through a matrix built in the Unityloader.
Specifically, the normal transmission module:
the data above the planar normal will be rejected;
data below the plane normal will be rendered.
Specifically, the plane judgment module:
judging whether the point on the model is above or below the plane:
interpolating the coordinates of the point Xn on the model with the incoming in-plane point P to obtain a vector XnP, calculating XnP the dot product v of the plane normal N, if v >0, the point Xn being above the plane; if v <0, point Xn is below the plane.
Specifically, the method is characterized in that the data rendering module:
if v >0, the point is not rendered, and if v <0, the point is rendered.
The present application will be described more specifically by way of preferred examples.
Preferred example 1:
partition elimination rendering based on Unity3D volume and surface model:
step 1: model local coordinates are obtained in the unitshader and converted into world coordinates through unitjobjecttoworld (a matrix built in by Unity).
Step 2: transmitting any point P and plane normal N (data above the plane normal is to be removed and data below the plane normal is to be rendered) in a plane through the CPU;
step 3: judging whether the point on the model is above or below the plane: point X on the model n Interpolation is performed between the coordinates of (a) and the incoming in-plane point P to obtain a vector X n P, calculate X n P and the dot product v of the plane normal N.
Step 4: if v >0, the point is not rendered, and if v <0, the point is rendered.
Preferred example 2:
according to the method, the effect of dividing the model by the plane is achieved in the level SaderLab through the included angle between the vector determined by one point on the plane and the model point of the plane and the normal line of the plane, and the model on one side of the plane is removed by using a discard command.
The application uses the loader of the face model added with Colormask0 to reject the volume data of the model area to realize the effect of rejecting the volume model.
The application provides a partition elimination rendering method based on a Unity3D body and a face model, which comprises the following steps:
converting coordinates: obtaining a model local coordinate in a Unityloader and converting the model local coordinate into a world coordinate;
inputting data: transmitting a point in the plane and a plane normal to the unitshader through the cpu;
as shown in fig. 1, the step of judging the positional relationship between the points on the model and the plane comprises the following steps: determining a vector according to a point in the plane and a point on the model, and calculating an included angle between the vector and the normal, wherein the included angle is smaller than 90 degrees and is above the plane, and the included angle is larger than 90 degrees and is below the plane;
intercepting an area: intercepting an eighth area by taking intersections through three orthogonal planes;
the surface and volume model processing steps: creating a face model, using a loader of ColorMask 0; so that the area where the face model and the volumetric model intersect is truncated.
In the description of the present application, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application.
Those skilled in the art will appreciate that the systems, apparatus, and their respective modules provided herein may be implemented entirely by logic programming of method steps such that the systems, apparatus, and their respective modules are implemented as logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc., in addition to the systems, apparatus, and their respective modules being implemented as pure computer readable program code. Therefore, the system, the apparatus, and the respective modules thereof provided by the present application may be regarded as one hardware component, and the modules included therein for implementing various programs may also be regarded as structures within the hardware component; modules for implementing various functions may also be regarded as being either software programs for implementing the methods or structures within hardware components.
The foregoing describes specific embodiments of the present application. It is to be understood that the application is not limited to the particular embodiments described above, and that various changes or modifications may be made by those skilled in the art within the scope of the appended claims without affecting the spirit of the application. The embodiments of the application and the features of the embodiments may be combined with each other arbitrarily without conflict.

Claims (2)

1. A partition elimination rendering method based on a Unity3D body and a face model is characterized by comprising the following steps of
And a coordinate conversion step: obtaining a model local coordinate in a Unityloader, and converting the obtained model local coordinate into a world coordinate;
normal line transmission step: transmitting any point P and plane normal N in a plane to the unitshader through the cpu;
and a plane judging step: judging whether the point on the model is above or below the plane;
and a data rendering step: if the point on the model is above the plane, not rendering the point; if the point on the model is below the plane, rendering the point if v < 0;
the coordinate conversion step:
obtaining a model local coordinate in the Unityloader, and converting the obtained model local coordinate into a world coordinate through a matrix built in the Unityloader;
the plane judging step comprises the following steps:
judging whether the point on the model is above or below the plane:
interpolating the coordinates of the point Xn on the model with the incoming in-plane point P to obtain a vector XnP, calculating XnP the dot product v of the plane normal N, if v >0, the point Xn being above the plane; if v <0, point Xn is below the plane;
the normal line transmission step:
the data above the planar normal will be rejected;
data below the plane normal is to be rendered;
the data rendering step:
if v >0, the point is not rendered, and if v <0, the point is rendered.
2. A partition removing and rendering system based on a Unity3D body and a plane model is characterized by comprising
And a coordinate conversion module: obtaining a model local coordinate in a Unityloader, and converting the obtained model local coordinate into a world coordinate;
normal line transmission module: transmitting any point P and plane normal N in a plane to the unitshader through the cpu;
and the plane judging module is used for: judging whether the point on the model is above or below the plane;
and a data rendering module: if the point on the model is above the plane, not rendering the point; if the point on the model is below the plane, rendering the point if v < 0;
the coordinate conversion module is used for:
obtaining a model local coordinate in the Unityloader, and converting the obtained model local coordinate into a world coordinate through a matrix built in the Unityloader;
the plane judging module is used for:
judging whether the point on the model is above or below the plane:
interpolating the coordinates of the point Xn on the model with the incoming in-plane point P to obtain a vector XnP, calculating XnP the dot product v of the plane normal N, if v >0, the point Xn being above the plane; if v <0, point Xn is below the plane;
the normal line transmission module:
the data above the planar normal will be rejected;
data below the plane normal is to be rendered;
the data rendering module:
if v >0, the point is not rendered, and if v <0, the point is rendered.
CN202010271116.4A 2020-04-08 2020-04-08 Partition removing and rendering method and system based on Unity3D body and surface model Active CN111598992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010271116.4A CN111598992B (en) 2020-04-08 2020-04-08 Partition removing and rendering method and system based on Unity3D body and surface model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010271116.4A CN111598992B (en) 2020-04-08 2020-04-08 Partition removing and rendering method and system based on Unity3D body and surface model

Publications (2)

Publication Number Publication Date
CN111598992A CN111598992A (en) 2020-08-28
CN111598992B true CN111598992B (en) 2023-10-31

Family

ID=72191989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010271116.4A Active CN111598992B (en) 2020-04-08 2020-04-08 Partition removing and rendering method and system based on Unity3D body and surface model

Country Status (1)

Country Link
CN (1) CN111598992B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345771A (en) * 2013-06-28 2013-10-09 中国科学技术大学 Efficient image rendering method based on modeling
CN104268922A (en) * 2014-09-03 2015-01-07 广州博冠信息科技有限公司 Image rendering method and device
CN109308735A (en) * 2018-08-20 2019-02-05 上海嘉奥信息科技发展有限公司 The method and its storage medium that data based on the rendering of Unity3D body punch
CN110910505A (en) * 2019-11-29 2020-03-24 西安建筑科技大学 Accelerated rendering method of scene model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI450215B (en) * 2010-12-14 2014-08-21 Via Tech Inc Pre-culling processing method, system and computer readable medium for hidden surface removal of image objects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345771A (en) * 2013-06-28 2013-10-09 中国科学技术大学 Efficient image rendering method based on modeling
CN104268922A (en) * 2014-09-03 2015-01-07 广州博冠信息科技有限公司 Image rendering method and device
CN109308735A (en) * 2018-08-20 2019-02-05 上海嘉奥信息科技发展有限公司 The method and its storage medium that data based on the rendering of Unity3D body punch
CN110910505A (en) * 2019-11-29 2020-03-24 西安建筑科技大学 Accelerated rendering method of scene model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Trabecular Anatomy of the Axis Vertebra: A Study of Shaded Volume-Rendered Computed Tomography Images;K. Venugopal Menon等;《World Neurosurgery》;全文 *
基于虚拟现实的渲染优化算法;李媛媛;罗训;;计算机系统应用(第06期);全文 *
基于虚拟现实的渲染优化算法;李媛媛等;《计算机系统应用》;第28卷(第6期);全文 *

Also Published As

Publication number Publication date
CN111598992A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
US20240338850A1 (en) Method for detecting object poses, and computer device and storage medium thereof
CN111583381B (en) Game resource map rendering method and device and electronic equipment
CN104851127B (en) It is a kind of based on interactive building point cloud model texture mapping method and device
CN101599181A (en) A real-time rendering method of algebraic B-spline surface
US20230388470A1 (en) Neural network training for implicit rendering
US11281935B2 (en) 3D object detection from calibrated 2D images
US20230386107A1 (en) Anti-aliasing for real-time rendering using implicit rendering
CN111494944A (en) Terrain texture loading method and related device
US12112533B2 (en) Method and apparatus for data calculation in neural network model, and image processing method and apparatus
CN106952216B (en) Line detection method based on IMX6 graphics processor
CN116310060B (en) Method, device, equipment and storage medium for rendering data
Ling et al. Research on gesture recognition based on YOLOv5
CN115619986B (en) Scene roaming method, device, equipment and medium
CN111598992B (en) Partition removing and rendering method and system based on Unity3D body and surface model
CN114170367B (en) Method, apparatus, storage medium, and device for infinite-line-of-sight pyramidal heatmap rendering
CN113033256A (en) Training method and device for fingertip detection model
CN114612513B (en) FPGA-based image pyramid light value calculation method and system
Jang et al. Fast collision detection using the A-buffer
CN116630516A (en) 3D characteristic-based 2D rendering ordering method, device, equipment and medium
CN111191309B (en) Real-time shielding and rejecting method, device and equipment suitable for BIM light weight
Scholz et al. Level of Detail for Real-Time Volumetric Terrain Rendering.
CN113470150A (en) Method and system for restoring mouth shape based on skeletal drive
US12182939B2 (en) Real-time rendering of image content generated using implicit rendering
CN111047498A (en) GPU hardware copy buffer algorithm-oriented TLM microstructure
CN117952322B (en) An engineering management system based on BIM technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant