3D rendering acceleration method and system
By uploading 3D rendering tasks to the cloud and using cloud GPU resources and dynamic rendering containers, the problem of designer computer resource occupation and slow rendering speed is solved, and the rapid processing of video rendering is achieved, and the designer's work efficiency is improved.
Patent Information
- Application Number
- CN202311805328.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-08-05
AI Technical Summary
In the prior art, 3D designers use computer resources for a long time during the rendering process, resulting in the inability to perform other design work, and the rendering speed is slow, especially the rendering time of complex scenes is as long as more than a few hours.
Upload local rendering tasks to the cloud, render videos through three key links: splitting, rendering and merging, and use the cloud's GPU resources and dynamic rendering containers for parallel processing to achieve rapid rendering of videos.
The designer's computer resources are liberated, the rendering speed is increased exponentially, the rendering time is shortened, and the designer's work efficiency is improved.
Smart Images

Figure CN120431228A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for accelerating 3D rendering. Background Art
[0002] After building a 3D scene and producing a 3D animation, 3D designers usually use the software's built-in rendering engine or plug-in for rendering. This process generally uses the designer's computer to render pictures or videos. The essence of a video is also a combination of multiple pictures, and we generally call each picture a frame.
[0003] Generally speaking, it takes more than several minutes to render a high-quality image on a single machine, and even more than several hours to render a single frame of a complex scene. Designers will have their work progress delayed due to the long rendering cycle, and computer resources will be occupied during the rendering process, making it impossible to perform other design work.
[0004] Therefore, how to ensure that the rendering process does not occupy the designer's computer resources and exponentially increase the speed of video rendering has become an urgent problem to be solved. Summary of the Invention
[0005] To address the above issues, the present invention provides a method and system for accelerating 3D rendering, which uploads local rendering tasks to the cloud for processing, and achieves rapid video rendering through three key steps: splitting, rendering, and merging, saving designers' computer resources and greatly improving video rendering speed.
[0006] To achieve the above object, the present invention provides a method for accelerating 3D rendering, comprising: submitting locally produced pictures and / or videos to a local server;
[0007] The local server distributes the image and / or video rendering task to the cloud;
[0008] The cloud splits the rendering task into multiple subtasks, and writes the multiple subtasks into a message queue in sequence;
[0009] The cloud determines the number of required rendering containers based on the number of subtasks in the message queue, dynamically starts the rendering containers, and dynamically starts the rendering containers;
[0010] Each rendering container monitors the message queue in real time, and in an idle state pulls subtasks from the message queue to perform rendering operations respectively to obtain rendering results.
[0011] As a further improvement of the present invention, each rendering container calculates whether the current frame is the last frame of the rendering task after rendering a frame;
[0012] If so, a merge task is initiated.
[0013] As a further improvement of the present invention, the merging task includes:
[0014] Share the rendering results within the same physical machine and merge the frames within the same physical machine;
[0015] Upload the result files on all physical machines involved in this rendering task to the same folder in the cloud for storage;
[0016] The merge container downloads the folder stored in the cloud to the local computer, converts the sequence frames into MOV format video, and completes the merge task.
[0017] As a further improvement of the present invention, the cloud splits the rendering task into multiple subtasks, including:
[0018] The cloud analyzes the workload of the rendering task and calculates the total number of frames of the image and / or video;
[0019] The rendering task is split into multiple subtasks based on each frame.
[0020] As a further improvement of the present invention, a resource release determination time threshold is preset;
[0021] When the number of subtasks in the message queue is less than the number of rendering containers currently being started, and the duration reaches a preset resource release determination time threshold, the idle rendering container is automatically closed to release resources.
[0022] The present invention also provides a 3D rendering acceleration system, comprising: a service cluster on the cloud, the service cluster being composed of a GPU, the service cluster being provided with a plurality of analysis units, a plurality of rendering container units, and a plurality of merging container units;
[0023] The analysis unit is used to:
[0024] Analyze the image and / or video rendering tasks submitted by the local server, split the rendering tasks into multiple subtasks, and write the multiple subtasks into the message queue in sequence;
[0025] Determine the number of required rendering containers based on the number of subtasks in the message queue, and dynamically start the rendering containers;
[0026] The rendering container unit is used to:
[0027] The rendering container monitors the message queue in real time, and in an idle state, pulls subtasks from the message queue to perform rendering operations and obtain rendering results;
[0028] The merging container unit is used for:
[0029] The frames rendered by each rendering container unit are merged to obtain a rendered image and / or video.
[0030] As a further improvement of the present invention, after the rendering container of the rendering container unit obtains a subtask, it first checks whether the resource file required by the subtask exists on the physical machine to which the rendering container belongs;
[0031] If it exists, it will be used directly without downloading it repeatedly.
[0032] As a further improvement of the present invention,
[0033] Use Docker to start a rendering container on the service cluster, and allocate GPU resources to each rendering container according to the startup command of the rendering container;
[0034] Customize the rendering container image to enable each rendering container to run the rendering engine to perform rendering tasks.
[0035] As a further improvement of the present invention, a web page is set at the front end of the local server, and the web page is used to:
[0036] Provide query and display of the time taken for task downloading resources, rendering, merging, and uploading;
[0037] Provides query and display of physical machines and containers involved in rendering tasks;
[0038] Provides query display of the total number of frames of rendering tasks and the number of frames that have been rendered;
[0039] Provides a list of all frame images, including image size and rendering time;
[0040] Provides query display of detailed rendering logs for each frame.
[0041] As a further improvement of the present invention, the rendering results are shared within the same physical machine, and the rendering results within the same physical machine are merged to obtain a result file while rendering;
[0042] Upload the result files on all physical machines involved in this rendering task to the same folder in the cloud for storage;
[0043] The merge container of the merge container unit runs, downloads the folder stored in the cloud to the local physical machine, converts the sequence frames in each result file in the folder into MOV format video, and uploads the MOV format video to the cloud for storage, completing the merge task.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] Compared with local rendering, the cloud rendering method of the present invention frees the designer's computer from being completely occupied by the rendering process. At the same time, by splitting rendering tasks in the cloud, adding them to a queue, and setting up multiple rendering containers to execute rendering tasks simultaneously, the speed of video rendering is exponentially improved.
[0046] The present invention shares the disk of the physical machine among rendering containers, so that after the rendering container obtains the rendering task, it directly obtains the resource files required for the rendering task locally, saving download time and improving the rendering speed.
[0047] The present invention achieves adaptive rendering task size by dynamically opening and closing rendering containers. When the rendering task is heavy, rendering containers are added to increase the rendering speed. When the rendering task volume is less than the number of rendering containers, the rendering containers are closed to avoid the rendering containers occupying the physical machine's running memory. At the same time, it can also indirectly improve the rendering speed of other rendering containers on the physical machine.
[0048] The present invention shares the rendering results within the same physical machine, so that the rendering results within the same physical machine are merged in real time and uploaded to the cloud together, thereby improving the efficiency of the merging link and further improving the overall processing efficiency of the rendering task.
[0049] By setting up a front-end WEB page, the present invention enables designers to directly obtain detailed information such as the cloud rendering process, rendering progress, and rendering results, which is convenient for rendering time analysis, rendering results judgment, and other application plans.
[0050] The present invention splits local rendering tasks into three key links: analysis, rendering, and merging, and adopts a shared, multiplexed, and layered approach to save bandwidth and time. The parallel approach improves the rendering speed and dynamically senses the task status to automatically scale and save resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A flowchart of a method for accelerating 3D rendering disclosed in one embodiment of the present invention;
[0052] Figure 2 A schematic diagram of a 3D rendering acceleration system disclosed in one embodiment of the present invention;
[0053] Figure 3 A schematic diagram of the complete architecture of a 3D rendering acceleration system disclosed in one embodiment of the present invention. DETAILED DESCRIPTION
[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings 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 making creative efforts shall fall within the scope of protection of the present invention.
[0055] The present invention is described in further detail below with reference to the accompanying drawings:
[0056] like Figure 1 As shown, the present invention provides a method for accelerating 3D rendering, comprising the steps of:
[0057] S1. Submit the locally produced pictures and / or videos to the local server;
[0058] in,
[0059] After the designer completes the production locally, he submits the project to the server through the backend system page or design software plug-in;
[0060] S2, the local server distributes the image and / or video rendering task to the cloud;
[0061] in,
[0062] The server will assign rendering tasks to the rendering engine in the cloud, and the designer can continue to use the computer to do other work;
[0063] S3: Split the rendering task into multiple subtasks on the cloud, and write the subtasks into the message queue in sequence;
[0064] in,
[0065] The cloud splits the rendering task into multiple subtasks, including:
[0066] The cloud analyzes the workload of rendering tasks and calculates the total number of frames of images and / or videos;
[0067] Split the rendering task into multiple subtasks on a per-frame basis.
[0068] Further,
[0069] The cloud is a service cluster composed of many GPUs, which includes several analysis units, rendering container units, and merging container units.
[0070] After the rendering task is initiated, the analysis unit will automatically analyze the project, calculate the total number of frames of the video, and then split the rendering task into subtasks equal to the total number of frames per frame. For example, if the total number of frames is 300, it will be split into 300 subtasks per frame, and all subtasks will be written to the message queue at the same time.
[0071] S4. The cloud determines the number of required rendering containers based on the number of subtasks in the message queue, dynamically starts the rendering containers, and dynamically starts the rendering containers;
[0072] in,
[0073] Based on the number of subtasks in the message queue, calculate the total number of rendering containers currently required and dynamically start more containers. For example, if 300 subtasks require 300 rendering containers, set the upper limit of the rendering containers started in the cloud and dynamically start the rendering containers one by one.
[0074] Further,
[0075] Preset resource release determination time threshold;
[0076] When the number of subtasks in the message queue is less than the number of currently started rendering containers, and the duration reaches the preset resource release determination time threshold, the idle rendering container is automatically closed to release resources.
[0077] Specifically,
[0078] After starting, the rendering container begins to pull subtasks and process them. After some subtasks are completed, the number of rendering containers required will also decrease. For example, if 30 rendering containers have been started and 65 subtasks have been processed, then:
[0079] The number of rendering containers currently required = the total number of subtasks - the number of remaining subtasks - the current number of rendering containers
[0080] The calculation shows that 205 rendering containers are still needed. If the upper limit of rendering containers started and running on the cloud is preset to 50, rendering containers can continue to be dynamically started. When the upper limit reaches 50, new rendering containers will stop being started.
[0081] If 155 subtasks have been processed when 45 rendering containers are opened, and the number of rendering containers currently required is calculated to be 0, no new rendering containers will be opened;
[0082] When 45 rendering containers are opened, as subtasks are processed, 35 subtasks remain. The number of subtasks in the current message queue is less than the number of currently online rendering containers. According to the preset resource release judgment time threshold of 5 minutes, after 5 minutes, the redundant idle rendering containers are automatically closed to release resources.
[0083] S5. Each rendering container monitors the message queue in real time. In the idle state, it pulls subtasks from the message queue to perform rendering operations and obtain rendering results.
[0084] in,
[0085] After each rendering container finishes rendering a frame, it calculates whether the current frame is the last frame of the rendering task;
[0086] If so, a merge task is initiated.
[0087] Furthermore, the merged tasks include:
[0088] Share the rendering results within the same physical machine and merge the frames within the same physical machine;
[0089] Upload the result files on all physical machines involved in this rendering task to the same folder in the cloud for storage;
[0090] The merge container downloads the folder stored in the cloud to the local computer, converts the sequence frames into MOV format video, and completes the merge task.
[0091] like Figure 2 As shown, the present invention also provides a 3D rendering acceleration system, including: a local server front-end is provided with a WEB page, a cloud service cluster, the service cluster is composed of a GPU, and the service cluster is provided with multiple analysis units, multiple rendering container units and multiple merging container units;
[0092] Analytical unit for:
[0093] Analyze the image and / or video rendering tasks submitted by the local server, split the rendering tasks into multiple subtasks, and write the subtasks into the message queue in sequence;
[0094] Determine the number of required rendering containers based on the number of subtasks in the message queue and dynamically start the rendering containers;
[0095] in,
[0096] Use Docker to start the rendering container on the service cluster, and allocate GPU resources to each rendering container according to the startup command of the rendering container;
[0097] Customize the rendering container image to enable each rendering container to run the rendering engine to perform rendering tasks.
[0098] Rendering container unit, used for:
[0099] The rendering container monitors the message queue in real time, and in idle state, pulls subtasks from the message queue to perform rendering operations and obtain rendering results.
[0100] in,
[0101] After the rendering container of the rendering container unit obtains the subtask, it first checks whether the resource files required by the subtask exist on the physical machine to which the rendering container belongs;
[0102] If it exists, it will be used directly without downloading it repeatedly.
[0103] Combined container units for:
[0104] Merging the frames rendered by each rendering container unit to obtain a rendered image and / or video;
[0105] in,
[0106] Merging is divided into two layers. The first layer is machine-level merging, that is, sharing the rendering results within the same physical machine and merging the rendering results within the same physical machine to obtain the result file while rendering. The second layer is uploading the result files on all physical machines participating in this rendering task to the same folder in the cloud for storage.
[0107] Then the merge container of the merge container unit runs, downloads the folder stored in the cloud to the local physical machine, converts the sequence frames in each result file in the folder into MOV format video, and uploads the MOV format video to the cloud for storage, completing the merge task.
[0108] WEB pages for:
[0109] Provide query and display of the time taken for task downloading resources, rendering, merging, and uploading;
[0110] Provides query and display of physical machines and containers involved in rendering tasks;
[0111] Provides query display of the total number of frames of rendering tasks and the number of frames that have been rendered;
[0112] Provides a list of all frame images, including image size and rendering time;
[0113] Provides query display of detailed rendering logs for each frame.
[0114] like Figure 3As shown in the figure, from bottom to top are the server layer, rendering service layer, message queue layer, database layer, data layer, business layer and operation page; the cloud is the server layer, which is composed of multiple GPUs and provides hardware and software support for the rendering service; the rendering service layer includes various rendering tools required in the rendering container image, which can be customized as needed to realize the rendering process of pictures and videos; the message queue layer stores message queues; the database stores pictures or video files to be rendered; the data layer reads, caches and processes rendering data to provide support for the data required by the business layer; the business layer designs the various items required to be displayed on the WEB page; the operation page includes all the content of the WEB page, and queries and displays various rendered data.
[0115] Example:
[0116] (1) Previously, designers could produce two 3D videos per week using their own computers. Now, using the method and system of the present invention, they can produce eight videos of the same standard per week, which greatly improves production and shortens project delivery cycles.
[0117] (2) The same 20-second video takes 12 hours to render using traditional methods. However, using this system, the total rendering time is shortened to 20 seconds. The present invention exponentially increases the rendering speed.
[0118] (3) A complex 3D video of a down jacket cannot be rendered in high definition using traditional methods due to the upper limit of single-machine computer resources. However, this method and system can render high-definition videos normally, and the rendering is completed within 1 minute.
[0119] Advantages of the present invention:
[0120] Compared with local rendering, the cloud rendering method of the present invention frees the designer's computer from being completely occupied by the rendering process. At the same time, by splitting rendering tasks in the cloud, adding them to a queue, and setting up multiple rendering containers to execute rendering tasks simultaneously, the speed of video rendering is exponentially improved.
[0121] The present invention shares the disk of the physical machine among rendering containers, so that after the rendering container obtains the rendering task, it directly obtains the resource files required for the rendering task locally, saving download time and improving the rendering speed.
[0122] The present invention achieves adaptive rendering task size by dynamically opening and closing rendering containers. When the rendering task is heavy, rendering containers are added to increase the rendering speed. When the rendering task volume is less than the number of rendering containers, the rendering containers are closed to avoid the rendering containers occupying the physical machine's running memory. At the same time, it can also indirectly improve the rendering speed of other rendering containers on the physical machine.
[0123] The present invention shares the rendering results within the same physical machine, so that the rendering results within the same physical machine are merged in real time and uploaded to the cloud together, thereby improving the efficiency of the merging link and further improving the overall processing efficiency of the rendering task.
[0124] By setting up a front-end WEB page, the present invention enables designers to directly obtain detailed information such as the cloud rendering process, rendering progress, and rendering results, which is convenient for rendering time analysis, rendering results judgment, and other application plans.
[0125] The present invention splits local rendering tasks into three key links: analysis, rendering, and merging, and adopts a shared, multiplexed, and layered approach to save bandwidth and time. The parallel approach improves the rendering speed and dynamically senses the task status to automatically scale and save resources.
[0126] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for accelerating 3D rendering, characterized in that: include: Submit locally produced pictures and / or videos to the local server; The local server distributes the image and / or video rendering task to the cloud; The cloud splits the rendering task into multiple subtasks, and writes the multiple subtasks into a message queue in sequence; The cloud determines the number of required rendering containers based on the number of subtasks in the message queue, dynamically starts the rendering containers, and dynamically starts the rendering containers; Each rendering container monitors the message queue in real time, and in an idle state pulls subtasks from the message queue to perform rendering operations respectively to obtain rendering results.
2. The method for accelerating 3D rendering according to claim 1, wherein: After each rendering container finishes rendering a frame, it calculates whether the current frame is the last frame of the rendering task; If so, a merge task is initiated.
3. The method for accelerating 3D rendering according to claim 2, wherein: The merging tasks include: Share the rendering results within the same physical machine and merge the frames within the same physical machine; Upload the result files on all physical machines involved in this rendering task to the same folder in the cloud for storage; The merge container downloads the folder stored in the cloud to the local computer, converts the sequence frames into MOV format video, and completes the merge task.
4. The method for accelerating 3D rendering according to claim 1, wherein: The cloud splits the rendering task into multiple subtasks, including: The cloud analyzes the workload of the rendering task and calculates the total number of frames of the image and / or video; The rendering task is split into multiple subtasks based on each frame.
5. The method for accelerating 3D rendering according to claim 1, wherein: Preset resource release determination time threshold; When the number of subtasks in the message queue is less than the number of rendering containers currently being started, and the duration reaches a preset resource release determination time threshold, the idle rendering container is automatically closed to release resources.
6. A 3D rendering acceleration system, implementing the method according to any one of claims 1 to 5, characterized in that: include: A service cluster in the cloud, the service cluster being composed of GPUs and having a plurality of analysis units, a plurality of rendering container units, and a plurality of merging container units; The analysis unit is used to: Analyze the image and / or video rendering tasks submitted by the local server, split the rendering tasks into multiple subtasks, and write the multiple subtasks into the message queue in sequence; Determine the number of required rendering containers based on the number of subtasks in the message queue, and dynamically start the rendering containers; The rendering container unit is used to: The rendering container monitors the message queue in real time, and in an idle state, pulls subtasks from the message queue to perform rendering operations and obtain rendering results; The merging container unit is used for: The frames rendered by each rendering container unit are merged to obtain a rendered image and / or video.
7. The 3D rendering acceleration system according to claim 6, characterized in that: After the rendering container of the rendering container unit obtains the subtask, it first checks whether the resource file required by the subtask exists on the physical machine to which the rendering container belongs; If it exists, it will be used directly without downloading it repeatedly.
8. The 3D rendering acceleration system according to claim 6, characterized in that: Use Docker to start a rendering container on the service cluster, and allocate GPU resources to each rendering container according to the startup command of the rendering container; Customize the rendering container image to enable each rendering container to run the rendering engine to perform rendering tasks.
9. The 3D rendering acceleration system according to claim 6, characterized in that: Set up a web page on the local server front end, which is used to: Provide query and display of the time taken for task downloading resources, rendering, merging, and uploading; Provides query and display of physical machines and containers involved in rendering tasks; Provides query display of the total number of frames of rendering tasks and the number of frames that have been rendered; Provides a list of all frame images, including image size and rendering time; Provides query display of detailed rendering logs for each frame.
10. The 3D rendering acceleration system according to claim 6, characterized in that: Share the rendering results within the same physical machine, and merge the rendering results within the same physical machine to obtain the result file while rendering; Upload the result files on all physical machines involved in this rendering task to the same folder in the cloud for storage; The merge container of the merge container unit runs, downloads the folder stored in the cloud to the local physical machine, converts the sequence frames in each result file in the folder into MOV format video, and uploads the MOV format video to the cloud for storage, completing the merge task.