CN112546626B - Object display method and device combined with lamplight, electronic equipment and storage medium - Google Patents

Object display method and device combined with lamplight, electronic equipment and storage medium Download PDF

Info

Publication number
CN112546626B
CN112546626B CN202011451753.6A CN202011451753A CN112546626B CN 112546626 B CN112546626 B CN 112546626B CN 202011451753 A CN202011451753 A CN 202011451753A CN 112546626 B CN112546626 B CN 112546626B
Authority
CN
China
Prior art keywords
data
lamplight
light
model
virtual
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
CN202011451753.6A
Other languages
Chinese (zh)
Other versions
CN112546626A (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.)
Hangzhou Electronic Soul Network Technology Co Ltd
Original Assignee
Hangzhou Electronic Soul Network Technology 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 Hangzhou Electronic Soul Network Technology Co Ltd filed Critical Hangzhou Electronic Soul Network Technology Co Ltd
Priority to CN202011451753.6A priority Critical patent/CN112546626B/en
Publication of CN112546626A publication Critical patent/CN112546626A/en
Application granted granted Critical
Publication of CN112546626B publication Critical patent/CN112546626B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Image Generation (AREA)

Abstract

The application relates to an object display method, a device, electronic equipment and a storage medium combined with lamplight, belonging to the technical field of game development, wherein the method comprises the following steps: acquiring lamplight data and object data, wherein the lamplight data is Vector4 list data of a preset virtual lamplight model, and the object data is position data of each pixel point of an object in a game scene; based on the lamplight data and the object data, analyzing whether the object intersects with the virtual lamplight model, and if so, displaying the intersected part; detecting whether each small model body of an object of the display part collides with lamplight, wherein the object is segmented in advance to obtain the small model bodies; the small model body settings that will collide may interact with the game character. According to the method, the problem of how to render the appearance and disappearance of the object can be effectively solved aiming at the effect of the lamplight mechanism on the object, and the appearance part of the object can interact with the game role in the method, so that the visual effect is more in line with reality.

Description

