CN109603156A - Rendering method and device - Google Patents

Rendering method and device Download PDF

Info

Publication number
CN109603156A
CN109603156A CN201811516378.1A CN201811516378A CN109603156A CN 109603156 A CN109603156 A CN 109603156A CN 201811516378 A CN201811516378 A CN 201811516378A CN 109603156 A CN109603156 A CN 109603156A
Authority
CN
China
Prior art keywords
real
value
rendering
vegetation model
time lighting
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.)
Granted
Application number
CN201811516378.1A
Other languages
Chinese (zh)
Other versions
CN109603156B (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.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software 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 Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201811516378.1A priority Critical patent/CN109603156B/en
Publication of CN109603156A publication Critical patent/CN109603156A/en
Application granted granted Critical
Publication of CN109603156B publication Critical patent/CN109603156B/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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • 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/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • A63F2300/538Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing for performing operations on behalf of the game client, e.g. rendering
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images

Abstract

The present embodiments relate to 3d gamings to render processing technology field, in particular to a kind of rendering method and device.The rendering method can calculate the environment light masking weighted value of vegetation model when game client is offline, real-time lighting intensity value is calculated when game client is online, and game client is made to be based on environment light masking weighted value and the subsequent rendering calculating of illumination intensity value realization and model rendering, so, both the calculating pressure of game client had been alleviated, computational efficiency is improved, in turn ensures the rendering effect of game client.

Description

Rendering method and device
Technical field
The present embodiments relate to 3d gamings to render processing technology field, in particular to a kind of rendering method and Device.
Background technique
In the outdoor scene of 3D game, the rendering of vegetation is particularly important.But existing foliage rendering method calculates effect Rate is low and display effect is poor.
Summary of the invention
In view of this, the present invention provides a kind of rendering method and devices.
The embodiment of the invention provides a kind of rendering methods, applied to the game services communicated to connect with game client End, which comprises
When the game client is in off-line state, the vegetation model in scene of game is obtained;
Environment light masking weighted value is loaded onto described by the environment light masking weighted value for calculating the vegetation model In the color attribute information of vegetation model, the vegetation model is sent to the game client;
When the game client is online, the real-time lighting vector in the scene of game is obtained, according to The real-time lighting vector calculates real-time lighting intensity value;
The real-time lighting intensity value is sent to the game client, makes the game client according to described real-time Environment light masking weighted value in the color attribute of illumination intensity value and the vegetation model, which calculates, obtains rendered color value, makes The game client carries out rendering to the vegetation model according to the rendered color value and will complete the vegetation model of rendering It is shown.
Optionally, include multiple vertex color attribute informations in the vegetation model, the environment light is covered into weighted value The step being loaded onto the color attribute information of the vegetation model, comprising:
Environment light masking weighted value is added separately in each vertex color attribute information of the vegetation model.
Optionally, the step of real-time lighting intensity value being calculated according to the real-time lighting vector, comprising:
Real-time lighting intensity value corresponding to the real-time lighting vector is calculated using Lambert illumination model algorithm.
Optionally, make the game client according to the real-time lighting intensity value and the color category of the vegetation model Property in environment light masking weighted value calculate obtain rendered color value the step of, comprising:
Make the game client will be in the color attribute information of the real-time lighting intensity value and shown vegetation model Environment light covers weighted value multiplication and obtains the rendered color value.
The embodiment of the invention also provides a kind of rendering methods, applied to the game client communicated to connect with game services end End, which comprises
When being in off-line state, the vegetation model that the game services end is sent is obtained, wherein the vegetation model Environment light masking weighted value is loaded in color attribute information;
When being online, the real-time lighting intensity value that the game services end is sent is obtained;According to described real-time Environment light masking weighted value in the color attribute of illumination intensity value and the vegetation model, which calculates, obtains rendered color value, root Rendering is carried out to the vegetation model according to the rendered color value and shows the vegetation model for completing rendering.
The embodiment of the invention also provides a kind of rendering devices, applied to the game services communicated to connect with game client End, described device include:
First vegetation model obtains module, for obtaining scene of game when the game client is in off-line state In vegetation model;
Environment light covers weight value calculation module, and the environment light for calculating the vegetation model covers weighted value, will The environment light masking weighted value is loaded onto the color attribute information of the vegetation model, and the vegetation model is sent to institute State game client;
Real-time lighting intensity value computing module, for obtaining the trip when the game client is online Real-time lighting vector in scene of playing, calculates real-time lighting intensity value according to the real-time lighting vector;
First rendering module makes the game for the real-time lighting intensity value to be sent to the game client Client covers weighted value meter according to the environment light in the color attribute of the real-time lighting intensity value and the vegetation model Calculate and obtain rendered color value, make the game client according to the rendered color value vegetation model is rendered and incite somebody to action The vegetation model for completing rendering is shown.
It optionally, include multiple vertex color attribute informations in the vegetation model, environment light covers weighted value and calculates mould Environment light masking weighted value is loaded onto the color attribute information of the vegetation model by block, is specifically included:
Environment light masking weighted value is added separately in each vertex color attribute information of the vegetation model.
Optionally, it is strong according to the real-time lighting vector to calculate real-time lighting for the real-time lighting intensity value computing module Angle value specifically includes:
Real-time lighting intensity value corresponding to the real-time lighting vector is calculated using Lambert illumination model algorithm.
Optionally, the rendering module makes the game client according to the real-time lighting intensity value and the vegetation Environment light masking weighted value in the color attribute of model, which calculates, obtains rendered color value, specifically includes:
Make the game client will be in the color attribute information of the real-time lighting intensity value and shown vegetation model Environment light covers weighted value multiplication and obtains the rendered color value.
The embodiment of the invention also provides a kind of rendering devices, applied to the game client communicated to connect with game services end End, described device include:
Second vegetation model obtains module, for when being in off-line state, obtaining the plant that the game services end is sent By model, wherein be loaded with environment light masking weighted value in the color attribute information of the vegetation model;
Second rendering module is strong for when being online, obtaining the real-time lighting that the game services end is sent Angle value;It is calculated according to the environment light masking weighted value in the color attribute of the real-time lighting intensity value and the vegetation model Rendered color value is obtained, rendering is carried out to the vegetation model according to the rendered color value and the vegetation model of rendering will be completed It is shown.
The embodiment of the invention also provides a kind of game services end, including memory, processor and it is stored in memory Computer program that is upper and can running on a processor, the processor realize above-mentioned rendering when executing the computer program Method.
The embodiment of the invention also provides a kind of computer readable storage medium, the readable storage medium storing program for executing includes computer Program, game services end executes above-mentioned rendering side the computer program controls the readable storage medium storing program for executing when running where Method.
Beneficial effect
Rendering method provided in an embodiment of the present invention and device, game services end can be in offline shape in game client The environment light masking weighted value that vegetation model is calculated when state, can be avoided and directly calculate the masking of environment light by game client Weighted value, also avoid game client EMS memory occupation it is excessive caused by game Caton phenomenon, game services end can also swum The real-time lighting intensity value being calculated is sent to game client when play client is in online state, and makes game client End according to real-time lighting intensity value and environment light masking weighted value calculate obtain rendered color value, then make game client according to Rendered color value carries out rendering to vegetation model and shows the vegetation model for completing rendering, so, it is possible in game visitor Family end memory improves foliage rendering effect under the premise of occupying less.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is a kind of block diagram at game services end 10 provided by the embodiment of the present invention.
Fig. 2 is a kind of flow chart of rendering method provided by the embodiment of the present invention.
Fig. 3 is a kind of another flow chart of rendering method provided by the embodiment of the present invention.
Fig. 4 is a kind of module frame chart of rendering device 20 provided by the embodiment of the present invention.
Fig. 5 is a kind of another module frame chart of rendering device 20 provided by the embodiment of the present invention.
Icon:
10- game services end;11- memory;12- processor;13- network module;
20- rendering device;The first vegetation model of 21- obtains module;22- environment light covers weight value calculation module;23- is real When illumination intensity value computing module;The first rendering module of 24-;The second vegetation model of 25- obtains module;The second rendering module of 26-.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment only It is a part of the embodiments of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings The component of embodiment can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiments of the present invention, this field is common Technical staff's every other embodiment obtained without creative efforts belongs to the model that the present invention protects It encloses.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.
Inventor further investigation reveals that, existing foliage rendering method computational efficiency is low and display effect is poor.In foliage rendering When, a difficult point for needing to solve is exactly the illumination calculation of leaf, it will be understood that vegetation model is by a large amount of leaf Triangle Model groups At huger scene of game is along with more leaf Triangle Models, the existing illumination calculation for leaf Triangle Model Method calculation amount is too big, can occupy a large amount of Internet resources, and especially for game client, a large amount of illumination calculation can make The processing excess load of game client, and then lead to game Caton, influence user experience.In addition, comparing to reduce calculation amount Universal foliage rendering method is that the illumination pattern provided using game engines such as static illumination patterns, such as Unity bakes function, should Method is to calculate illumination by offline biggest advantage of light track algorithm, then illumination calculation result is stored in one and is puted up in figure, and game is being transported This illumination pattern directly directly can be reached into lighting effect in " patch " to leaf when row, but this mode can acquired wash with watercolours It is poor to contaminate effect.
Defect present in the above scheme in the prior art, is that inventor is obtaining after practicing and carefully studying As a result, therefore, the solution that the discovery procedure of the above problem and the hereinafter embodiment of the present invention are proposed regarding to the issue above Scheme all should be the contribution that inventor makes the present invention in process of the present invention.
Based on the studies above, the embodiment of the invention provides a kind of rendering method and devices, can either improve illumination calculation Efficiency can be improved rendering display effect again.
Fig. 1 shows a kind of block diagram at game services end 10 provided by the embodiment of the present invention.The present invention is implemented Game services end 10 in example has data storage, transmission, processing function, as shown in Figure 1, game services end 10 includes: storage Device 11, processor 12, network module 13 and rendering device 20.
It is directly or indirectly electrically connected between memory 11, processor 12 and network module 13, to realize the biography of data Defeated or interaction.It is electrically connected for example, these elements can be realized from each other by one or more communication bus or signal wire. Rendering device 20 is stored in memory 11, the rendering device 20 includes at least one can be with software or firmware (firmware) Form be stored in the software function module in the memory 11, the processor 12 is stored in memory 11 by operation Software program and module, such as the embodiment of the present invention in rendering device 20, thereby executing various function application and number According to processing, i.e. rendering method in the realization embodiment of the present invention.
Wherein, the memory 11 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc.. Wherein, memory 11 is for storing program, and the processor 12 executes described program after receiving and executing instruction.
The processor 12 may be a kind of IC chip, the processing capacity with data.Above-mentioned processor 12 It can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc..It may be implemented or execute each method, step disclosed in the embodiment of the present invention and patrol Collect block diagram.General processor can be microprocessor or the processor is also possible to any conventional processor etc..
Network module 13 is used for the communication link established between game services end 10 and other communication terminal devices by network It connects, realizes the transmitting-receiving operation of network signal and data.Above-mentioned network signal may include wireless signal or wire signal.
It is appreciated that structure shown in FIG. 1 is only to illustrate, game services end 10 may also include it is more than shown in Fig. 1 or The less component of person, or with the configuration different from shown in Fig. 1.Each component shown in Fig. 1 can using hardware, software or A combination thereof is realized.
The embodiment of the present invention also provides a kind of computer readable storage medium, and the readable storage medium storing program for executing includes computer journey Sequence.Game services end 10 executes following rendering side the computer program controls the readable storage medium storing program for executing when running where Method.
It is appreciated that game services end 10 shown in fig. 1 is communicated to connect with game client, wash with watercolours provided by the present embodiment Completion that dyeing method is actually game services end 10 and game client is worked in coordination, for purposes of illustration only, first with game garment The angle at business end 10 is illustrated.
Fig. 2 shows a kind of flow charts of rendering method provided by the embodiment of the present invention.The related process of the method Defined method and step is applied to game services end 10, can be realized by the processor 12.It below will be to tool shown in Fig. 2 Body process is described in detail:
Step S21 obtains the vegetation model in scene of game when game client is in off-line state.
Due to there is communication connection between game services end and game client, game services end can obtain in real time To online, the off-line state of game client, in the present embodiment, the online state of game client refers to that user logs in game account Family enters game, and the off-line state of game client refers to that user exits game (it can be appreciated that exiting stepping on for game account Record).
For example, being directed to certain mobile phone terminal network game APP, when game client is in off-line state, mobile phone is not over trip Play the Account Logon APP.At this point, game server is able to detect that game client is in off-line state, and then obtain the net The vegetation model of a certain scene of game of trip.
In the present embodiment, vegetation model includes a large amount of leaf Triangle Models, and each leaf Triangle Model is independent mutually, by This to realize rendering effect true to nature as it can be seen that need the illumination to each leaf Triangle Model to be calculated in real time, if swimming Play client (mobile phone terminal) carries out, and undoubtedly will increase the data processing pressure of mobile phone terminal, if having been calculated in advance at game services end Finish and retransmit to mobile phone, and is unable to satisfy the requirement of real-time.
Therefore, the present embodiment in view of the above technical problems improves rendering method, so that a part of illumination calculation It is realized by game services end, another part illumination calculation is realized by game client.
Wherein, the calculation amount for the illumination calculation realized by game services end is larger, can be in offline in game client It is carried out when state, and the vegetation model that step S21 is obtained exactly is used for this part and calculates, please continue to refer to step S22.
Step S22, calculates the environment light masking weighted value of vegetation model, and environment light masking weighted value is loaded onto vegetation In the color attribute information of model, vegetation model is sent to game client.
Environment light masking weighted value (Ambient Occlusion, AO) is a kind of quantized value for reacting illumination model, its energy Enough reflect the relationship near in pixel intensity and scene between object, by improving shade come real better visual effect, Improve the depth and stereovision of scene.If wanting accurately calculating to realize better visual effect, the meter of AO value for realization AO value Calculation amount will be very huge, if so big calculation amount all carries out instant computing realization by game client, will lead to game The processing pressure of client doubles, and then leads to the Caton of game, influences the game experiencing of user, therefore, in the present embodiment, The calculating of AO value is carried out when game client is in off-line state by game services end.It so, it is possible to maximally utilise Game client is in this section " window phase " of off-line state, avoids applying excessive data processing pressure to game client.
It specifically, can be independent for each leaf Triangle Model in vegetation model when calculating the AO value of vegetation model The calculating of AO value is carried out, after the AO value for calculating each leaf Triangle Model, for each leaf Triangle Model, by AO value point The multiple leaf Triangle Modules for not being loaded onto three vertex color attribute informations of the leaf Triangle Model, and AO value being loaded with Type is sent to game client.
In this way, avoiding game client executes heavy AO value calculating task, the resource of game client is released.
In the present embodiment, AO can be realized by importing multiple leaf Triangle Models in 3dsmax modelling software The calculating of value.
It is appreciated that game services end by the multiple leaf Triangle Models for being loaded with AO value be sent to game client it Afterwards, game client can store the multiple leaf Triangle Models for being loaded with AO value, convenient for it is online later when use.
Step S23 obtains the real-time lighting vector in scene of game when game client is online, according to Real-time lighting vector calculates real-time lighting intensity value.
When game client is online, there can be real-time, random illumination in scene of game, these illumination are radiated at multiple Certain lighting effect can be generated in leaf Triangle Model, in order to realize illumination render true to nature, need to deposit in scene of game Illumination carry out quantification treatment, in the present embodiment, game services end can obtain the real-time lighting vector in scene of game, and The corresponding real-time lighting intensity value of real-time lighting vector is calculated using Lambert (Lambert) illumination model algorithm.
In this way, also can reduce the calculating pressure of game client, game client " vacating space " can be made to carry out wash with watercolours Dye calculates.
Real-time lighting intensity value is sent to game client, makes game client according to real-time lighting intensity by step S24 Environment light masking weighted value in the color attribute of value and vegetation model, which calculates, obtains rendered color value, makes game client root Rendering is carried out to vegetation model according to rendered color value and shows the vegetation model for completing rendering.
Game services end can will calculate the real-time lighting intensity value obtained and be sent to game client, and make game client Subsequent rendering is carried out to calculate.
Specifically, it is illustrated with the angle of game client, game client is obtaining each leaf Triangle Model Real-time lighting intensity value after, each vertex color attribute of the real-time lighting intensity value and the leaf Triangle Model can be believed AO value in breath is multiplied and then obtains rendered color value.Then the leaf Triangle Model is rendered according to rendered color value. Finally, the multiple leaf Triangle Models for completing rendering are shown.
In this way, game client only needs to carry out the calculating of rendered color value and subsequent rendering processing, save a large amount of Memory headroom, on the one hand, can be avoided game Caton, on the other hand, can be realized the real-time of rendering, guarantee rendering effect Verisimilitude.
Optionally, the present embodiment is also illustrated rendering method using game client as executing subject, please specifically join Read Fig. 3.
Step S31 obtains the vegetation model that game services end is sent, wherein vegetation model when being in off-line state Environment light masking weighted value is loaded in color attribute information.
Step S32 obtains the real-time lighting intensity value that the game services end is sent when being online;According to Environment light masking weighted value calculating in the color attribute of the real-time lighting intensity value and the vegetation model is rendered Color value carries out rendering to the vegetation model according to the rendered color value and shows the vegetation model for completing rendering Show.
It is appreciated that the realization principle of rendering method shown in Fig. 3 and the realization principle class of rendering method shown in Fig. 2 Seemingly, it is only illustrated from the angle of different executing subjects, therefore no longer step shown in Fig. 3 is described further herein.
On the basis of the above, Fig. 4 shows a kind of module frame chart of rendering device 20 provided in an embodiment of the present invention, described Rendering device 20 includes: that the first vegetation model obtains module 21, environment light masking weight value calculation module 22, real-time lighting intensity It is worth computing module 23 and the first rendering module 24.
First vegetation model obtains module 21, for obtaining sports ground when the game client is in off-line state Vegetation model in scape.
Since the first vegetation model acquisition module 21 is similar with the realization principle of step S21 in Fig. 2, do not make herein more More explanations.
Environment light covers weight value calculation module 22, and the environment light for calculating the vegetation model covers weighted value, Environment light masking weighted value is loaded onto the color attribute information of the vegetation model, the vegetation model is sent to The game client.
Since environment light masking weight value calculation module 22 is similar with the realization principle of step S22 in Fig. 2, herein not Make more explanations.
Real-time lighting intensity value computing module 23, for when the game client is online, described in acquisition Real-time lighting vector in scene of game calculates real-time lighting intensity value according to the real-time lighting vector.
Since real-time lighting intensity value computing module 23 is similar with the realization principle of step S23 in Fig. 2, do not make herein More explanations.
First rendering module 24 makes the trip for the real-time lighting intensity value to be sent to the game client Client of playing covers weighted value according to the environment light in the color attribute of the real-time lighting intensity value and the vegetation model It calculates and obtains rendered color value, render the game client simultaneously to the vegetation model according to the rendered color value The vegetation model for completing rendering is shown.
Since the first rendering module 24 is similar with the realization principle of step S24 in Fig. 2, do not illustrate more herein.
Fig. 5 shows a kind of another module frame chart of rendering device 20 provided in an embodiment of the present invention, the rendering device 20 include: that the second vegetation model obtains module 25 and the second rendering module 26.
Second vegetation model obtains module 25, for when being in off-line state, obtaining what the game services end was sent Vegetation model, wherein environment light masking weighted value is loaded in the color attribute information of the vegetation model;
Since the second vegetation model acquisition module 25 is similar with the realization principle of step S31 in Fig. 3, do not make herein more More explanations.
Second rendering module 26, the real-time lighting sent for when being online, obtaining the game services end Intensity value;Weighted value meter is covered according to the environment light in the color attribute of the real-time lighting intensity value and the vegetation model It calculates and obtains rendered color value, rendering is carried out to the vegetation model according to the rendered color value and the vegetation mould of rendering will be completed Type is shown.
Since the second rendering module 26 is similar with the realization principle of step S32 in Fig. 3, do not illustrate more herein.
To sum up, rendering method and device provided by the embodiment of the present invention, game services end can be realized the masking of environment light The off-line calculation of weighted value and real-time lighting intensity value in line computation, shared the calculating pressure of game client, in turn Guarantee that game client can be realized true to nature, real-time illumination render, in this way, can reduce memory usage amount can also improve rendering Effect.
In several embodiments provided by the embodiment of the present invention, it should be understood that disclosed device and method, it can also To realize by another way.Device and method embodiment described above is only schematical, for example, in attached drawing Flow chart and block diagram show that the devices of multiple embodiments according to the present invention, method and computer program product are able to achieve Architecture, function and operation.In this regard, each box in flowchart or block diagram can represent module, a program A part of section or code, a part of the module, section or code include that one or more is patrolled for realizing defined Collect the executable instruction of function.It should also be noted that in some implementations as replacement, function marked in the box It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be held substantially in parallel Row, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or The combination of each box in flow chart and the box in block diagram and or flow chart, can the function as defined in executing or dynamic The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation together Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, game services end 10 or the network equipment etc.) execute all or part of each embodiment the method for the present invention Step.And storage medium above-mentioned include: USB flash disk, it is mobile hard disk, read-only memory (ROM, Read-Only Memory), random Access various Jie that can store program code such as memory (RAM, Random Access Memory), magnetic or disk Matter.It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to nonexcludability Include so that include a series of elements process, method, article or equipment not only include those elements, but also Including other elements that are not explicitly listed, or further include for this process, method, article or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method, article or equipment of element.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of rendering method, which is characterized in that applied to the game services end communicated to connect with game client, the method Include:
When the game client is in off-line state, the vegetation model in scene of game is obtained;
Environment light masking weighted value is loaded onto the vegetation by the environment light masking weighted value for calculating the vegetation model In the color attribute information of model, the vegetation model is sent to the game client;
When the game client is online, the real-time lighting vector in the scene of game is obtained, according to described Real-time lighting vector calculates real-time lighting intensity value;
The real-time lighting intensity value is sent to the game client, makes the game client according to the real-time lighting Environment light masking weighted value in the color attribute of intensity value and the vegetation model, which calculates, obtains rendered color value, makes described Game client carries out rendering to the vegetation model according to the rendered color value and carries out the vegetation model for completing rendering Display.
2. rendering method according to claim 1, which is characterized in that include multiple vertex color categories in the vegetation model Property information, by the environment light masking weighted value be loaded onto the step in the color attribute information of the vegetation model, comprising:
Environment light masking weighted value is added separately in each vertex color attribute information of the vegetation model.
3. rendering method according to claim 1, which is characterized in that calculate Real-Time Optical according to the real-time lighting vector The step of according to intensity value, comprising:
Real-time lighting intensity value corresponding to the real-time lighting vector is calculated using Lambert illumination model algorithm.
4. rendering method according to claim 1, which is characterized in that make the game client according to the real-time lighting Environment light masking weighted value in the color attribute of intensity value and the vegetation model calculates the step of obtaining rendered color value, Include:
Make the game client by the environment in the color attribute information of the real-time lighting intensity value and shown vegetation model Light covers weighted value multiplication and obtains the rendered color value.
5. a kind of rendering method, which is characterized in that applied to the game client communicated to connect with game services end, the method Include:
When being in off-line state, the vegetation model that the game services end is sent is obtained, wherein the color of the vegetation model Environment light masking weighted value is loaded in attribute information;
When being online, the real-time lighting intensity value that the game services end is sent is obtained;According to the real-time lighting Environment light masking weighted value in the color attribute of intensity value and the vegetation model, which calculates, obtains rendered color value, according to institute Rendered color value is stated to carry out rendering to the vegetation model and show the vegetation model for completing rendering.
6. a kind of rendering device, which is characterized in that applied to the game services end communicated to connect with game client, described device Include:
First vegetation model obtains module, for obtaining in scene of game when the game client is in off-line state Vegetation model;
Environment light covers weight value calculation module, and the environment light for calculating the vegetation model covers weighted value, will be described Environment light masking weighted value is loaded onto the color attribute information of the vegetation model, and the vegetation model is sent to the trip Play client;
Real-time lighting intensity value computing module, for obtaining the sports ground when the game client is online Real-time lighting vector in scape calculates real-time lighting intensity value according to the real-time lighting vector;
First rendering module makes the game client for the real-time lighting intensity value to be sent to the game client It is obtained according to the environment light masking weighted value calculating in the color attribute of the real-time lighting intensity value and the vegetation model at end Rendered color value is obtained, the game client is made to carry out rendering to the vegetation model according to the rendered color value and will be completed The vegetation model of rendering is shown.
7. rendering device according to claim 6, which is characterized in that include multiple vertex color categories in the vegetation model Property information, environment light covers weight value calculation module and environment light masking weighted value is loaded onto the color of the vegetation model In attribute information, specifically include:
Environment light masking weighted value is added separately in each vertex color attribute information of the vegetation model.
8. rendering device according to claim 6, which is characterized in that the real-time lighting intensity value computing module is according to institute It states real-time lighting vector and calculates real-time lighting intensity value, specifically include:
Real-time lighting intensity value corresponding to the real-time lighting vector is calculated using Lambert illumination model algorithm.
9. rendering device according to claim 6, which is characterized in that the rendering module make the game client according to Environment light masking weighted value calculating in the color attribute of the real-time lighting intensity value and the vegetation model is rendered Color value specifically includes:
Make the game client by the environment in the color attribute information of the real-time lighting intensity value and shown vegetation model Light covers weighted value multiplication and obtains the rendered color value.
10. a kind of rendering device, which is characterized in that applied to the game client communicated to connect with game services end, the dress It sets and includes:
Second vegetation model obtains module, for when being in off-line state, obtaining the vegetation mould that the game services end is sent Type, wherein environment light masking weighted value is loaded in the color attribute information of the vegetation model;
Second rendering module, the real-time lighting intensity value sent for when being online, obtaining the game services end; It is calculated and is obtained according to the environment light masking weighted value in the color attribute of the real-time lighting intensity value and the vegetation model Rendered color value carries out rendering to the vegetation model according to the rendered color value and carries out the vegetation model for completing rendering Display.
CN201811516378.1A 2018-12-12 2018-12-12 Rendering method and device Active CN109603156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811516378.1A CN109603156B (en) 2018-12-12 2018-12-12 Rendering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811516378.1A CN109603156B (en) 2018-12-12 2018-12-12 Rendering method and device

