Building production method, device and computer equipment capable of freely switching between daytime and nighttime scenes
By making daytime window models and night view maps, UV editing and position relationship determination, combined with rendering environment and material adjustment, the day and night effects of the building model are switched freely, solving the problems of resource consumption and management costs in the existing technology. Efficient rendering and management are achieved.
Patent Information
- Application Number
- CN202410943717.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-15
AI Technical Summary
The prior art requires additional model resources when achieving changes in the night view effect of building models, resulting in increased resource consumption and management costs, and it is difficult to achieve lightweight management and storage.
By creating daytime window models and night view maps, UV editing, determine the positional relationship between daytime and night view window models, and adjust the rendering environment and model material properties according to the display needs, so as to achieve free switching between daytime and night effects.
No additional model resources are required to switch between daytime and night scene effects, saving resource and management costs, and improving rendering efficiency and visual authenticity.
Smart Images

Figure CN118470279B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a building production method, and more specifically to a building production method, device and computer equipment capable of freely switching between daytime and nighttime scenes. Background Art
[0002] With the continuous development of the digital twin industry, the industry's requirements for the rendering effects of three-dimensional model scenes are also constantly increasing. From the initial simple visualization effects to virtual realistic simulation, high-precision scene models and environmental rendering effects such as day and night changes, weather systems, and season systems are widely used in digital twin scenes. In this process, day and night changes are important and commonly used rendering effects, especially night scene effects, which are one of the key points of the overall rendering effect. In the digital twin scene, the day and night effects of the building model change frequently, so how to simply and efficiently switch between day and night effects has become a problem that needs to be solved.
[0003] Currently, one of the main technologies for achieving night scene effects of building models is model replacement. This method creates two sets of building models, one for daytime and the other for nighttime, and switches them alternately at different time periods to achieve night scene effects. Although model replacement solves the model display effect at night, it consumes some resources of the rendering engine due to the need for additional model resources, and requires additional manpower to manage these assets. Therefore, model replacement is not the best choice for scenes that pursue lightweight management and storage.
[0004] Therefore, it is necessary to design a new method to achieve the switching between day and night scene effects without the need for additional model resources, but only by managing a set of models in the rendering engine, thereby saving resources and management costs. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a building production method, device and computer equipment that can freely switch between daytime and night scenes.
[0006] To achieve the above object, the present invention adopts the following technical solution: A method for making a building that can freely switch between daytime and night scenes, comprising:
[0007] Make a model of a daytime window;
[0008] Make night scene maps;
[0009] Make a night view window model;
[0010] Performing UV editing on the night scene window model and the night scene map to obtain an edited night scene window model;
[0011] Determine the positional relationship between the daytime window model and the edited night scene window model;
[0012] Get display requirements;
[0013] The properties of the rendering environment and model materials are adjusted according to the display requirements to achieve free switching between day and night effects.
[0014] A further technical solution is as follows: the step of making a daytime window model comprises:
[0015] Dividing the daytime window model into a glass surface model and a window frame structure model;
[0016] The glass panel model and the window frame model are constructed by using a structure shared by multiple windows;
[0017] Adjust the PBR material parameters of the glass patch model and the window frame model.
[0018] A further technical solution is as follows: the step of making a night scene map comprises:
[0019] Get the front view of the building taken by the camera at night;
[0020] The front photo is post-processed using Photoshop to obtain a night scene map.
[0021] A further technical solution is as follows: the method of making the night view window model comprises:
[0022] The night view window model is made separately by using a structure that separates each layer and shares the same layer windows.
[0023] A further technical solution is: UV editing is performed on the night view window model and the night view map to obtain an edited night view window model, including:
[0024] Editing the UV of the night scene window model so that the night scene window model corresponds to the night scene map;
[0025] The size and position of the UV of the night scene window model are adjusted to obtain the edited night scene window model.
[0026] A further technical solution is: the determining of the positional relationship between the daytime window model and the edited night view window model comprises:
[0027] The positional relationship between the daytime window model and the edited night scene window model satisfies: the daytime window model and the night scene window model are close to meeting the requirements, and at a normal lens distance, the facets corresponding to the daytime window model and the facets corresponding to the night scene window model are located in the same position, and there is a certain gap.
[0028] A further technical solution is: adjusting the properties of the rendering environment and the model material according to the display requirements to achieve free switching between day and night effects, including:
[0029] When the display requirement is to switch to a daytime effect, the rendering environment is set to a daytime atmosphere, and the transparency of the outer glass of the model is adjusted to opaque; when the display requirement is to switch to a nighttime effect, the rendering environment is adjusted to a nighttime atmosphere, and the transparency property of the model material is set to transparent.
[0030] Its further technical solution is: when the display requirement is to switch to a night effect, the rendering environment is adjusted to a night atmosphere, and the transparency property of the model material is set to transparent, and further includes:
[0031] Apply the night map to the material's emissive node.
[0032] The present invention also provides a building production device capable of freely switching between daytime and nighttime scenes, comprising:
[0033] The first production unit is used to make daytime window models;
[0034] The second production unit is used to produce night scene maps;
[0035] The third production unit is used to produce night view window models;
[0036] An editing unit, used for performing UV editing on the night scene window model and the night scene map to obtain an edited night scene window model;
[0037] A position relationship determination unit, used to determine the position relationship between the daytime window model and the edited night view window model;
[0038] A demand acquisition unit, used for acquiring display demand;
[0039] The switching unit is used to adjust the properties of the rendering environment and model materials according to the display requirements to achieve free switching between day and night effects.
[0040] The present invention further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.
[0041] The beneficial effects of the present invention compared with the prior art are as follows: the present invention makes a daytime window model, a night view map, a night view window model, and performs UV editing to determine the positional relationship between the daytime window model and the edited night view window model, and adjusts the properties of the rendering environment and the model material according to display requirements to achieve free switching between daytime and nighttime effects, so that no additional model resources are required, and switching between daytime and nighttime effects can be achieved by managing a set of models in the rendering engine, thereby saving resources and management costs.
[0042] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0044] Figure 1 A flow chart of a method for producing a building capable of freely switching between daytime and nighttime scenes provided by an embodiment of the present invention;
[0045] Figure 2 A schematic block diagram of a building production device capable of freely switching between daytime and nighttime scenes provided by an embodiment of the present invention;
[0046] Figure 3 A schematic block diagram of a computer device provided for an embodiment of the present invention;
[0047] Figure 4 Schematic diagram of making a daytime window model provided by an embodiment of the present invention Figure 1 ;
[0048] Figure 5 Schematic diagram of making a daytime window model provided by an embodiment of the present invention Figure 2 ;
[0049] Figure 6 Schematic diagram of making a daytime window model provided by an embodiment of the present invention Figure 3 ;
[0050] Figure 7 A schematic diagram of making a night scene map provided by an embodiment of the present invention;
[0051] Figure 8 A schematic diagram of manufacturing a night view window model provided by an embodiment of the present invention;
[0052] Fig. 9 Schematic diagram of the edited night scene window model provided by an embodiment of the present invention Figure 1 ;
[0053] Fig.10 Schematic diagram of the edited night scene window model provided by an embodiment of the present invention Figure 2 ;
[0054] Fig.11 A schematic diagram of the positional relationship between a daytime window model and an edited night scene window model provided in an embodiment of the present invention;
[0055] Fig.12 A schematic diagram of the free switching between day and night effects provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0058] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0059] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0060] See also Figure 1 , Figure 1 A schematic flow chart of a method for producing a building that can freely switch between daytime and nighttime scenes provided by an embodiment of the present invention. The method for producing a building that can freely switch between daytime and nighttime scenes is applied in a server. The server interacts with a camera and a rendering display terminal for data, and realizes switching between daytime and nighttime scenes without requiring additional model resources. Only one set of models needs to be managed in the rendering engine, thereby saving resources and management costs.
[0061] Figure 1FIG. 1 is a flow chart of a method for producing a building that can freely switch between daytime and nighttime scenes provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S170.
[0062] S110. Make a daytime window model.
[0063] In one embodiment, the above-mentioned step S110 may include steps S111 to S113.
[0064] S111, dividing the daytime window model into a glass panel model and a window frame structure model;
[0065] S112, using a structure shared by multiple windows to build the glass panel model and the window frame model;
[0066] S113, adjusting the PBR material parameters of the glass surface model and the window frame model.
[0067] See also Figures 4 to 6 The daytime window model consists of two parts: the glass face model and the window frame structure model. The glass face model uses a structure shared by multiple windows, that is, the windows on the same building facade and the same vertical surface share a glass model. Figure 4 As shown, the overall number of faces is reduced and resources are saved. The window frame model also adopts a structure shared by multiple windows. Windows on the same building facade and the same vertical surface try to share a frame, such as Figure 5 As shown, the number of polygons can be reduced while ensuring the appearance of the model.
[0068] To produce a realistic simulation in a rendering environment, you need to adjust the materials of the glass panels and window frames, such as Figure 6 shown.
[0069] The glass patch model uses PBR material to control the parameters of the glass material:
[0070] Set the roughness to 0 to make the glass surface smooth;
[0071] The metalness is set to 0.7, which gives it the reflective properties of glass.
[0072] The window frame model also uses PBR material. Adjust the parameters of the window frame material:
[0073] The roughness is set to 0.4 to give the frame surface a certain roughness;
[0074] The metalness is set to 0, since window frames are usually not made of metal.
[0075] Such a setup can produce a realistic simulation in the rendered environment, making the glass and window frames look more realistic.
[0076] Among them, PBR material, or Physically-based rendering material, is a physically based rendering technology. It simulates the interaction between light and the surface of an object, such as refraction and reflection, to simulate the images in the real world. PBR material can calculate the changes in light according to the behavior of light on the surface of an object, such as absorption, dispersion or reflection, so as to make the texture of the 3D model more realistic. This technology is often used in film and television special effects, realistic games and industrial fields.
[0077] S120, making a night scene map.
[0078] In this embodiment, the night scene map is a picture of a building wall taken at night by a camera and processed by Photoshop. The picture content is a real scene of multi-story windows of a building at night, and the effect must be natural and neat.
[0079] In one embodiment, the above-mentioned step S120 may include steps S121 - S122 .
[0080] S121, obtaining a front photo of the building taken by the camera at night;
[0081] S122, using Photoshop to post-process the front photo to obtain a night scene map.
[0082] In this embodiment, a camera is used to take a frontal photo of a building at night; note that the camera lens is as vertical as possible to the building facade to reduce the workload of post-processing. Vertical shooting can ensure that the building presents accurate proportions and lines in the photo.
[0083] Photoshop post-processing stage: mainly adjust the contrast, effective range and content layout of the photos; use brightness curve, color levels, free transformation and other functions to operate the photos; ensure that one facade of the building in the photo corresponds to one facade of the model, so as to ensure the accuracy and authenticity of the simulation effect; each floor of the windows in the photo should be parallel and evenly spaced, and the windows should be arranged neatly and naturally, which helps to simulate the accuracy of the building's appearance; avoid overexposed parts in the photos, and ensure that the overall light and dark contrast of the picture is strong to highlight the outline and details of the building.
[0084] like Figure 7 As shown, through these steps, a night scene map that meets the requirements can be produced to provide an accurate and realistic background for the rendering of the building model.
[0085] S130, making a night view window model.
[0086] In this embodiment, a night view window model is produced separately by using a structure in which each layer is separated and the windows on the same layer share a common structure.
[0087] See also Figure 8 The night scene window model is composed of a patch model alone. When making a night scene window model, it is necessary to minimize the use of polygons to save resources and improve rendering efficiency. At the same time, the convenience of subsequent UV editing must also be considered to ensure the editability and flexibility of the model.
[0088] Use a structure where each layer is separated and the windows on the same layer share the same polygons. The polygons of each layer of night view window models are cut and separated from each other, which can better control the details and characteristics of each window. Windows on the same layer try to share one polygon to reduce the number of polygons in the model and improve performance and efficiency.
[0089] Comparing the structure of the night window model with that of the day window model can clearly show the differences and characteristics between them; the polygon layout of the night window model is more dispersed, and the windows are independent of each other, while the day window model may be more concentrated, and some polygons may be shared between windows.
[0090] Through the above design, a night view window model can be effectively produced to ensure that it can meet the rendering requirements while maintaining the editability and flexibility of the model.
[0091] S140, UV editing is performed on the night view window model and the night view map to obtain an edited night view window model.
[0092] UV is the abbreviation of UV texture coordinates (it is similar to the X, Y, and Z axes of a spatial model). It defines the position of each point on the image. These points are interconnected with the 3D model to determine the position of the surface texture map. UV is to accurately correspond each point on the image to the surface of the model object. The gaps between points are interpolated by the software to smoothly interpolate the image.
[0093] In one embodiment, the above-mentioned step S140 may include steps S141 - S142 .
[0094] S141, editing the UV of the night view window model so that the night view window model corresponds to the night view map;
[0095] S142: Adjust the size and position of the UV of the night scene window model to obtain an edited night scene window model.
[0096] In this example, see Fig. 9 After completing the model production, you need to edit the UV of the model and paste the night scene map into the color node of the model material; the arrangement of UV editing can be carried out according to the number of model floors and the night scene map to ensure that the UV of each layer of the model corresponds to a layer of window photos in the map.
[0097] See also Fig.10 , scale the UV to the appropriate size so that the size ratio of the window displayed on the texture matches the size of the window in the actual model; arrange the UV from top to bottom in order of floors according to the window positions on the texture photo, and ensure that the position of each window corresponds to the texture; in order to reduce the repetition of the texture display, it is necessary to repeatedly adjust the horizontal position of the UV, and UV overlap can be allowed, but ensure that it does not cause the texture to be broken or blurred.
[0098] Repeatedly adjust the size and position of the UV until the night scene map appears natural and realistic on the model; pay attention to ensure the alignment and matching of the map on the model to avoid problems such as misaligned or stretched windows.
[0099] Through these steps, the final night scene map can be displayed on the model more realistically, highlighting the details and realism of the model.
[0100] S150: Determine the positional relationship between the daytime window model and the edited night scene window model.
[0101] In this embodiment, the positional relationship between the daytime window model and the edited night scene window model satisfies: the daytime window model and the night scene window model are close to meeting the requirements, and at a normal lens distance, the facets corresponding to the daytime window model and the facets corresponding to the night scene window model are located in the same position, and there is a certain gap.
[0102] See also Fig.11 In order to achieve a natural switch between day and night effects and ensure a smooth transition between the day window model and the night window model, the following measures need to be taken:
[0103] Make sure the day window model and the night window model are in almost the same position at a normal camera distance; leave a slight gap between the models to prevent flare during rendering.
[0104] The distance between two patches should be large enough, usually at least 0.2 meters is recommended, to ensure that no noticeable flickering or overlap occurs during rendering; the setting of this gap needs to take into account the scale of the actual scene and the viewing distance to ensure a natural appearance in different rendering situations.
[0105] When the system unit is meter, make sure the distance is set in meters, so that you can better control the gap size between models to meet the requirements of the actual scene.
[0106] Through the above measures, it can be ensured that the transition between models is smooth and natural when switching between day and night effects, avoiding the occurrence of flashing surface phenomena, while maintaining the realism and visual effects of the scene.
[0107] S160: Obtain display requirements.
[0108] In this embodiment, the display requirement refers to whether the model currently needs to be displayed in a daytime rendering screen or a night scene rendering screen.
[0109] S170: Adjust the properties of the rendering environment and model material according to the display requirements to achieve free switching between day and night effects.
[0110] In this embodiment, when the display requirement is to switch to a daytime effect, the rendering environment is set to a daytime atmosphere, and the transparency of the outer glass of the model is adjusted to opaque; when the display requirement is to switch to a nighttime effect, the rendering environment is adjusted to a nighttime atmosphere, and the transparency property of the model material is set to transparent.
[0111] Additionally, apply a night map to the material's emissive node.
[0112] Model material refers to a data structure used to describe the visual and physical properties of the surface of a 3D object. In the 3D modeling and rendering process, the material defines how the object's appearance is expressed, such as color, metalness, roughness, transparency, etc. These properties together determine what the object looks like and how it interacts with light.
[0113] Specifically, see Fig.12 When a daytime effect is needed, first adjust the rendering environment of the engine to the daytime atmosphere, which may include adjusting parameters such as the color and intensity of the light to simulate the natural light effect during the day. Next, adjust the transparency of the model's outer glass to opaque, so that the window looks solid, and the opaque glass can reflect the light and scenery during the day.
[0114] When night effects are needed, adjust the rendering environment of the engine to the night atmosphere, and adjust the color and intensity of the light to increase the night atmosphere. At the same time, adjust the transparency property of the model material to transparent, which will make the outer glass of the model transparent, and you can see the light source and scenery in the room through the glass.
[0115] In order to make the night view windows have a self-luminous effect, you need to paste the night view map into the self-luminous node of the material, so that the windows will emit a soft light at night, increasing the visual effect and realism of the night view.
[0116] The transparency property of the model material is regarded as a control switch. By adjusting this property, the day and night effects of the building model can be switched freely. In the day effect, the outer glass is opaque, and in the night effect, the outer glass is transparent and has the self-luminous effect of a night view window, realizing the free switching of day and night effects.
[0117] In this way, the building model can be easily switched between day and night effects during the rendering process, making the scene more vivid and realistic.
[0118] The above-mentioned method for producing a building that can freely switch between day and night scenes makes a day window model, a night view map, a night view window model, and performs UV editing to determine the positional relationship between the day window model and the edited night view window model, and adjusts the properties of the rendering environment and the model material according to display requirements to achieve free switching between day and night effects. No additional model resources are required, and only one set of models needs to be managed in the rendering engine to achieve switching between day and night effects, thereby saving resources and management costs.
[0119] Figure 2 FIG. 3 is a schematic block diagram of a building production device 300 that can freely switch between daytime and nighttime scenes provided by an embodiment of the present invention. Figure 2 As shown, corresponding to the above method for making a building that can freely switch between daytime and nighttime scenes, the present invention also provides a device 300 for making a building that can freely switch between daytime and nighttime scenes. The device 300 for making a building that can freely switch between daytime and nighttime scenes includes a unit for executing the above method for making a building that can freely switch between daytime and nighttime scenes, and the device can be configured in a server. Specifically, please refer to Figure 2 The building production device 300 that can freely switch between daytime and night scenes includes a first production unit 301, a second production unit 302, a third production unit 303, an editing unit 304, a position relationship determination unit 305, a demand acquisition unit 306 and a switching unit 307.
[0120] The first production unit 301 is used to produce a daytime window model; the second production unit 302 is used to produce a night view map; the third production unit 303 is used to produce a night view window model; the editing unit 304 is used to perform UV editing on the night view window model and the night view map to obtain the edited night view window model; the position relationship determination unit 305 is used to determine the position relationship between the daytime window model and the edited night view window model; the demand acquisition unit 306 is used to obtain display requirements; the switching unit 307 is used to adjust the properties of the rendering environment and the model material according to the display requirements to achieve free switching between day and night effects.
[0121] In one embodiment, the first production unit 301 includes:
[0122] A division subunit is used to divide the daytime window model into a glass surface model and a window frame structure model; a construction subunit is used to construct the glass surface model and the window frame model using a structure shared by multiple windows; and an adjustment subunit is used to adjust the PBR material parameters of the glass surface model and the window frame model.
[0123] In one embodiment, the second production unit 302 includes:
[0124] The photo acquisition subunit is used to acquire the front photo of the building taken by the camera at night; the processing subunit is used to use Photoshop to post-process the front photo to obtain a night scene map.
[0125] In one embodiment, the third production unit 303 is used to separately produce the night view window model by using a structure in which each layer is separated and the windows on the same layer share a common structure.
[0126] In one embodiment, the editing unit 304 includes:
[0127] The UV editing subunit is used to edit the UV of the night scene window model so that the night scene window model corresponds to the night scene map; the size and position adjustment subunit is used to adjust the size and position of the UV of the night scene window model to obtain the edited night scene window model.
[0128] In one embodiment, the switching unit 307 is used to set the rendering environment to a daytime atmosphere and adjust the transparency of the outer glass of the model to opaque when the display requirement is to switch to a daytime effect; when the display requirement is to switch to a night effect, adjust the rendering environment to a night atmosphere and set the transparency property of the model material to transparent.
[0129] In one embodiment, the switching unit 307 is further used to apply the night scene map to the self-luminous node of the material.
[0130] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned building production device 300 and each unit that can freely switch between daytime and night scenes can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0131] The building production device 300 capable of freely switching between daytime and nighttime scenes can be implemented in the form of a computer program. The computer program can be used in a computer program such as Figure 3 Runs on the computer device shown.
[0132] See also Figure 3 , Figure 3 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.
[0133] See also Figure 3The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0134] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a building production method that can freely switch between daytime and night scenes.
[0135] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0136] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a building production method that can freely switch between daytime and night scenes.
[0137] The network interface 505 is used to communicate with other devices over the network. Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0138] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:
[0139] Make a daytime window model; make a night view map; make a night view window model; perform UV editing on the night view window model and the night view map to obtain an edited night view window model; determine the positional relationship between the daytime window model and the edited night view window model; obtain display requirements; adjust the properties of the rendering environment and model materials according to the display requirements to achieve free switching between daytime and nighttime effects.
[0140] Among them, the positional relationship between the daytime window model and the edited night scene window model satisfies: the daytime window model and the night scene window model are close to meeting the requirements, and at a normal lens distance, the facets corresponding to the daytime window model and the facets corresponding to the night scene window model are located in the same position, and there is a certain gap.
[0141] In one embodiment, when the processor 502 implements the step of making a daytime window model, the processor 502 specifically implements the following steps:
[0142] The daytime window model is divided into a glass surface model and a window frame structure model; the glass surface model and the window frame model are constructed using a structure shared by multiple windows; and the PBR material parameters of the glass surface model and the window frame model are adjusted.
[0143] In one embodiment, when the processor 502 implements the step of making the night scene map, it specifically implements the following steps:
[0144] Obtain a front photo of a building taken by a camera at night; and use Photoshop to post-process the front photo to obtain a night scene map.
[0145] In one embodiment, when the processor 502 implements the step of making the night view window model, it specifically implements the following steps:
[0146] The night view window model is made separately by using a structure that separates each layer and shares the same layer windows.
[0147] In one embodiment, when the processor 502 implements the step of performing UV editing on the night view window model and the night view map to obtain the edited night view window model, the processor 502 specifically implements the following steps:
[0148] The UV of the night scene window model is edited to make the night scene window model correspond to the night scene map; the size and position of the UV of the night scene window model are adjusted to obtain the edited night scene window model.
[0149] In one embodiment, when the processor 502 implements the step of adjusting the properties of the rendering environment and the model material according to the display requirements to achieve free switching between day and night effects, the processor 502 specifically implements the following steps:
[0150] When the display requirement is to switch to a daytime effect, the rendering environment is set to a daytime atmosphere, and the transparency of the outer glass of the model is adjusted to opaque; when the display requirement is to switch to a night effect, the rendering environment is adjusted to a night atmosphere, and the transparency property of the model material is set to transparent.
[0151] In one embodiment, when the display requirement is to switch to a night effect, the processor 502 adjusts the rendering environment to a night atmosphere and sets the transparency property of the model material to transparent, and then further implements the following steps:
[0152] Apply the night map to the material's emissive node.
[0153] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0154] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0155] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:
[0156] Make a daytime window model; make a night view map; make a night view window model; perform UV editing on the night view window model and the night view map to obtain an edited night view window model; determine the positional relationship between the daytime window model and the edited night view window model; obtain display requirements; adjust the properties of the rendering environment and model materials according to the display requirements to achieve free switching between daytime and nighttime effects.
[0157] Among them, the positional relationship between the daytime window model and the edited night scene window model satisfies: the daytime window model and the night scene window model are close to meeting the requirements, and at a normal lens distance, the facets corresponding to the daytime window model and the facets corresponding to the night scene window model are located in the same position, and there is a certain gap.
[0158] In one embodiment, when the processor executes the computer program to implement the step of making a daytime window model, the processor specifically implements the following steps:
[0159] The daytime window model is divided into a glass surface model and a window frame structure model; the glass surface model and the window frame model are constructed using a structure shared by multiple windows; and the PBR material parameters of the glass surface model and the window frame model are adjusted.
[0160] In one embodiment, when the processor executes the computer program to implement the step of making a night view window model, the processor specifically implements the following steps:
[0161] The night view window model is made separately by using a structure that separates each layer and shares the same layer windows.
[0162] In one embodiment, when the processor executes the computer program to implement the step of UV editing the night scene window model and the night scene map to obtain the edited night scene window model, the processor specifically implements the following steps:
[0163] The UV of the night scene window model is edited to make the night scene window model correspond to the night scene map; the size and position of the UV of the night scene window model are adjusted to obtain the edited night scene window model.
[0164] In one embodiment, when the processor executes the computer program to implement the step of adjusting the properties of the rendering environment and the model material according to the display requirements to achieve free switching between day and night effects, the processor specifically implements the following steps:
[0165] When the display requirement is to switch to a daytime effect, the rendering environment is set to a daytime atmosphere, and the transparency of the outer glass of the model is adjusted to opaque; when the display requirement is to switch to a nighttime effect, the rendering environment is adjusted to a nighttime atmosphere, and the transparency property of the model material is set to transparent.
[0166] In one embodiment, when the processor executes the computer program to realize the display requirement of switching to a night effect, after adjusting the rendering environment to a night atmosphere and setting the transparency property of the model material to transparent, the processor further implements the following steps:
[0167] Apply the night map to the material's emissive node.
[0168] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0169] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0170] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0171] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0172] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0173] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for making a building that can freely switch between daytime and nighttime scenes, characterized in that: include: Make a model of a daytime window; Make night scene maps; Make a night view window model; Performing UV editing on the night scene window model and the night scene map to obtain an edited night scene window model; Determine the positional relationship between the daytime window model and the edited night scene window model; Get display requirements; Adjust the properties of the rendering environment and model materials according to the display requirements to achieve free switching between day and night effects; The determining of the positional relationship between the daytime window model and the edited night scene window model includes: The positional relationship between the daytime window model and the edited night view window model satisfies: the daytime window model and the night view window model are close to the requirements, and at a normal lens distance, the facets corresponding to the daytime window model and the facets corresponding to the night view window model are located at the same position with a certain gap; the distance between the two facets is at least 0.2 meters; Make sure the day window model and the night window model are in the same position at normal lens distance; leave a gap between the day window model and the night window model; when the system unit is meter, make sure the distance setting is in meter; When the display requirement is to switch to a daytime effect, the rendering environment is set to a daytime atmosphere, and the transparency of the outer glass of the model is adjusted to opaque; when the display requirement is to switch to a nighttime effect, the rendering environment is adjusted to a nighttime atmosphere, and the transparency property of the model material is set to transparent.
2. The method for making a building capable of freely switching between daytime and nighttime scenes according to claim 1, characterized in that: The method of making a daytime window model comprises: Dividing the daytime window model into a glass surface model and a window frame structure model; The glass panel model and the window frame model are constructed by using a structure shared by multiple windows; Adjust the PBR material parameters of the glass patch model and the window frame model.
3. The method for making a building capable of freely switching between daytime and nighttime scenes according to claim 1, characterized in that: The method of making a night scene map comprises: Get the front view of the building taken by the camera at night; The front photo is post-processed using Photoshop to obtain a night scene map.
4. The method for making a building capable of freely switching between daytime and nighttime scenes according to claim 1, characterized in that: The method of making the night view window model comprises: The night view window model is made separately by using a structure that separates each layer and shares the same layer windows.
5. The method for making a building capable of freely switching between daytime and nighttime scenes according to claim 1, characterized in that: The UV editing of the night scene window model and the night scene map to obtain the edited night scene window model includes: Editing the UV of the night scene window model so that the night scene window model corresponds to the night scene map; The size and position of the UV of the night scene window model are adjusted to obtain the edited night scene window model.
6. The method for making a building capable of freely switching between daytime and nighttime scenes according to claim 1, characterized in that: The display requirement is to adjust the rendering environment to a night atmosphere when switching to a night effect, and set the transparency property of the model material to transparent, and further includes: Apply the night map to the material's emissive node.
7. A building production device capable of freely switching between daytime and nighttime scenes, characterized in that: include: The first production unit is used to make daytime window models; The second production unit is used to produce night scene maps; The third production unit is used to produce night view window models; A demand acquisition unit, used for acquiring display demand; The editing unit is used to perform UV editing on the night view window model and the night view map to obtain the edited night view window model; when the display requirement is to switch to the daytime effect, the rendering environment is set to the daytime atmosphere, and the transparency of the outer glass of the model is adjusted to opaque; when the display requirement is to switch to the night effect, the rendering environment is adjusted to the night atmosphere, and the transparency property of the model material is set to transparent; A position relationship determination unit is used to determine the position relationship between the daytime window model and the edited night view window model; wherein the position relationship between the daytime window model and the edited night view window model satisfies: the daytime window model and the night view window model are close to the requirements, and at a normal lens distance, the facet corresponding to the daytime window model and the facet corresponding to the night view window model are located at the same position, and there is a certain gap; the distance between the two facets is at least 0.2 meters; Make sure the day window model and the night window model are in the same position at normal lens distance; leave a gap between the day window model and the night window model; when the system unit is meter, make sure the distance setting is in meter; The switching unit is used to adjust the properties of the rendering environment and model materials according to the display requirements to achieve free switching between day and night effects.
8. A computer device, characterized in that: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