Object display method and device combined with lamplight, electronic equipment and storage medium
Technical Field
The present application relates to the field of game development technologies, and in particular, to a method and apparatus for displaying an object in combination with lamplight, an electronic device, and a storage medium.
Background
In the game development process, the prior art generally only processes illumination rendering, such as rendering textures, shadows, colors, and the like of objects, so as to reflect realistic scene effects under illumination. However, the light in the prior art cannot act on the object, so that the object appears and disappears. That is, in the related art, no effective solution has been proposed for how to render the appearance and disappearance of an object with respect to the action of a light authority on the object.
Disclosure of Invention
The embodiment of the application provides an object display method, device, electronic equipment and storage medium combined with lamplight, which at least solve the problem of how to render the appearance and disappearance of an object aiming at the effect of lamplight authorities on the object in the related technology.
In a first aspect, an embodiment of the present application provides a method for displaying an object in combination with light, including: acquiring lamplight data and object data, wherein the lamplight data are Vector4 list data of a preset virtual lamplight model, and the object data are position data of each pixel point of an object in a game scene; analyzing whether the object intersects the virtual lamp model based on the lamp light data and the object data, and if so, displaying the intersected part; detecting whether each small model body of the object of the display part collides with lamplight, wherein the object is segmented in advance to obtain the small model bodies; the small block model body settings that will collide may interact with the game character.
In some embodiments, said analyzing whether said object is in phase with said virtual light model based on said light data and said object data comprises: and analyzing whether the position data of the pixel points fall in the virtual lamplight model body or not according to each pixel point of the object, and if so, judging that the object and the virtual lamplight model body are intersected.
In some embodiments, detecting whether each small model of the object of the display portion collides with the light comprises: detecting whether each small block model body of the object of the display part collides with light or not through a Unity3D engine.
In some of these embodiments, the small block model body setting that will collide may interact with a game character comprising: and setting a mark which can interact with the game role for the small block model body which is collided.
In some of these embodiments, the Vector4 list data includes coordinates and a radius.
In some of these embodiments, the type of light pattern body includes at least one of a globe lamp, a cone lamp, and a cylindrical area lamp.
In a second aspect, embodiments of the present application provide an object display device that incorporates light, including: the device comprises an acquisition module, an analysis module, a display module, a detection module and a setting module, wherein the acquisition module is used for acquiring lamplight data and object data, the lamplight data are Vector4 list data of a preset virtual lamplight model, and the object data are position data of each pixel point of an object in a game scene; the analysis module is used for analyzing whether the object is intersected with the virtual lamp model body or not based on the lamp light data and the object data, and if yes, displaying the intersected part; the display module is used for displaying the intersected part; the detection module is used for detecting whether each small model body of the object of the display part collides with lamplight or not, wherein the object is segmented in advance to obtain the small model bodies; the setting module is used for setting the small block model body which is in collision to be interactable with the game role.
In some embodiments, said analyzing whether said object is in phase with said virtual light model based on said light data and said object data comprises: and analyzing whether the position data of the pixel points fall in the virtual lamplight model body or not according to each pixel point of the object, and if so, judging that the object and the virtual lamplight model body are intersected.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a storage medium storing a computer program, where the computer program when executed by the processor implements a method for displaying an object in combination with light as set forth in any one of the above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for displaying an object in combination with light as set forth in any one of the above.
According to the above, the method for displaying the object combined with the light according to the embodiment of the application includes: acquiring lamplight data and object data, wherein the lamplight data is Vector4 list data of a preset virtual lamplight model, and the object data is position data of each pixel point of an object in a game scene; based on the lamplight data and the object data, analyzing whether the object intersects with the virtual lamplight model, and if so, displaying the intersected part; detecting whether each small model body of an object of the display part collides with lamplight, wherein the object is segmented in advance to obtain the small model bodies; the small model body settings that will collide may interact with the game character. According to the method, the problem of how to render the appearance and disappearance of the object can be effectively solved for the light mechanism to act on the object, and the appearance part of the object can interact with the game role in the method, so that the visual effect is more consistent with reality.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flow chart of a method of displaying objects in combination with light according to an embodiment of the present application;
fig. 2 is an expression schematic diagram of a type of a virtual lamp light model according to an embodiment of the present application as a globe lamp;
fig. 3 is an expression schematic diagram of a type of a virtual lamp light model according to an embodiment of the present application as a cone lamp;
fig. 4 is a schematic representation of a virtual lamp model of the type of a cylindrical area lamp according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a geometric representation of analyzing whether a pixel is within a cylindrical area light according to an embodiment of the present application;
FIG. 6 is a schematic representation of a light authority acting on an object according to an embodiment of the present application;
FIG. 7 is a block diagram of an object display device incorporating light according to an embodiment of the present application;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described and illustrated below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden on the person of ordinary skill in the art based on the embodiments provided herein, are intended to be within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the embodiments described herein can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar terms herein do not denote a limitation of quantity, but rather denote the singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein refers to two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
In the game, a lamplight mechanism is needed to be realized sometimes, so that when lamplight irradiates an object, the object appears; so that the object disappears when the light does not irradiate the object. At present, only illumination rendering is processed aiming at lamplight, and the lamplight cannot act on an object, so that the object appears and disappears. Therefore, the embodiment of the application provides an object display method combined with lamplight. Fig. 1 is a flowchart of an object display method combined with light according to an embodiment of the present application, as shown in fig. 1, including the steps of:
s100: acquiring lamplight data and object data, wherein the lamplight data is Vector4 list data of a preset virtual lamplight model, and the object data is position data of each pixel point of an object in a game scene;
s200: based on the lamplight data and the object data, analyzing whether the object intersects with the virtual lamplight model, and if so, displaying the intersected part;
s300: detecting whether each small model body of an object of the display part collides with lamplight, wherein the object is segmented in advance to obtain the small model bodies;
s400: the small model body settings that will collide may interact with the game character.
According to the above, if the object intersects the virtual lamp model, it means that there are pixels irradiated with the lamp light, and then the portion irradiated with the lamp light composed of these pixels is displayed, and also means that if the object does not intersect the virtual lamp model, it means that the object is not irradiated with the lamp light, and then the pixels of the object are not visualized. Therefore, the problem of how to render the appearance and disappearance of the object can be effectively solved for the light mechanism acting on the object. In addition, in the method, the object is divided into small model bodies in advance, so that the small model bodies which collide with the lamplight are arranged to interact with the game roles, and the small model bodies which do not collide with the lamplight are not processed (namely are not arranged to interact with the game roles), so that the fact that the parts of the object which are displayed can interact with the game roles and the hidden parts disappear in the scene and cannot interact with the game roles is achieved, and the visual effect is more practical.
Hereinafter, each step of the object display method combined with light according to the embodiment of the present application will be described in detail.
Step S100: and acquiring lamplight data and object data, wherein the lamplight data is Vector4 list data of a preset virtual lamplight model, and the object data is position data of each pixel point of an object in a game scene. Specifically, a virtual lamp model is added to the lamp light, and the data of the virtual lamp model is organized and simplified into coordinate and radius list data (list data of Vector4, which may be simply referred to as "lamp light data"). In this embodiment of the present application, the types of the virtual lamp light modules described above may be classified into three types according to game requirements: spherical lamp, conical lamp, cylindrical zone lamp. Here, the data of the virtual lamp model is organized into two sets of vectors 4, for example, referred to as "V4A" and "V4B". Each Vector4 contains (X, Y, Z, W), where (X, Y, Z) is the center coordinates of the virtual lamp model and W is the illumination radius (i.e., the illumination furthest distance) of the virtual lamp model.
As an example, the above-mentioned virtual lamp light model is a spherical lamp, fig. 2 is an expression schematic diagram of the type of the virtual lamp light model according to the embodiment of the present application, as shown in fig. 2, the lamp light type corresponding to the spherical lamp is a point light source, the data are sorted into V4A (Xa, ya, za, wr) and V4B (Xb, yb, zb, wr), and as xa=xb, ya=yb, za=zb, that is, the coordinates of V4A and V4B overlap, and the radius (Wr) is identical, v4b=v4a can be seen.
As an example, the virtual lamp light model is a cone lamp, fig. 3 is an expression schematic diagram of the type of the virtual lamp light model according to the embodiment of the present application, and as shown in fig. 3, the lamp light type corresponding to the cone lamp is a spotlight, and the data are sorted into V4A (Xa, ya, za, 0) and V4B (Xb, yb, zb, wr), where the distance between the coordinates of V4A and V4B is the height of the cone, the radius of V4A is 0, and the radius of V4B is Wr.
As an example, the above-mentioned virtual lamp light model is a cylindrical area lamp, and fig. 4 is an expression schematic diagram of the type of the virtual lamp light model according to the embodiment of the present application as the cylindrical area lamp, as shown in fig. 4, the cylindrical area lamp does not have a corresponding lamp light type, and specifically, data may be sorted into V4A (Xa, ya, za, wr) and V4B (Xb, yb, zb, wr) according to game requirements, where the distance between the coordinates of V4A and V4B is the height of the cylinder, and the radius is Wr.
Step S200: and analyzing whether the object is intersected with the virtual lamp model based on the lamp light data and the object data, and if so, displaying the intersected part. Specifically, for each pixel point of the object, whether the position data of the pixel point falls in the virtual lamplight model body is analyzed, and if yes, the intersection of the object and the virtual lamplight model body is judged. In the following, taking a virtual lamp light model as a cylindrical area lamp as an example, fig. 5 is a schematic diagram of geometric expression of analyzing whether a pixel point is in the cylindrical area lamp according to an embodiment of the present application, as shown in fig. 5, lamplight data V4A is a coordinate point a and a radius Ra, lamplight data V4B is a coordinate point B and a radius Rb, the point a is an origin, an AB line is an x-axis, a coordinate system is established, a point C is a pixel point on a lamplight irradiation object, and whether the point C is in a capsule body (i.e., the virtual lamp light model) is determined:
step 1: vector AC is multiplied by vector AB to obtain projection AC' of vector AC on vector AB;
step 2: judging that if AC 'is negative, the point C' is at the left side of the point A; if AC 'is greater than distance AB, then point C' is to the right of point B; if AC 'is greater than 0 and less than distance AB, then point C' is intermediate between points A and B;
step 3: if the C' point is to the left of the A point, the modulus of the vector AC is greater than Ra, then the C point is not within the capsule; if the C' point is on the right side of the B point, the vector AC is subtracted from the vector AB to obtain a vector BC, and if the modulus of the vector BC is larger than Rb, the C point is not in the capsule body; if the C 'point is between the A point and the B point, if the distance CC' from the C point to the AB line is larger than Ra, the C point is not in the capsule body;
step 4: if the point C is in the capsule body, the point C is intersected with a model body (namely a virtual lamp model body) formed by lamp light data, and the intersected part, namely the point C, is displayed, for example, alpha is set to be 1; if point C is not in the capsule body, it means that point C is not matched with the model body composed of lamplight data, and the point C is not displayed, for example Alpha is set to 0, namely transparent treatment.
Step S300: detecting whether each small model body of the object of the display part collides with the lamplight, wherein the object is segmented in advance to obtain the small model bodies. Specifically, whether each small model body of the object of the display part collides with the light or not may be detected by the Unity3D engine.
Step S400: the small model body settings that will collide may interact with the game character. In particular, a marker that can interact with the game character can be set for the colliding small block model body.
Based on the above, as an example, fig. 6 is a schematic representation of the light mechanism acting on an object according to an embodiment of the present application, and as shown in fig. 6, a virtual model body called "virtual light model body" is attached to the light mechanism, and light data is collected for the virtual light model body. The lamplight irradiator segmentation module is used for segmenting an object to obtain a small model body. Detecting collision intersection states based on the light data and the position data of the pixel points of the object, and then displaying the intersection parts of the light irradiation objects, wherein the states of the displayed small model bodies are set to be interactable with game roles; and hiding the non-intersecting part of the lamplight irradiation object, wherein the state of the hidden part is set to be incapable of interacting with the game character.
The embodiment of the application also provides an object display device combined with light, fig. 7 is a block diagram of the structure of the object display device combined with light according to the embodiment of the application, as shown in fig. 7, the device includes: the device comprises an acquisition module 1, an analysis module 2, a display module 3, a detection module 4 and a setting module 5, wherein the acquisition module 1 is used for acquiring lamplight data and object data, the lamplight data are Vector4 list data of a preset virtual lamplight model, and the object data are position data of each pixel point of an object in a game scene; the analysis module 2 is configured to analyze whether the object intersects the virtual lamp model based on the lamp light data and the object data, if yes, display the intersecting portion, for example, analyze, for each pixel point of the object, whether the position data of the pixel point falls in the virtual lamp model, and if yes, judge that the object intersects the virtual lamp model; the display module 3 is used for displaying the intersected part; the detection module 4 is used for detecting whether each small model body of the object of the display part collides with lamplight, wherein the object is segmented in advance to obtain the small model bodies; the setting module 5 is used for setting the small block model body which is in collision to interact with the game role.
For the display processing: receiving lamplight data in real time, analyzing whether a model body formed by the lamplight data intersects with an object, and setting Alpha to be 1 for the intersecting part; for non-intersecting portions, alpha is set to 0, i.e., transparent processing. The analysis process is to judge the position data and the lamplight data of each pixel point of the object and calculate the position data and the lamplight data by using a mathematical mode of the distance from the point to the line.
For physical treatment: dividing an object into small model bodies, performing collision detection on each small model body and the virtual lamplight model body, and setting a mark capable of interacting with a game character on the small model bodies which are collided.
An electronic device according to an embodiment of the present application is also provided, and fig. 8 is a block diagram of a structure of the electronic device according to an embodiment of the present application, and as shown in fig. 8, the electronic device may include a processor 81 and a memory 82 storing computer program instructions.
In particular, the processor 81 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 82 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 82 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, solid state Drive (Solid State Drive, SSD), flash memory, optical Disk, magneto-optical Disk, tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. The memory 82 may include removable or non-removable (or fixed) media, where appropriate. The memory 82 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 82 is a Non-Volatile (Non-Volatile) memory. In a particular embodiment, the Memory 82 includes Read-Only Memory (ROM) and random access Memory (Random Access Memory, RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, abbreviated PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated EPROM), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, abbreviated EEPROM), an electrically rewritable ROM (Electrically Alterable Read-Only Memory, abbreviated EAROM), or a FLASH Memory (FLASH), or a combination of two or more of these. The RAM may be Static Random-Access Memory (SRAM) or dynamic Random-Access Memory (Dynamic Random Access Memory DRAM), where the DRAM may be a fast page mode dynamic Random-Access Memory (Fast Page Mode Dynamic Random Access Memory FPMDRAM), extended data output dynamic Random-Access Memory (Extended Date Out Dynamic Random Access Memory EDODRAM), synchronous dynamic Random-Access Memory (Synchronous Dynamic Random-Access Memory SDRAM), or the like, as appropriate.
Memory 82 may be used to store or cache various data files that need to be processed and/or communicated, as well as possible computer program instructions for execution by processor 81.
The processor 81 reads and executes the computer program instructions stored in the memory 82 to implement any of the object display methods in combination with the light in the above-described embodiments.
In some of these embodiments, the electronic device may also include a communication interface 83 and a bus 80. As shown in fig. 8, the processor 81, the memory 82, and the communication interface 83 are connected to each other via the bus 80 and perform communication with each other.
The communication interface 83 is used to implement communications between various modules, devices, units, and/or units in embodiments of the present application. The communication interface 83 may also enable communication with other components such as: and the external equipment, the image/data acquisition equipment, the database, the external storage, the image/data processing workstation and the like are used for data communication.
Bus 80 includes hardware, software, or both that couple components of the electronic device to one another. Bus 80 includes, but is not limited to, at least one of: data Bus (Data Bus), address Bus (Address Bus), control Bus (Control Bus), expansion Bus (Expansion Bus), local Bus (Local Bus). By way of example, and not limitation, bus 80 may include a graphics acceleration interface (Accelerated Graphics Port), abbreviated AGP, or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) Bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industry Standard Architecture, ISA) Bus, a wireless bandwidth (InfiniBand) interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a micro channel architecture (Micro Channel Architecture, abbreviated MCa) Bus, a peripheral component interconnect (Peripheral Component Interconnect, abbreviated PCI) Bus, a PCI-Express (PCI-X) Bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, abbreviated SATA) Bus, a video electronics standards association local (Video Electronics Standards Association Local Bus, abbreviated VLB) Bus, or other suitable Bus, or a combination of two or more of the foregoing. Bus 80 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
In addition, in combination with the method for displaying an object combined with light in the above embodiment, the embodiment of the application may be implemented by providing a computer readable storage medium. The computer readable storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the object display methods in combination with light described in the above embodiments.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method of displaying an object in combination with light, comprising:
acquiring lamplight data and object data, wherein the lamplight data are Vector4 list data of a preset virtual lamplight model, and the object data are position data of each pixel point of an object in a game scene;
analyzing whether the object intersects the virtual lamp model based on the lamp light data and the object data, and if so, displaying the intersected part;
detecting whether each small model body of the object of the display part collides with lamplight, wherein the object is segmented in advance to obtain the small model bodies;
the small block model body settings that will collide may interact with the game character.
2. The method of claim 1, wherein analyzing whether the object is in phase with the virtual light model based on the light data and the object data comprises:
and analyzing whether the position data of the pixel points fall in the virtual lamplight model body or not according to each pixel point of the object, and if so, judging that the object and the virtual lamplight model body are intersected.
3. The method of claim 1, wherein detecting whether each of the small model bodies of the object of the display section collides with the light comprises:
detecting whether each small block model body of the object of the display part collides with light or not through a Unity3D engine.
4. The method of claim 1, wherein the step of arranging the small model body to be collided to interact with the game character comprises:
and setting a mark which can interact with the game role for the small block model body which is collided.
5. The method of claim 1, wherein the Vector4 list data includes coordinates and a radius.
6. The lighting-combined object display method according to claim 1, wherein the type of the lighting model body includes at least one of a spherical lamp, a conical lamp, and a cylindrical area lamp.
7. An object display device incorporating light, comprising:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring light data and object data, the light data is Vector4 list data of a preset virtual light model, and the object data is position data of each pixel point of an object in a game scene;
the analysis module is used for analyzing whether the object is intersected with the virtual lamp model or not based on the lamp light data and the object data, and if yes, displaying the intersected part;
a display module for displaying the intersecting portions;
the detection module is used for detecting whether each small model body of the object of the display part collides with lamplight or not, wherein the object is segmented in advance to obtain the small model bodies;
and the setting module is used for setting the small block model body which is in collision to be interactable with the game role.
8. The lighting-combined object display apparatus as defined in claim 7, wherein the analyzing whether the object is in phase with the virtual lighting model based on the lighting data and the object data comprises:
and analyzing whether the position data of the pixel points fall in the virtual lamplight model body or not according to each pixel point of the object, and if so, judging that the object and the virtual lamplight model body are intersected.
9. An electronic device comprising a processor and a storage medium storing a computer program, wherein the computer program when executed by the processor implements the light-combined object display method according to any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the object display method in combination with light as claimed in any one of claims 1 to 6.
CN202011451753.6A 2020-12-09 2020-12-09 Object display method and device combined with lamplight, electronic equipment and storage medium Active CN112546626B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011451753.6A CN112546626B (en) 2020-12-09 2020-12-09 Object display method and device combined with lamplight, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011451753.6A CN112546626B (en) 2020-12-09 2020-12-09 Object display method and device combined with lamplight, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112546626A CN112546626A (en) 2021-03-26
CN112546626B true CN112546626B (en) 2024-03-26