Publications (2)

Publication Number Publication Date
CN109603156A true CN109603156A (en) 2019-04-12
CN109603156B CN109603156B (en) 2022-07-22

Family

ID=66008114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811516378.1A Active CN109603156B (en) 2018-12-12 2018-12-12 Rendering method and device

Country Status (1)

Country Link
CN (1) CN109603156B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163946A (en) * 2019-05-27 2019-08-23 网易(杭州)网络有限公司 The rendering method and device of vegetation in game
CN110599574A (en) * 2019-09-17 2019-12-20 网易(杭州)网络有限公司 Rendering method and device of game scene and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040207623A1 (en) * 2003-04-18 2004-10-21 Isard Michael A. Distributed rendering of interactive soft shadows
CN102254340A (en) * 2011-07-29 2011-11-23 北京麒麟网信息科技有限公司 Method and system for drawing ambient occlusion images based on GPU (graphic processing unit) acceleration
CN105321201A (en) * 2015-11-26 2016-02-10 郭小虎 Cloud light baking-based mobile terminal 3D real-time rendering method and system
CN107633544A (en) * 2016-07-14 2018-01-26 网易(杭州)网络有限公司 The processing method and processing device of ambient light masking
CN108579082A (en) * 2018-04-27 2018-09-28 网易(杭州)网络有限公司 The method, apparatus and terminal of shadow are shown in game

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040207623A1 (en) * 2003-04-18 2004-10-21 Isard Michael A. Distributed rendering of interactive soft shadows
CN102254340A (en) * 2011-07-29 2011-11-23 北京麒麟网信息科技有限公司 Method and system for drawing ambient occlusion images based on GPU (graphic processing unit) acceleration
CN105321201A (en) * 2015-11-26 2016-02-10 郭小虎 Cloud light baking-based mobile terminal 3D real-time rendering method and system
CN107633544A (en) * 2016-07-14 2018-01-26 网易(杭州)网络有限公司 The processing method and processing device of ambient light masking
CN108579082A (en) * 2018-04-27 2018-09-28 网易(杭州)网络有限公司 The method, apparatus and terminal of shadow are shown in game

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163946A (en) * 2019-05-27 2019-08-23 网易(杭州)网络有限公司 The rendering method and device of vegetation in game
CN110599574A (en) * 2019-09-17 2019-12-20 网易(杭州)网络有限公司 Rendering method and device of game scene and electronic equipment
CN110599574B (en) * 2019-09-17 2023-09-15 网易(杭州)网络有限公司 Game scene rendering method and device and electronic equipment

