CN108447112A - Analogy method, device and the VR equipment of role's light environment - Google Patents
Analogy method, device and the VR equipment of role's light environment Download PDFInfo
- Publication number
- CN108447112A CN108447112A CN201810068154.2A CN201810068154A CN108447112A CN 108447112 A CN108447112 A CN 108447112A CN 201810068154 A CN201810068154 A CN 201810068154A CN 108447112 A CN108447112 A CN 108447112A
- Authority
- CN
- China
- Prior art keywords
- environment
- role
- light information
- simulation
- light
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000004088 simulation Methods 0.000 claims abstract description 114
- 230000000694 effects Effects 0.000 claims abstract description 25
- 239000000463 material Substances 0.000 claims description 21
- 238000004891 communication Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 13
- 238000013507 mapping Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 239000007769 metal material Substances 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 239000002184 metal Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000010985 leather Substances 0.000 description 1
- 230000001795 light effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/50—Lighting effects
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
- Processing Or Creating Images (AREA)
Abstract
An embodiment of the present invention provides a kind of analogy method of role's light environment, device and VR equipment, method is applied to VR equipment, including:For each Environment of role, utilize the channel textures of role, the Environment is determined in the corresponding region of model surface of role, and the Environment is subjected to figure layer with the diffusing reflection textures on determined region and is mixed, obtains the simulation light information in determined region;Using preset normal map, the corresponding normal direction of each simulation light information is obtained;For each simulation light information the reflection direction of the simulation light information is determined using the corresponding normal direction of simulation light information, and along identified reflection direction, show the light reflecting effect determined by the simulation light information.It using technical solution provided in an embodiment of the present invention, realizes without using virtual light source, simulates the light information needed for role.
Description
Technical field
The present invention relates to technical field of virtual reality, more particularly to a kind of analogy method of role's light environment, device
And VR equipment.
Background technology
With the rapid development of VR (Virtual Reality, virtual reality) technology, role's making demand is growing,
Role can be figure image in virtual scene, cartoon animals image etc., and virtual scene can utilize virtual reality skill
The virtual environment that art constructs, such as:Virtual game scene, virtual video scene etc..The key that role makes is to make angle
Color shows expected material effect, for example, skin material, metal material, leather material etc..
In order to enable role that expected material effect is presented, existing mode is mainly:Role is irradiated with virtual light source,
Different material effects is presented by reflection light by role, and in role's moving in rotation, and the light of role's reflection can be with
It changes, and then the light reflecting effect that role is presented can change.
However, inventor has found in the implementation of the present invention, at least there are the following problems for the prior art:Directly use
Virtual light source irradiates role, very big to the performance loss of VR equipment, therefore, it is difficult to directly use virtual optical in VR equipment
Source needs a kind of role's light environment analogy method, to realize in the case where VR equipment does not use virtual light source, simulates angle of departure
Light information needed for color.
Invention content
The embodiment of the present invention is designed to provide a kind of analogy method of role's light environment, device and VR equipment, with
It realizes without using virtual light source, simulates the light information needed for role.Specific technical solution is as follows:
In a first aspect, an embodiment of the present invention provides a kind of analogy method of role's light environment, it is applied to virtual reality
VR equipment, the method includes:
Determine the Environment at the angle using the channel textures of the role for each Environment of role
The corresponding region of model surface of color, and the Environment is subjected to figure layer with the diffusing reflection textures on determined region and is mixed,
Obtain the simulation light information in determined region, wherein an Environment is preset for storing one residing for the role
The light information of environment;The channel textures are used to store the correspondence between each Environment and model surface region;
Using preset normal map, the corresponding normal direction of each simulation light information is obtained;
For each simulation light information the simulation light is determined using the corresponding normal direction of simulation light information
The reflection direction of information, and along identified reflection direction, show the light reflecting effect determined by the simulation light information,
Realize the simulation to the light environment of the role.
Optionally, described to mix the Environment with the diffusing reflection textures progress figure layer on determined region, including:
The Environment environment is mapped to determined region, by the Environment and diffusing reflection textures on determined region
Carry out figure layer mixing.
Optionally, the Environment is spherical Environment, described that the Environment environment is mapped to determined area
Domain, including:
The Environment spherical shape environment is mapped to determined region.
Optionally, the spherical Environment is obtained in the following manner:
Virtual sphere is set in virtual scene, wherein the material of the virtual sphere is total reflection material;
The data in the virtual sphere are acquired, and the data acquired are rendered, obtain the spherical environment patch
Figure.
Optionally, described to mix the Environment with the diffusing reflection textures progress figure layer on determined region, including:
Using strong light HardLight patterns, the diffusing reflection textures on the Environment and determined region are subjected to figure layer
Mixing.
Second aspect, an embodiment of the present invention provides a kind of simulators of role's light environment, are applied to virtual reality
VR equipment, described device include:
Determining module determines the environment for each Environment for role using the channel textures of the role
Textures in the corresponding region of model surface of the role, and by the diffusing reflection textures on the Environment and determined region into
Row figure layer mixes, and obtains the simulation light information in determined region, wherein an Environment is for storing residing for the role
A default environment light information;The channel textures are for storing between each Environment and model surface region
Correspondence;
First obtains module, for utilizing preset normal map, obtains the corresponding normal side of each simulation light information
To;
Display module, for being directed to each simulation light information, using the corresponding normal direction of simulation light information, really
The reflection direction of the fixed simulation light information, and along identified reflection direction, what display was determined by the simulation light information
Light reflecting effect realizes the simulation to the light environment of the role.
Optionally, the determining module, is specifically used for:
The Environment environment is mapped to determined region, by the Environment and diffusing reflection textures on determined region
Carry out figure layer mixing.
Optionally, the Environment is spherical Environment, and the determining module is specifically used for:
The Environment spherical shape environment is mapped to determined region.
Optionally, described device further includes:Second obtains module,
Wherein, described second module is obtained, including:
Setting unit, for virtual sphere to be arranged in virtual scene, wherein the material of the virtual sphere is total reflection
Material;
Obtaining unit renders for acquiring the data in the virtual sphere, and to the data acquired, obtains institute
State spherical Environment.
Optionally, the determining module, is specifically used for:
Using strong light HardLight patterns, the diffusing reflection textures on the Environment and determined region are subjected to figure layer
Mixing.
The third aspect an embodiment of the present invention provides a kind of Virtual Reality equipment, including processor, communication interface, is deposited
Reservoir, communication bus and display screen, wherein processor, communication interface, memory, display screen are completed mutual by communication bus
Between communication;
Memory, for storing computer program;
Display screen, for showing that computer program is performed the rear required content shown;
Processor when for executing the program stored on memory, realizes any of the above-described role's light environment
Analogy method step.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is described computer-readable
Instruction is stored in storage medium, when run on a computer so that computer executes any of the above-described role's lamp
The analogy method of luminous environment.
At the another aspect that the present invention is implemented, the embodiment of the present invention additionally provides a kind of computer program production comprising instruction
Product, when run on a computer so that computer executes the analogy method of any of the above-described role's light environment.
Using technical solution provided in an embodiment of the present invention, VR equipment is directed to each Environment of role, utilizes role
Channel textures, determine the Environment in the corresponding region of model surface of role, and by the Environment and determined area
Diffusing reflection textures on domain carry out figure layer mixing, obtain the simulation light information in determined region, using preset normal map,
Obtain the corresponding normal direction of each simulation light information;For each simulation light information, the simulation light information pair is utilized
The normal direction answered determines the reflection direction of the simulation light information, along identified reflection direction, shows by the simulated light
The light reflecting effect that line information determines realizes the simulation to the light environment of role.
The light information of the default environment residing for role can be stored due to Environment, in turn, can obtain role's
The simulation light information in model surface region, and can determine the reflection direction of simulation light information, along identified reflection
Direction shows the light reflecting effect determined by simulation light information, therefore realizes without using virtual light source, mould
Draw up the light information needed for role.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described.
Fig. 1 is a kind of flow diagram of the analogy method of role's light environment provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of the simulator of role's light environment provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of virtual reality device provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is described.
In order to realize without using virtual light source, simulate the light information needed for role, the present invention is implemented
Example provides a kind of analogy method of role's light environment, device, VR equipment and computer readable storage medium.
Specifically, a kind of analogy method of role's light environment provided in an embodiment of the present invention can be applied to VR equipment,
Application scenarios can be:VR equipment determines the Environment for each Environment of role using the channel textures of role
In the corresponding region of the model surface of role, and the Environment is subjected to figure layer with the diffusing reflection textures on determined region and is mixed
It closes, obtains the simulation light information in determined region;Using preset normal map, it is corresponding to obtain each simulation light information
Normal direction;For each simulation light information the simulation light is determined using the corresponding normal direction of simulation light information
The reflection direction of information, and along identified reflection direction, show the light reflecting effect determined by the simulation light information,
Realize the simulation to the light environment of role.
Using technical solution provided in an embodiment of the present invention, the default environment residing for role can be stored due to Environment
Light information can obtain the simulation light information in the model surface region of role in turn, and can determine simulation light letter
The reflection direction of breath shows the light reflecting effect determined by simulation light information, therefore realizes along identified reflection direction
Without using virtual light source, the light information needed for role is simulated.
Below by specific embodiment to a kind of analogy method progress of role's light environment provided in an embodiment of the present invention
It is described in detail.
It should be noted that a kind of executive agent of the analogy method for role's light environment that the embodiment of the present invention is provided
Can be VR equipment.VR equipment can be:Mobile terminal, computer, PC, VR glasses etc. apply virtual reality technology
Equipment.Moreover, it is achieved that a kind of functional software for role's light environment analogy method that the embodiment of the present invention is provided can be
Special role's light environment simulation softward, or existing role's light environment simulation softward or other with role's light
Plug-in unit in the software of environmental simulation function.
Referring to Fig. 1, Fig. 1 is a kind of flow signal of analogy method of role's light environment provided in an embodiment of the present invention
Figure, method may include:
S101, each Environment for role determine the Environment role's using the channel textures of role
The corresponding region of model surface, and the Environment is subjected to figure layer with the diffusing reflection textures on determined region and is mixed, it obtains
The simulation light information in determined region,
Wherein, an Environment is used to store the light information of a default environment residing for role;Channel textures are used
Correspondence between each Environment of storage and model surface region;
For each default environment, role can be placed in the default environment, it is thus possible to store role, to be in this pre-
If the light information of environment obtains each Environment.Default environment can be prior according to the virtual scene entered needed for role
Design can be virtual prairie scene, virtual indoor scene etc..The light information of a default environment residing for role can
With comprising:Reflection light of the role in this presets environment under illumination.
It is understood that only could have light in the environment for having light source, therefore, in the case of gauge without light source, simulation
The virtual ray for going out light effects is properly termed as simulation light, and simulation light letter is properly termed as the information comprising simulation light
Breath.
Channel textures can store the correspondence between each Environment and model surface region, to obtain
After Environment, the channel textures of role can be utilized, determine the Environment in the corresponding region of model surface of role.
Illustratively, the correspondence stored in the textures of channel is:The corresponding model surface region point Environment A, B, C
It is not:A, b, c, then after obtaining Environment A, can utilize channel textures, determine Environment A role model surface
Corresponding region is:a.
It, will the Environment and overflowing on determined region in a kind of realization method in order to improve the art effect of role
Reflction carries out figure layer mixing, Ke Yiwei:
The Environment environment is mapped to determined region, by the Environment and diffusing reflection textures on determined region
Carry out figure layer mixing.
In general, environment mapping is a kind of technology for simulating reflection of the smooth surface to ambient enviroment, it is common
Smooth surface includes:Mirror, metal, water surface etc., since unlike material reflecting effect is different, by different environment
Textures environment is mapped to determined region, can make determined region that different reflected images be presented, to make the material of simulation
It is more life-like.
Illustratively, role's local environment be prairie environment, if some region of character surface be simulation be metal
Material, then by environment mapping techniques, the image which reflects role's local environment is:Prairie environment map, to make
The characteristics of metal material that must be simulated is closer to real metal.
Diffusing reflection textures for show role's each position be irradiated by light and the color showed and brightness.For each role,
Can according to needed for role's each position color and bright-dark degree, make the diffusing reflection textures of the role in advance, and can will
The diffusing reflection textures made are added to the model surface of the role, therefore, can have diffusing reflection on each region of model surface
Textures.
Using the embodiment of the present invention, which can be mapped to determined region, in turn, by determined area
Environment on domain carries out figure layer with diffusing reflection textures and mixes, to which figure layer mixing resultant can directly act on model table
The determined region in face, therefore, improve the art effect of role.
Environment includes:Spherical Environment, cube Environment, cylindrical environment textures etc., in application process
In, designer can select different types of Environment according to self-demand, and it is not limited in the embodiment of the present invention.
In order to improve the field range for expanding Environment, in a kind of concrete implementation mode, Environment can be
The Environment environment is mapped to determined region, Ke Yiwei by spherical Environment:
The Environment spherical shape environment is mapped to determined region.
Environment mapping techniques can be divided into:Cube environment mapping techniques and spherical environment mapping techniques, wherein spherical environment
Mapping is a kind of environment mapping techniques being applied to spherical Environment.
Using the embodiment of the present invention, since spherical Environment can cover 360 panorama of level and vertical 360 panorama, therefore,
Improve the field range of Environment.
In a kind of realization method, spherical Environment can be obtained in the following manner:
Step A1, virtual sphere is set in virtual scene,
Wherein, the material of virtual sphere is total reflection material;
Specifically, setting work software development virtual scene can be utilized, scene is limited without face number, and can be virtual
A virtual sphere is arranged in role present position in scene, and the material for configuring virtual sphere is total reflection material, in turn, virtual ball
Body, which can be all-trans, projects the scene of virtual scene.
Step A2, the data in virtual sphere are acquired, and the data acquired are rendered, obtain spherical environment patch
Figure.
Specifically, a virtual camera for shooting virtual scene can be arranged in scene Software for producing, utilize
Virtual camera can acquire the data in virtual sphere, in turn, can be rendered to the data acquired, obtain ball collar
Border textures.
Setting work software can be:3Dmax, Converse3D, VRP (Virtual Reality Platform, virtually
Real platform) etc..Furthermore it is possible to have the plug-in unit for rendering function using VrayStereoscopic etc. to data progress wash with watercolours
Dye.
In other realization methods, other modes can also be used to obtain spherical Environment, the embodiment of the present invention is to obtaining
The mode for obtaining spherical Environment does not limit, for example, it is also possible to be:One circular mirror is set in real scene, is utilized
Physics video camera shoots circular mirror, obtains spherical Environment.
It is mixed specifically, the Environment is carried out figure layer with the diffusing reflection textures on determined region, Ke Yiwei:
Using strong light HardLight patterns, the diffusing reflection textures on the Environment and determined region are subjected to figure layer
Mixing.
HardLight patterns can reinforce the light intensity of figure layer mixing resultant so that the simulation light in determined region
The light that information is simulated is more obvious.
In addition, other than HardLight patterns, in other realization methods, other mixed modes can also be used, this
Inventive embodiments do not limit the mixed mode specifically used, for example, it is also possible to for colour filter pattern (Screen), normal mode
(Normal), pattern that brightens (Lighten) etc..
S102, preset normal map, the corresponding normal direction of each simulation light information of acquisition are utilized;
Normal map can be obtained with the normal direction in each region in record cast surface using preset normal map
The institute for each determined region, can be determined the normal side in region by the normal direction in each region of model surface in turn
To the corresponding normal direction of simulation light information in region being determined as the institute, it is thus possible to obtain each simulation light information
Corresponding normal direction.
Illustratively, the normal direction of the determined region M stored in normal map is m, if the mould of determined region M
Quasi- light information is S, then it is m that simulate light information, which be the corresponding normal directions of S,.
S103, for each simulation light information the simulation is determined using the corresponding normal direction of simulation light information
The reflection direction of light information, and along identified reflection direction, display is reflected by the light that the simulation light information determines
Effect realizes the simulation to the light environment of role.
Specifically, simulation light information may include angle of reflection, color and brightness, wherein determined by simulation light information
Light reflecting effect can be:The color and brightness that simulation light information is included.
Angle of reflection includes angle of reflection clockwise and counterclockwise, can specify that clockwise as just, is counterclockwise negative, works as angle of reflection
Symbol be timing, normal direction can along clockwise direction be revolved after determining the corresponding normal direction of simulation light information
Turn the direction after reflection angle, the reflection direction as the simulation light information;It, can be by method when the symbol of angle of reflection is negative
Line direction is rotated in the counterclockwise direction the direction after reflection angle, the reflection direction as the simulation light information.
Illustratively, simulating the angle of reflection that light information includes is:+ 35 °, and the corresponding normal side of simulation light information
To for m, then m is rotated in a clockwise direction the direction after 35 °, the reflection direction as the simulation light information.
In turn, the color and brightness that the simulation light information is included can be shown along identified reflection direction,
Using technical solution provided in an embodiment of the present invention, Environment can store the light of the default environment residing for role
Line information can obtain the simulation light information in the model surface region of role in turn, and can determine simulation light information
Reflection direction shows the light reflecting effect determined by simulation light information, therefore realizes along identified reflection direction
In the case of without using virtual light source, the light information needed for role is simulated.
Corresponding with the above-mentioned analogy method embodiment of role's light environment, the embodiment of the present invention also provides a kind of role
The simulator of light environment.
Referring to Fig. 2, Fig. 2 is a kind of structural representation of the simulator of role's light environment provided in an embodiment of the present invention
Figure, is applied to Virtual Reality equipment, and device includes:
Determining module 201 determines the environment for each Environment for role using the channel textures of role
Textures in the corresponding region of model surface of the role, and by the diffusing reflection textures on the Environment and determined region into
Row figure layer mixes, and obtains the simulation light information in determined region, wherein an Environment is for storing residing for the role
A default environment light information;The channel textures are for storing between each Environment and model surface region
Correspondence;
First obtains module 202, for utilizing preset normal map, obtains the corresponding normal of each simulation light information
Direction;
Display module 203 utilizes the corresponding normal side of simulation light information for being directed to each simulation light information
To determining the reflection direction of the simulation light information, and along identified reflection direction, display is true by the simulation light information
Fixed light reflecting effect realizes the simulation to the light environment of the role.
In the embodiment of the present invention, the light information of the default environment residing for role can be stored due to Environment, in turn,
The simulation light information in the model surface region of role can be obtained, and can determine the reflection direction of simulation light information, edge
Reflection direction determined by shows the light reflecting effect determined by simulation light information, therefore realizes without using virtual
In the case of light source, the light information needed for role is simulated.
Optionally, the determining module 201, is specifically used for:
The Environment environment is mapped to determined region, by the Environment and diffusing reflection textures on determined region
Carry out figure layer mixing.
Optionally, the Environment is spherical Environment, and the determining module 201 is specifically used for:
The Environment spherical shape environment is mapped to determined region.
Optionally, described device further includes:Second obtains module,
Wherein, described second module is obtained, including:
Setting unit, for virtual sphere to be arranged in virtual scene, wherein the material of the virtual sphere is total reflection
Material;
Obtaining unit renders for acquiring the data in the virtual sphere, and to the data acquired, obtains institute
State spherical Environment.
Optionally, the determining module 201, is specifically used for:
Using strong light HardLight patterns, the diffusing reflection textures on the Environment and determined region are subjected to figure layer
Mixing.
The embodiment of the present invention additionally provides a kind of Virtual Reality equipment, as shown in figure 3, being connect including processor 301, communication
Mouth 302, memory 303, communication bus 304 and display screen 305, wherein processor 301, communication interface 302, memory 303,
Display screen 305 completes mutual communication by communication bus 304,
Memory 303, for storing computer program;
Display screen 305, for showing that computer program is performed the rear required content shown;
Processor 301 when for executing the program stored on memory 303, realizes what the embodiment of the present invention was provided
The analogy method of role's light environment.
Specifically, the analogy method of role's light environment includes the following steps:
Determine the Environment the role's using the channel textures of role for each Environment of role
The corresponding region of model surface, and the Environment is subjected to figure layer with the diffusing reflection textures on determined region and is mixed, it obtains
The simulation light information in determined region a, wherein Environment is used to store a default environment residing for the role
Light information;The channel textures are used to store the correspondence between each Environment and model surface region;
Using preset normal map, the corresponding normal direction of each simulation light information is obtained;
For each simulation light information the simulation light is determined using the corresponding normal direction of simulation light information
The reflection direction of information, and along identified reflection direction, show the light reflecting effect determined by the simulation light information,
Realize the simulation to the light environment of the role.
In the embodiment of the present invention, the light information of the default environment residing for role can be stored due to Environment, in turn,
The simulation light information in the model surface region of role can be obtained, and can determine the reflection direction of simulation light information, edge
Reflection direction determined by shows the light reflecting effect determined by simulation light information, therefore realizes without using virtual
In the case of light source, the light information needed for role is simulated.
It should be noted that processor executes the simulation side of the program stored on memory and the role's light environment realized
The other embodiment of method, it is identical as the embodiment of the analogy method for role's light environment that preceding method part refers to, herein not
It repeats again.
The communication bus that above-mentioned VR equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component
Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, controlling bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned VR equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), can also include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
Display screen can be CRT display screen (Cathode Ray Tube, CRT), or liquid crystal display
(Liquid Crystal Display, LCD) etc..
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can
It reads to be stored with instruction in storage medium, when run on a computer so that computer executes any institute in above-described embodiment
The analogy method for the role's light environment stated.
Wherein, the analogy method of role's light environment includes the following steps:
Determine the Environment the role's using the channel textures of role for each Environment of role
The corresponding region of model surface, and the Environment is subjected to figure layer with the diffusing reflection textures on determined region and is mixed, it obtains
The simulation light information in determined region a, wherein Environment is used to store a default environment residing for the role
Light information;The channel textures are used to store the correspondence between each Environment and model surface region;
Using preset normal map, the corresponding normal direction of each simulation light information is obtained;
For each simulation light information the simulation light is determined using the corresponding normal direction of simulation light information
The reflection direction of information, and along identified reflection direction, show the light reflecting effect determined by the simulation light information,
Realize the simulation to the light environment of the role.
As it can be seen that using the embodiment of the present invention, the light letter of the default environment residing for role can be stored due to Environment
Breath, in turn, can obtain the simulation light information in the model surface region of role, and can determine the reflection of simulation light information
Direction shows the light reflecting effect determined by simulation light information, therefore realizing does not make along identified reflection direction
In the case of with virtual light source, the light information needed for role is simulated.
It should be noted that the analogy method for role's light environment that above computer program is realized when being executed by processor
Other embodiment, it is identical as the embodiment of the analogy method for role's light environment that preceding method part refers to, herein no longer
It repeats.
In another embodiment provided by the invention, a kind of computer program product including instruction is additionally provided, when it
When running on computers so that computer executes the analogy method of any role's light environment in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its arbitrary combination real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to the flow or function described in the embodiment of the present invention.The computer can be all-purpose computer, special meter
Calculation machine, computer network or other programmable devices.The computer instruction can be stored in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state disk
Solid State Disk (SSD)) etc..
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For VR equipment, computer readable storage medium, the computer program product embodiments comprising instruction, since it is substantially similar to
Embodiment of the method, so description is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (11)
1. a kind of analogy method of role's light environment, which is characterized in that be applied to Virtual Reality equipment, the method packet
It includes:
Determine the Environment the role's using the channel textures of the role for each Environment of role
The corresponding region of model surface, and the Environment is subjected to figure layer with the diffusing reflection textures on determined region and is mixed, it obtains
The simulation light information in determined region a, wherein Environment is used to store a default environment residing for the role
Light information;The channel textures are used to store the correspondence between each Environment and model surface region;
Using preset normal map, the corresponding normal direction of each simulation light information is obtained;
For each simulation light information the simulation light information is determined using the corresponding normal direction of simulation light information
Reflection direction, and along identified reflection direction, show the light reflecting effect determined by the simulation light information, realization
Simulation to the light environment of the role.
2. according to the method described in claim 1, it is characterized in that, described will be unrestrained anti-on the Environment and determined region
It penetrates textures and carries out figure layer mixing, including:
The Environment environment is mapped to determined region, the Environment on determined region is carried out with diffusing reflection textures
Figure layer mixes.
3. according to the method described in claim 2, it is characterized in that, the Environment is spherical Environment, it is described should
Environment environment is mapped to determined region, including:
The Environment spherical shape environment is mapped to determined region.
4. according to the method described in claim 3, it is characterized in that, obtaining the spherical Environment in the following manner:
Virtual sphere is set in virtual scene, wherein the material of the virtual sphere is total reflection material;
The data in the virtual sphere are acquired, and the data acquired are rendered, obtain the spherical Environment.
5. according to the method described in claim 1, it is characterized in that, described will be unrestrained anti-on the Environment and determined region
It penetrates textures and carries out figure layer mixing, including:
Using strong light HardLight patterns, which is subjected to figure layer with the diffusing reflection textures on determined region and is mixed.
6. a kind of simulator of role's light environment, which is characterized in that be applied to Virtual Reality equipment, described device packet
It includes:
Determining module determines the Environment for each Environment for role using the channel textures of the role
Figure is carried out in the corresponding region of the model surface of the role, and by the diffusing reflection textures on the Environment and determined region
Layer mixing, obtains the simulation light information in determined region, wherein an Environment is used to store one residing for the role
The light information of a default environment;The channel textures are corresponding between each Environment and model surface region for storing
Relationship;
First obtains module, for utilizing preset normal map, obtains the corresponding normal direction of each simulation light information;
Display module, for being directed to each simulation light information, using the corresponding normal direction of simulation light information, determining should
The reflection direction of light information is simulated, and along identified reflection direction, shows the light determined by the simulation light information
Reflecting effect realizes the simulation to the light environment of the role.
7. device according to claim 6, which is characterized in that the determining module is specifically used for:
The Environment environment is mapped to determined region, the Environment on determined region is carried out with diffusing reflection textures
Figure layer mixes.
8. device according to claim 7, which is characterized in that the Environment is spherical Environment, the determination
Module is specifically used for:
The Environment spherical shape environment is mapped to determined region.
9. device according to claim 8, which is characterized in that described device further includes:Second obtains module,
Wherein, described second module is obtained, including:
Setting unit, for virtual sphere to be arranged in virtual scene, wherein the material of the virtual sphere is total reflection material
Matter;
Obtaining unit renders for acquiring the data in the virtual sphere, and to the data acquired, obtains the ball
Shape Environment.
10. device according to claim 6, which is characterized in that the determining module is specifically used for:
Using strong light HardLight patterns, which is subjected to figure layer with the diffusing reflection textures on determined region and is mixed.
11. a kind of Virtual Reality equipment, which is characterized in that including processor, communication interface, memory, communication bus and show
Display screen, wherein processor, communication interface, memory, display screen complete mutual communication by communication bus;
Memory, for storing computer program;
Display screen, for showing that computer program is performed the rear required content shown;
Processor when for executing the program stored on memory, realizes any method and steps of claim 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810068154.2A CN108447112A (en) | 2018-01-24 | 2018-01-24 | Analogy method, device and the VR equipment of role's light environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810068154.2A CN108447112A (en) | 2018-01-24 | 2018-01-24 | Analogy method, device and the VR equipment of role's light environment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108447112A true CN108447112A (en) | 2018-08-24 |
Family
ID=63191127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810068154.2A Pending CN108447112A (en) | 2018-01-24 | 2018-01-24 | Analogy method, device and the VR equipment of role's light environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108447112A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110648384A (en) * | 2019-06-19 | 2020-01-03 | 北京巴别时代科技股份有限公司 | Cartoon stylized rendering method |
CN113554738A (en) * | 2021-07-27 | 2021-10-26 | 广东三维家信息科技有限公司 | Panoramic image display method and device, electronic equipment and storage medium |
CN114155336A (en) * | 2020-08-18 | 2022-03-08 | 北京达佳互联信息技术有限公司 | Virtual object display method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104484896A (en) * | 2014-10-30 | 2015-04-01 | 无锡梵天信息技术股份有限公司 | Physical method based on environment mapping for simulating human skin subsurface scattering |
CN106780709A (en) * | 2016-12-02 | 2017-05-31 | 腾讯科技(深圳)有限公司 | A kind of method and device for determining global illumination information |
CN106815881A (en) * | 2017-04-13 | 2017-06-09 | 腾讯科技(深圳)有限公司 | The color control method and device of a kind of actor model |
CN106815883A (en) * | 2016-12-07 | 2017-06-09 | 珠海金山网络游戏科技有限公司 | The hair treating method and system of a kind of game role |
-
2018
- 2018-01-24 CN CN201810068154.2A patent/CN108447112A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104484896A (en) * | 2014-10-30 | 2015-04-01 | 无锡梵天信息技术股份有限公司 | Physical method based on environment mapping for simulating human skin subsurface scattering |
CN106780709A (en) * | 2016-12-02 | 2017-05-31 | 腾讯科技(深圳)有限公司 | A kind of method and device for determining global illumination information |
CN106815883A (en) * | 2016-12-07 | 2017-06-09 | 珠海金山网络游戏科技有限公司 | The hair treating method and system of a kind of game role |
CN106815881A (en) * | 2017-04-13 | 2017-06-09 | 腾讯科技(深圳)有限公司 | The color control method and device of a kind of actor model |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110648384A (en) * | 2019-06-19 | 2020-01-03 | 北京巴别时代科技股份有限公司 | Cartoon stylized rendering method |
CN110648384B (en) * | 2019-06-19 | 2023-01-03 | 北京巴别时代科技股份有限公司 | Cartoon stylized rendering method |
CN114155336A (en) * | 2020-08-18 | 2022-03-08 | 北京达佳互联信息技术有限公司 | Virtual object display method and device, electronic equipment and storage medium |
CN113554738A (en) * | 2021-07-27 | 2021-10-26 | 广东三维家信息科技有限公司 | Panoramic image display method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109377546B (en) | Virtual reality model rendering method and device | |
CN107886562B (en) | Water surface rendering method and device and readable storage medium | |
CN112316420B (en) | Model rendering method, device, equipment and storage medium | |
CN110599574B (en) | Game scene rendering method and device and electronic equipment | |
CN113674389B (en) | Scene rendering method and device, electronic equipment and storage medium | |
CN112215934A (en) | Rendering method and device of game model, storage medium and electronic device | |
US20170061675A1 (en) | Point and click lighting for image based lighting surfaces | |
CN108154548A (en) | Image rendering method and device | |
CN114419240B (en) | Illumination rendering method and device, computer equipment and storage medium | |
US9183654B2 (en) | Live editing and integrated control of image-based lighting of 3D models | |
CN109102560A (en) | Threedimensional model rendering method and device | |
CN111915712B (en) | Illumination rendering method and device, computer readable medium and electronic equipment | |
CN108447112A (en) | Analogy method, device and the VR equipment of role's light environment | |
CN114119818A (en) | Rendering method, device and equipment of scene model | |
CN109712226A (en) | The see-through model rendering method and device of virtual reality | |
CN112819940A (en) | Rendering method and device and electronic equipment | |
CN116758208A (en) | Global illumination rendering method and device, storage medium and electronic equipment | |
CN111340684B (en) | Method and device for processing graphics in game | |
WO2022100059A1 (en) | Data storage management method, object rendering method, and device | |
CN109741414A (en) | Rendering method and device for semitransparent objects in scene and electronic equipment | |
CN118397160A (en) | Autonomous three-dimensional rendering engine for reverse site building system of oil field site | |
CN111815784A (en) | Method and device for presenting reality model, electronic equipment and storage medium | |
US20240338882A1 (en) | Rendering a visual representation of a luminaire by re-using light values | |
CN112473135B (en) | Real-time illumination simulation method, device and equipment for mobile game and storage medium | |
CN112465941B (en) | Volume cloud processing method and device, electronic equipment 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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180824 |