Family

ID=75061741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011451753.6A Active CN112546626B (en) 2020-12-09 2020-12-09 Object display method and device combined with lamplight, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112546626B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5325472A (en) * 1990-04-13 1994-06-28 Matsushita Electric Industrial Co., Ltd. Image displaying system for interactively changing the positions of a view vector and a viewpoint in a 3-dimensional space
CN105701853A (en) * 2014-12-15 2016-06-22 三星电子株式会社 3D rendering method and apparatus
CN108236783A (en) * 2018-01-09 2018-07-03 网易(杭州)网络有限公司 The method, apparatus of illumination simulation, terminal device and storage medium in scene of game
CN111105491A (en) * 2019-11-25 2020-05-05 腾讯科技(深圳)有限公司 Scene rendering method and device, computer readable storage medium and computer equipment
CN111167120A (en) * 2019-12-31 2020-05-19 网易(杭州)网络有限公司 Method and device for processing virtual model in game
CN111739142A (en) * 2019-03-22 2020-10-02 厦门雅基软件有限公司 Scene rendering method and device, electronic equipment and computer readable storage medium
CN111760277A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Illumination rendering method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5325472A (en) * 1990-04-13 1994-06-28 Matsushita Electric Industrial Co., Ltd. Image displaying system for interactively changing the positions of a view vector and a viewpoint in a 3-dimensional space
CN105701853A (en) * 2014-12-15 2016-06-22 三星电子株式会社 3D rendering method and apparatus
CN108236783A (en) * 2018-01-09 2018-07-03 网易(杭州)网络有限公司 The method, apparatus of illumination simulation, terminal device and storage medium in scene of game
CN111739142A (en) * 2019-03-22 2020-10-02 厦门雅基软件有限公司 Scene rendering method and device, electronic equipment and computer readable storage medium
CN111105491A (en) * 2019-11-25 2020-05-05 腾讯科技(深圳)有限公司 Scene rendering method and device, computer readable storage medium and computer equipment
CN111167120A (en) * 2019-12-31 2020-05-19 网易(杭州)网络有限公司 Method and device for processing virtual model in game
CN111760277A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Illumination rendering method and device