Also Published As

Publication number Publication date
CN109603156B (en) 2022-07-22

Similar Documents

Publication Publication Date Title
CN105976400B (en) Method for tracking target and device based on neural network model
JP2022513272A (en) Training A method and system for automatically generating mass training datasets from 3D models of deep learning networks
CN109118470B (en) Image quality evaluation method and device, terminal and server
US20180268458A1 (en) Automated recommendation and virtualization systems and methods for e-commerce
CN109214366A (en) Localized target recognition methods, apparatus and system again
CN108256404A (en) Pedestrian detection method and device
CN110288692B (en) Illumination rendering method and device, storage medium and electronic device
CN103400119A (en) Face recognition technology-based mixed reality spectacle interactive display method
CN109446889A (en) Object tracking method and device based on twin matching network
CN107343225B (en) The method, apparatus and terminal device of business object are shown in video image
CN107967693A (en) Video Key point processing method, device, computing device and computer-readable storage medium
CN109978786A (en) A kind of Kinect depth map restorative procedure based on convolutional neural networks
CN109603156A (en) Rendering method and device
CN110211218A (en) Picture rendering method and device, storage medium and electronic device
CN107679466A (en) Information output method and device
CN107959798A (en) Video data real-time processing method and device, computing device
CN109584168A (en) Image processing method and device, electronic equipment and computer storage medium
CN110251942A (en) Control the method and device of virtual role in scene of game
CN108875539A (en) Expression matching process, device and system and storage medium
CN109934781A (en) Image processing method, device, terminal device and computer readable storage medium
CN109409979A (en) Virtual cosmetic method, device and equipment
CN109671097A (en) Motion blur implementation method and device
CN109409305A (en) A kind of facial image clarity evaluation method and device
CN109493104A (en) A kind of method and system of Intelligent visiting
CN107392156A (en) A kind of gaze estimation method and device

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