Also Published As

Publication number Publication date
CN112546626A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
KR101626236B1 (en) Techniques for reducing memory access bandwidth in a graphics processing system based on destination alpha values
JP4579262B2 (en) Early Z-test method and system for rendering three-dimensional images
US9092906B2 (en) Graphic processor and method of early testing visibility of pixels
US7145565B2 (en) Depth bounds testing
US20180300915A1 (en) Method of and apparatus for processing graphics
US20140362081A1 (en) Using compute shaders as front end for vertex shaders
US10943389B2 (en) Removing or identifying overlapping fragments after z-culling
CN111760277B (en) Illumination rendering method and device
KR20160130629A (en) Apparatus and Method of rendering for binocular disparity image
US11727654B2 (en) Ambient light based mixed reality object rendering
KR20210119899A (en) Graphics processing
WO2017095617A1 (en) Writing graphics data from local memory to system memory
CN114529658A (en) Graph rendering method and related equipment thereof
US20220005257A1 (en) Adaptive ray tracing suitable for shadow rendering
US10417813B2 (en) System and method for generating temporally stable hashed values
CN115701305A (en) Shadow screening
US20120218261A1 (en) Graphic system comprising a fragment graphic module and relative rendering method
CN112546626B (en) Object display method and device combined with lamplight, electronic equipment and storage medium
CN115317916A (en) Method and device for detecting overlapped objects in virtual scene and electronic equipment
US9607390B2 (en) Rasterization in graphics processing system
CN110838167B (en) Model rendering method, device and storage medium
EP3232405A1 (en) Image processing apparatus and method for processing images, and recording medium
EP2551826A2 (en) Drawing device
US20070279421A1 (en) Vertex Shader Binning
CN112381915A (en) Physical principle-based ambient light reflection simulation method, device and storage medium

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