Rendering method and device, electronic equipment and readable storage medium
By generating RenderMan-recognizable rendering profiles and submitting them to the Deadline server, the problem that the RenderMan renderer and Unreal Engine are not fully supported by software such as Unreal Engine, and the multi-machine joint rendering function of Deadline is realized in Unreal Engine, which improves rendering efficiency and image quality.
Patent Information
- Application Number
- CN202411863748.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, the RenderMan renderer and three-dimensional graphics software or engines such as Unreal Engine are not fully supported by each other, resulting in the inability to submit RenderMan rendering tasks to the Deadline rendering farm platform in Unreal Engine, limiting users' ability to make full use of their respective advantages in the project to efficiently produce images.
By obtaining the rendering configuration file with a format recognized by the RenderMan renderer by the first graphics processing device for the virtual target, writing it to the RenderMan renderer configuration file, further writing the rendering configuration information into the Deadline job file, and submitting it to the Deadline server, so as to assign the rendering task to the rendering node configured with the RenderMan renderer for distributed parallel rendering.
It realizes that the RenderMan rendering of Deadline is connected to the RenderMan rendering in a graphics processing device that does not support RenderMan and/or Deadline, thereby fully leveraging the rendering effect advantages of RenderMan and the multi-machine joint rendering advantages of Deadline, improving the efficiency and quality of image production.
Smart Images

Figure CN119919565A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a rendering method, device, electronic device, and readable storage medium. Background Art
[0002] In 3D graphics software or 3D graphics engines, in order to get better picture effects, you can use an external offline renderer. RenderMan is a commonly used offline renderer with good rendering effects and is easy to use. However, RenderMan only provides plug-ins in some software or engines, and some software or engines (such as Unreal Engine) do not have corresponding plug-ins to use RenderMan.
[0003] Deadline is a render farm platform that has a multi-machine joint rendering function that can improve rendering efficiency through parallel computing. Although the Deadline plug-in is provided in Unreal Engine, and Deadline itself also supports RenderMan, because RenderMan itself does not support UnrealEngine, it is impossible to submit RenderMan rendering tasks to Deadline in UnrealEngine.
[0004] The situation in which 3D graphics software or 3D graphics engine, RenderMan renderer, and Deadline platform do not fully support each other limits their respective applications, resulting in users being unable to fully utilize the advantages of the three in their projects and efficiently produce images that meet their needs. Summary of the invention
[0005] The present disclosure provides a rendering method, device, electronic device and readable storage medium to solve or at least partially solve the above problems, as follows.
[0006] In a first aspect, the present disclosure provides a rendering method, the method comprising:
[0007] Acquire a rendering configuration file in a target format generated by the first graphics processing device for a virtual target; the target format is a format recognizable by a RenderMan renderer;
[0008] Writing the storage path of the rendering configuration file into the RenderMan renderer configuration file;
[0009] Writing the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file;
[0010] Submitting the Deadline job file to the Deadline server, so that the Deadline server assigns the rendering task for the virtual target to the rendering node configured with the RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node.
[0011] In a second aspect, the present disclosure further provides a rendering device, the device comprising:
[0012] An acquisition module, used to acquire a rendering configuration file having a target format generated by the first graphics processing device for a virtual target; the target format is a format recognizable by a RenderMan renderer;
[0013] A first writing module is used to write the storage path of the rendering configuration file into the RenderMan renderer configuration file;
[0014] A second writing module is used to write the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file;
[0015] A rendering submission module is used to submit the Deadline job file to the Deadline server, so that the Deadline server assigns the rendering task for the virtual target to the rendering node configured with the RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node.
[0016] In a third aspect, the present disclosure further provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor;
[0017] When the processor executes the computer program instructions, the rendering method described in the first aspect is implemented.
[0018] In a fourth aspect, the present disclosure further provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are executed by a processor, they are used to implement the rendering method described in the first aspect above.
[0019] The exemplary embodiments of the present disclosure have the following beneficial effects:
[0020] In the present disclosure, a rendering configuration file with a target format generated by a first graphics processing device for a virtual target can be obtained, wherein the target format is a format recognizable by a RenderMan renderer; then the storage path of the rendering configuration file is written into a RenderMan renderer configuration file; then the rendering configuration information in the RenderMan renderer configuration file is written into a Deadline job file; and then the Deadline job file is submitted to a Deadline server, so that the Deadline server assigns the rendering task for the virtual target to a rendering node configured with a RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node. In an exemplary embodiment of the present disclosure, a rendering configuration file with a format recognizable by a RenderMan renderer can be generated based on the rendering task, and then the storage path of the rendering configuration file is finally written into the Deadline job file, so that Deadline can read the rendering configuration file according to the Deadline job file, and then perform multi-machine joint rendering on the rendering task, so that RenderMan rendering connected to Deadline can be implemented in a first graphics processing device that does not support RenderMan and / or Deadline, so that the rendering effect advantages of RenderMan and the multi-machine joint rendering advantages of Deadline can be fully utilized to efficiently produce images that meet the requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a flowchart of a rendering method provided by one of the embodiments of the present disclosure;
[0022] Figure 2 is a schematic diagram of an implementation environment of a rendering method provided by one of the embodiments of the present disclosure;
[0023] Figure 3 is a block diagram of a rendering device provided by one of the embodiments of the present disclosure;
[0024] Figure 4 It is a logical structure diagram of an electronic device for implementing rendering provided by one of the embodiments of the present disclosure. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present disclosure.
[0026] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0027] It should be understood that in the embodiments of the present disclosure, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.
[0028] It should be understood that in the embodiments of the present disclosure, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean that B is determined only according to A, and B can also be determined according to A and / or other information.
[0029] Before describing the implementation modes of the present disclosure in detail, the implementation environment of the present disclosure is first described in detail.
[0030] Figure 1 The implementation environment of a rendering method provided by one embodiment of the present disclosure is shown. Figure 1 As shown, in the implementation environment of the present disclosure, an electronic device 100, a Deadline server 200 and a rendering node 300 are included, and the electronic device 100, the Deadline server 200 and the rendering node 300 are all in the same network.
[0031] The executor of the present disclosure is an electronic device 100, which may be a terminal device or a server. The terminal device may be a desktop computer, a laptop computer, a tablet computer, a mobile phone, etc., or other electronic devices, which are not specifically limited in the present disclosure. Optionally, the server is used to provide background services for the client of the application in the terminal device. For example, the server may be the background server of the above-mentioned application. Optionally, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, which are not specifically limited in the present disclosure.
[0032] The electronic device 100 is installed with a first graphics processing device and a Deadline client, wherein the first graphics device may include at least one of the following: 3D graphics software and a 3D graphics engine. Optionally, the electronic device 100 may also be installed with a second graphics processing device, which may include at least one of the following: 3D graphics software and a 3D graphics engine. The Deadline client is connected to the Deadline server to achieve communication between the two.
[0033] Deadline server 200 is the server where the Deadline server is located. Deadline is a rendering farm platform suitable for Windows, Linux and macOS operating systems, and is widely used in film and television production, game design and architectural design. Deadline can use multiple computers (called rendering nodes) to work together to accelerate the rendering process. Its main purpose is to accelerate the rendering process of images, videos, animations and other content to meet the rendering needs of high-quality works. In the traditional rendering process, due to the large amount of image data, the rendering time often takes several hours or even days, but Deadline greatly shortens this process through parallel computing.
[0034] The rendering node 300 is a computer connected to the Deadline server on the Deadline server 200 and registered as a rendering node on the Deadline server. The rendering node 300 is configured with a renderer, such as a RenderMan renderer.
[0035] Figure 2 A rendering method provided by one embodiment of the present disclosure is shown. Figure 2 As shown, the method includes the following steps S101 to S104.
[0036] Step S101: obtaining a rendering configuration file in a target format generated by a first graphics processing device for a virtual target; the target format is a format recognizable by a RenderMan renderer.
[0037] In an optional embodiment, the rendering method provided by the embodiment of the present disclosure may be implemented in the form of a plug-in, and the plug-in may be configured in the first graphics processing device.
[0038] In an optional embodiment, the virtual target may include at least one of the following: a virtual scene and a virtual model. Optionally, the virtual scene may be a game scene. Optionally, the virtual model may be a role model in a game, an object model in a game, a building model in a game, and the like.
[0039] In the present disclosure, when a rendering requirement (such as rendering a virtual target) needs to be achieved through a RenderMan renderer and the rendering needs to be accelerated by parallel computing of Deadline, a rendering configuration file having a target format can be generated by a first graphics processing device for the virtual target to be rendered, wherein the target format is one of the formats recognizable by the RenderMan renderer.
[0040] Some graphics processing devices support the RenderMan renderer. In such graphics processing devices, the RenderMan renderer can be configured in the graphics processing device in the form of a plug-in; while some graphics processing devices do not support the RenderMan renderer. In such graphics processing devices, the RenderMan plug-in cannot be used to achieve rendering requirements.
[0041] In an optional embodiment, the first graphics processing device may be a graphics processing device that does not support the RenderMan renderer, such as Unreal Engine (a 3D graphics engine), Cinema 4D (a 3D graphics engine), 3DsMax (a 3D graphics engine), etc.
[0042] In one implementation of this embodiment, step S101 may be implemented in the following manner:
[0043] importing a virtual target into the first graphics processing device;
[0044] Exporting a rendering configuration file in a first format for a virtual target by a first graphics processing device; the first format is a format that is not recognizable by a RenderMan renderer but is recognizable by a second graphics processing device, and the second graphics processing device can recognize the target format;
[0045] The rendering configuration file in the first format is converted into a rendering configuration file in the target format by the second graphics processing device.
[0046] In the above-mentioned implementation, the first graphics processing device does not support the RenderMan renderer, and therefore cannot support the target format, that is, a rendering configuration file having the target format cannot be directly generated in the first graphics processing device. For the first graphics processing device that does not support the RenderMan renderer, the rendering configuration file can be converted into a format with the aid of a second graphics processing device that supports the RenderMan renderer, thereby obtaining a rendering configuration file having the target format. Specifically, a rendering configuration file having a first format can be first exported for a virtual target in the first graphics processing device, wherein the first graphics processing device can support the first format but not the target format, and then the format of the rendering configuration file is converted from the first format to the target format in the second graphics processing device, wherein the second graphics processing device can support both the first format and the target format.
[0047] In another implementation of this embodiment, step S101 may be implemented in the following manner:
[0048] importing a virtual target into the first graphics processing device;
[0049] Exporting a rendering configuration file in a second format for a virtual target through the first graphics processing device; the second format is a format that is unrecognizable by a RenderMan renderer;
[0050] Running a preconfigured format conversion code in a first graphics processing device;
[0051] The rendering configuration file having the second format is converted into a rendering configuration file having the target format through the format conversion code.
[0052] In the above embodiment, the first graphics processing device does not support the RenderMan renderer and therefore cannot support the target format, that is, a rendering configuration file with the target format cannot be directly generated in the first graphics processing device. For the first graphics processing device that does not support the RenderMan renderer, the format of the rendering configuration file can be converted without the help of a second graphics processing device that supports the RenderMan renderer. Instead, a format conversion code for converting the rendering configuration file in the second format into the rendering configuration file in the target format is pre-written, which mainly includes name conversion of configuration items from the second format to the target format. The format conversion code can be run in the form of a script, a program, etc. By running the format conversion code, the rendering configuration file in the second format can be converted into a rendering configuration file in the target format.
[0053] Optionally, the second format may be the same as the first format.
[0054] Optionally, the second format may be different from the first format.
[0055] In an optional embodiment, the first graphics processing device may be a graphics processing device that supports a RenderMan renderer, such as Blender (a 3D graphics software) or Maya (a 3D graphics software). In an implementation of this embodiment, step S101 may be implemented in the following manner:
[0056] importing a virtual target into the first graphics processing device;
[0057] A rendering configuration file in a target format is exported for the virtual target through a RenderMan plug-in configured in the first graphics processing device.
[0058] In the above embodiment, the rendering configuration file in the target format may be directly exported through the RenderMan plug-in installed in the first graphics processing device.
[0059] Optionally, the target format can be RIB (RenderMan Interface Bytestream) format.
[0060] The RIB format is a file format supported by the RenderMan renderer. RIB files (rendering configuration files with target formats) can be used to store rendering settings and scene descriptions.
[0061] For example, a RIB file can contain the following types of rendering configurations:
[0062] Scene description: RIB files describe in detail the objects, lights, cameras and other elements and their properties in the virtual scene. For example, the shape, material, texture, etc. of the object can be defined.
[0063] Light settings: RIB files can contain light positions, intensity, color and other settings to control the lighting effects of the virtual scene1.
[0064] Camera settings: RIB files can include settings such as the position, viewing angle, focal length, etc. of the virtual camera, which are used to define the viewing angle and field of view of the rendering.
[0065] Materials and Textures: RIB files can define the properties of materials, such as color, reflectivity, transparency, etc., as well as texture images applied to the surface of an object.
[0066] Rendering parameters: RIB files can include sampling rate, anti-aliasing settings, ray tracing parameters, etc., which are used to control the quality and speed of rendering.
[0067] The RIB file may also include the range of rendering frames, the priority of the rendering task, the output path of the rendering result, etc. Among them, the priority of the rendering task refers to the priority of the rendering task (i.e., the task of rendering the virtual target) corresponding to the RIB file. This priority can be used to stop the rendering tasks with lower priorities when the required rendering nodes (such as rendering nodes that support the RenderMan renderer) are insufficient, so that the required rendering nodes can give priority to the rendering tasks with higher priorities.
[0068] Step S102: writing the storage path of the rendering configuration file into the RenderMan renderer configuration file.
[0069] In an optional embodiment, a rendering configuration file in a target format may be stored in the electronic device 100 .
[0070] In this step, you can write the rendering configuration file in the target format to the RenderMan renderer configuration file, namely the RenderManSettings.ini file. The RenderMan renderer configuration file is read by Deadline to set up and assign rendering tasks.
[0071] In an optional embodiment, other content related to the rendering task (such as the rendering frame range, the priority of the rendering task, the output path of the rendering result, etc.) can also be read from a rendering configuration file having a target format, and the read content can be written into the RenderMan renderer configuration file together with the storage path of the rendering configuration file to facilitate deadline setting and allocation of rendering tasks.
[0072] In an optional embodiment, the storage path of the rendering configuration file in the target format may be written into the SceneBox configuration item in the RenderMan renderer configuration file.
[0073] The following is an example of the contents of a RenderManSettings.ini file:
[0074] CommandLineBox=
[0075] DepartmentBox=
[0076] FramesBox=1
[0077] GroupBox=none
[0078] IsBlacklistBox=False
[0079] LimitGroupBox=
[0080] MachineLimitBox=0
[0081] MachineListBox=
[0082] PoolBox=blenderrender
[0083] PriorityBox=50
[0084] SceneBox=%rib_path%
[0085] SecondaryPoolBox=
[0086] ThreadsBox=0
[0087] WorkingDirBox=
[0088] Among them, the storage path of the rendering configuration file with the target format can be written into the SceneBox configuration item in the RenderManSettings.ini file.
[0089] Step S103: writing the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file.
[0090] In this step, you can read the RenderMan renderer configuration file through Deadline, and write the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file through Deadline. The Deadline job file is the file used by Deadline to set and assign rendering tasks.
[0091] In an optional embodiment, step S103 may be implemented by the following steps S1031 to S1034:
[0092] Step S1031: Assemble target commands.
[0093] In this step, a target command can be assembled, which creates a system subprocess by calling the subprocess module, connects its input and output, and obtains the return status to run the Deadlinecommand tool. Deadlinecommand tool is a command line tool of Deadline itself, which is used to run background commands without opening the user interface.
[0094] Step S1032: Run the target command to create a system subprocess.
[0095] Step S1033: Run the Deadlinecommand tool through the system subprocess.
[0096] Running the target command can create a system subprocess, which can run the Deadlinecommand tool in the background.
[0097] Step S1034: Write the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file through the Deadlinecommand tool.
[0098] In an optional embodiment, a preconfigured RenderMan rendering task script may be run through the Deadlinecommand tool, and the rendering configuration information in the RenderMan renderer configuration file may be written into the Deadline job file through the RenderMan rendering task script.
[0099] In an optional embodiment, the Deadline job file includes a Deadline rendering task information job file (i.e., renderman_job_info.job file) and a Deadline rendering plug-in information job file (i.e., renderman_plugin_info.job file). Through the RenderMan rendering task script, the first rendering configuration information in the RenderMan renderer configuration file can be written into the Deadline rendering task information job file, and the second rendering configuration information in the RenderMan renderer configuration file can be written into the Deadline rendering plug-in information job file.
[0100] The information written into the renderman_plugin_info.job file needs to be renamed to facilitate the RenderMan renderer to recognize it. These names are the official preset fixed writing methods. Refer to the content example of the RenderManSettings.ini file provided above:
[0101] The SceneBox configuration item in the RenderManSettings.ini file corresponds to
[0102] RibFile configuration item in the renderman_plugin_info.job file;
[0103] WorkingDirBox in the RenderManSettings.ini file corresponds to
[0104] WorkingDirectory configuration item in the renderman_plugin_info.job file;
[0105] The ThreadsBox in the RenderManSettings.ini file corresponds to the Thread configuration item in the renderman_plugin_info.job file;
[0106] CommandLineBox in the RenderManSettings.ini file corresponds to
[0107] CommandLineOptions configuration item in the renderman_plugin_info.job file.
[0108] Therefore, the step of writing the first rendering configuration information in the RenderMan renderer configuration file into the Deadline rendering task information job file can be implemented in the following way:
[0109] Write the SceneBox configuration parameters in the RenderMan renderer configuration file to the RibFile configuration item in the Deadline rendering task information job file;
[0110] Write the WorkingDirBox configuration parameter in the RenderMan renderer configuration file to the WorkingDirectory configuration item in the Deadline rendering task information job file;
[0111] Write the ThreadsBox configuration parameters in the RenderMan renderer configuration file to the Thread configuration item in the Deadline rendering task information job file;
[0112] Write the CommandLineBox configuration parameters in the RenderMan renderer configuration file to the CommandLineOptions configuration item in the Deadline rendering task information job file.
[0113] In this way, you can get the following content example of the renderman_plugin_info.job file, where D: / Projects / sample.rib is the storage path of the rendering configuration file in RIB format:
[0114] RibFile=D: / Projects / sample.rib
[0115] FramePadding=above22
[0116] WorkingDirectory=
[0117] Threads = 0
[0118] CommandLineOptions=
[0119] In the renderman_job_info.job file, you need to set the Plugin configuration item and the Name configuration item, which tells Deadline that this is a RenderMan task and which RIB file to use.
[0120] The steps of writing the second rendering configuration information in the RenderMan renderer configuration file to the Deadline rendering plug-in information job file can be achieved in the following ways:
[0121] Write the SceneBox configuration parameter in the RenderMan renderer configuration file to the Name configuration item in the Deadline rendering plug-in information job file;
[0122] Write the name of the RenderMan renderer to the Plugin configuration item in the Deadline render plugin information job file.
[0123] The information in the renderman_job_info.job file is the details of the rendering task. Most of them use default values or are left blank (not set). This information is the fixed writing method of the rendering task preset by Deadline. In this way, you can get the following content example of the renderman_job_info.job file, where D: / Projects / sample.rib is the storage path of the rendering configuration file in RIB format:
[0124] Plugin = RenderMan
[0125] Name = D: / Projects / sample.rib
[0126] Comment=
[0127] Department=
[0128] Pool=
[0129] SecondaryPool=
[0130] Group=none
[0131] Priority = 50
[0132] TaskTimeoutMinutes=0
[0133] EnableAutoTimeout=False
[0134] ConcurrentTasks = 1
[0135] LimitConcurrentTasksToNumberOfCpus=True
[0136] MachineLimit=0
[0137] Whitelist=
[0138] LimitGroups=
[0139] JobDependencies=
[0140] OnJobComplete = Nothing
[0141] Frames = 1
[0142] ChunkSize=1
[0143] Step S104: submitting the Deadline job file to the Deadline server, so that the Deadline server assigns the rendering task for the virtual target to the rendering node configured with the RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node.
[0144] In this step, the electronic device 100 may submit the Deadline job file to the Deadline server, and then the Deadline server 200 may select one or more rendering nodes 300 configured with a RenderMan renderer from the rendering nodes connected to the Deadline server 200, and then distribute the job content in the Deadline job file to the one or more rendering nodes 300, so as to assign the rendering task for the virtual target to the one or more rendering nodes 300. Afterwards, the one or more rendering nodes 300 may respectively obtain the storage path of the rendering configuration file (with the target format) from the job content received by each, and then obtain the rendering configuration file (with the target format) according to the storage path of the rendering configuration file (with the target format), parse the rendering configuration file (with the target format), and then perform distributed parallel rendering on the virtual target described in the rendering configuration file according to the received job content.
[0145] The two .job files are distributed by the Deadline server 200 to the Deadline client on the one or more rendering nodes 300. The Deadline client on the rendering node 300 identifies that the plug-in to be used is RenderMan based on the two .job files, and identifies the storage path of the RIB file. Then, the Deadline client on the rendering node 300 can start the RenderMan plug-in on the local computer and obtain the RIB file. The RenderMan plug-in reads the RIB file and renders the virtual target described in the RIB file.
[0146] After the rendering node 300 completes rendering, the rendering result may be output to a rendering result output path specified in a rendering configuration file having a target format.
[0147] Optionally, the Deadline server 200 may split a RIB file into multiple RIB files, and then distribute rendering tasks, thereby reducing the rendering pressure of a single rendering node, so that the advantages of Deadline distributed parallel rendering are fully utilized.
[0148] Optionally, if the electronic device 100 has multiple RIB files that need to be submitted to the Deadline server 200, the system subprocess wait (process.wait) can be set to wait for the previous RIB file to be submitted, and then continue to submit the next RIB file until the last RIB file is submitted.
[0149] Usually in a production process, most tools will be integrated into an entry platform and deployed in categories to facilitate users to find and use. A technical solution that does not rely on software and can be deployed at any location / link is particularly convenient. In an exemplary embodiment of the present disclosure, it is not necessary to rely on the rendering process of the three-dimensional graphics software or the three-dimensional graphics engine itself, but the step process provided by the present disclosure can be embedded in the three-dimensional graphics software or the three-dimensional graphics engine as a plug-in, that is, the RenderMan rendering task submission process can be performed at any location / link. It is very convenient for the integration of image processing processes using the RenderMan renderer. Users do not need to switch to software that supports both Deadline and RenderMan renderers to submit rendering tasks. In the existing system, if such software is not used in the process of submitting rendering tasks, it is necessary to install and use a software that supports both at the same time, just to submit rendering tasks, which increases the cost of setting up, using and maintaining the process, and is also very unfriendly to users. The present disclosure can solve this problem.
[0150] In a 3D graphics software or 3D graphics engine that supports the RenderMan plug-in but does not support the Deadline plug-in, the 3D graphics software or 3D graphics engine and the RenderMan renderer are all running locally on the electronic device, and Deadline cannot be used to achieve multi-machine joint rendering, resulting in low rendering efficiency. The present disclosure only requires the installation of the Deadline client and the 3D graphics software / 3D graphics engine on the same electronic device at the same time, and the RenderMan rendering task can be submitted to Deadline through the rendering method provided by the present disclosure, thereby utilizing Deadline's multi-machine joint rendering function to improve rendering efficiency.
[0151] For 3D graphics software or 3D graphics engines that do not support RenderMan plug-ins but support Deadline plug-ins, since they do not support RenderMan plug-ins at all, even if they support Deadline plug-ins, they cannot submit RenderMan rendering tasks to Deadline because the configuration file formats generated by these engines cannot be recognized by the RenderMan rendering nodes under Deadline. The present disclosure can first generate a RIB file that can be recognized by RenderMan, and then submit the configuration content in the RIB file to Deadline, thereby submitting a RenderMan rendering task to Deadline.
[0152] Therefore, in the present disclosure, regardless of whether the 3D graphics software or 3D graphics engine supports the RenderMan renderer and Deadline, a RIB file can be generated first, and then the configuration content in the RIB file can be submitted to Deadline, and the RenderMan rendering node under Deadline can recognize the content in the RIB file and perform joint rendering. In this way, the present disclosure can submit RenderMan rendering tasks to Deadline without relying on the 3D graphics software or 3D graphics engine, thereby utilizing the multi-machine joint rendering advantage of Deadline to complete the RenderMan rendering tasks, and at the same time utilizing the rendering effect advantage of RenderMan and the multi-machine joint rendering advantage of Deadline, thereby improving both the quality of image production and the efficiency of image production.
[0153] In the present disclosure, a rendering configuration file with a target format generated by a first graphics processing device for a virtual target can be obtained, wherein the target format is a format recognizable by a RenderMan renderer; then the storage path of the rendering configuration file is written into a RenderMan renderer configuration file; then the rendering configuration information in the RenderMan renderer configuration file is written into a Deadline job file; and then the Deadline job file is submitted to a Deadline server, so that the Deadline server assigns the rendering task for the virtual target to a rendering node configured with a RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node. In an exemplary embodiment of the present disclosure, a rendering configuration file with a format recognizable by a RenderMan renderer can be generated based on the rendering task, and then the storage path of the rendering configuration file is finally written into the Deadline job file, so that Deadline can read the rendering configuration file according to the Deadline job file, and then perform multi-machine joint rendering on the rendering task, so that RenderMan rendering connected to Deadline can be implemented in a first graphics processing device that does not support RenderMan and / or Deadline, so that the rendering effect advantages of RenderMan and the multi-machine joint rendering advantages of Deadline can be fully utilized to efficiently produce images that meet the requirements.
[0154] Corresponding to the rendering method provided in the embodiment of the present disclosure, the embodiment of the present disclosure also provides a rendering device. Figure 3 As shown, the device 700 includes:
[0155] The acquisition module 701 is used to acquire a rendering configuration file in a target format generated by the first graphics processing device for a virtual target; the target format is a format recognizable by a RenderMan renderer;
[0156] A first writing module 702 is used to write the storage path of the rendering configuration file into the RenderMan renderer configuration file;
[0157] The second writing module 703 is used to write the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file;
[0158] The rendering submission module 704 is used to submit the Deadline job file to the Deadline server, so that the Deadline server assigns the rendering task for the virtual target to the rendering node configured with the RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node.
[0159] In an optional embodiment, writing the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file includes:
[0160] Assemble target commands;
[0161] Running the target command to create a system subprocess;
[0162] Running the Deadlinecommand tool through the system subprocess;
[0163] The rendering configuration information in the RenderMan renderer configuration file is written into the Deadline job file through the Deadlinecommand tool.
[0164] In an optional embodiment, writing the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file through the Deadlinecommand tool includes:
[0165] Run the pre-configured RenderMan rendering task script through the Deadlinecommand tool;
[0166] The rendering configuration information in the RenderMan renderer configuration file is written into the Deadline job file through the RenderMan rendering task script.
[0167] In an optional embodiment, the Deadline job file includes a Deadline rendering task information job file and a Deadline rendering plug-in information job file, and writing the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file includes:
[0168] Writing the first rendering configuration information in the RenderMan renderer configuration file into the Deadline rendering task information job file;
[0169] The second rendering configuration information in the RenderMan renderer configuration file is written into the Deadline rendering plug-in information job file.
[0170] In an optional embodiment, writing the first rendering configuration information in the RenderMan renderer configuration file into the Deadline rendering task information job file includes:
[0171] Writing the SceneBox configuration parameter in the RenderMan renderer configuration file into the RibFile configuration item in the Deadline rendering task information job file;
[0172] Writing the WorkingDirBox configuration parameter in the RenderMan renderer configuration file into the WorkingDirectory configuration item in the Deadline rendering task information job file;
[0173] Write the ThreadsBox configuration parameter in the RenderMan renderer configuration file into the Thread configuration item in the Deadline rendering task information job file;
[0174] Write the CommandLineBox configuration parameter in the RenderMan renderer configuration file into the CommandLineOptions configuration item in the Deadline rendering task information job file.
[0175] In an optional embodiment, writing the second rendering configuration information in the RenderMan renderer configuration file into the Deadline rendering plug-in information job file includes:
[0176] Write the SceneBox configuration parameter in the RenderMan renderer configuration file into the Name configuration item in the Deadline rendering plug-in information job file;
[0177] Write the name of the RenderMan renderer to the Plugin configuration item in the Deadline rendering plugin information job file.
[0178] In an optional embodiment, writing the storage path of the rendering configuration file into the RenderMan renderer configuration file includes:
[0179] The storage path of the rendering configuration file is written into the SceneBox configuration item in the RenderMan renderer configuration file.
[0180] In an optional embodiment, the step of obtaining a rendering configuration file in a target format generated by the first graphics processing device for the virtual target includes:
[0181] importing the virtual target into the first graphics processing device;
[0182] Exporting a rendering configuration file having a first format for the virtual target by the first graphics processing device; the first format is a format that is not recognizable by a RenderMan renderer but is recognizable by a second graphics processing device, and the second graphics processing device can recognize the target format;
[0183] The rendering configuration file in the first format is converted into a rendering configuration file in the target format by the second graphics processing device.
[0184] In an optional embodiment, the step of obtaining a rendering configuration file in a target format generated by the first graphics processing device for the virtual target includes:
[0185] importing the virtual target into the first graphics processing device;
[0186] Exporting a rendering configuration file in a second format for the virtual target through the first graphics processing device; the second format is a format that is unrecognizable by the RenderMan renderer;
[0187] Running a preconfigured format conversion code in the first graphics processing device;
[0188] The rendering configuration file in the second format is converted into a rendering configuration file in the target format by using the format conversion code.
[0189] In an optional embodiment, the step of obtaining a rendering configuration file in a target format generated by the first graphics processing device for the virtual target includes:
[0190] importing the virtual target into the first graphics processing device;
[0191] A rendering configuration file having the target format is exported for the virtual target through a RenderMan plug-in configured in the first graphics processing device.
[0192] In an optional embodiment, the Deadline server assigns the rendering task for the virtual target to a rendering node configured with the RenderMan renderer according to the Deadline job file, including:
[0193] The Deadline server selects one or more rendering nodes configured with the RenderMan renderer from rendering nodes connected to the Deadline server;
[0194] The job content in the Deadline job file is distributed to the one or more rendering nodes, so as to assign the rendering task for the virtual target to the one or more rendering nodes.
[0195] In an optional embodiment, the rendering node performs distributed parallel rendering for the rendering task, including:
[0196] The one or more rendering nodes respectively obtain the storage path of the rendering configuration file from the job content received by each of them;
[0197] Acquire the rendering configuration file according to the storage path of the rendering configuration file;
[0198] Parsing the rendering configuration file;
[0199] Distributed parallel rendering is performed on the virtual target described in the rendering configuration file according to the received job content.
[0200] In an optional embodiment, the target format is a RIB format.
[0201] In an optional embodiment, the first graphics processing device includes at least one of the following: three-dimensional graphics software and a three-dimensional graphics engine.
[0202] In an optional embodiment, the virtual target includes at least one of the following: a virtual scene and a virtual model.
[0203] In the present disclosure, a rendering configuration file with a target format generated by a first graphics processing device for a virtual target can be obtained, wherein the target format is a format recognizable by a RenderMan renderer; then the storage path of the rendering configuration file is written into a RenderMan renderer configuration file; then the rendering configuration information in the RenderMan renderer configuration file is written into a Deadline job file; and then the Deadline job file is submitted to a Deadline server, so that the Deadline server assigns the rendering task for the virtual target to a rendering node configured with a RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node. In an exemplary embodiment of the present disclosure, a rendering configuration file with a format recognizable by a RenderMan renderer can be generated based on the rendering task, and then the storage path of the rendering configuration file is finally written into the Deadline job file, so that Deadline can read the rendering configuration file according to the Deadline job file, and then perform multi-machine joint rendering on the rendering task, so that RenderMan rendering connected to Deadline can be implemented in a first graphics processing device that does not support RenderMan and / or Deadline, so that the rendering effect advantages of RenderMan and the multi-machine joint rendering advantages of Deadline can be fully utilized to efficiently produce images that meet the requirements.
[0204] Next, an electronic device provided by an embodiment of the present disclosure is introduced. Figure 4 , Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. The electronic device 800 may be deployed with the rendering device described in the embodiment of the present disclosure to implement the functions in the embodiment of the present disclosure. Specifically, the electronic device 800 includes: a receiver 801, a transmitter 802, a processor 803 and a memory 804 (the number of processors 803 in the electronic device 800 may be one or more, Figure 4 In the example of FIG. 801 , the processor 803 may include an application processor 8031 and a communication processor 8032. In some embodiments of the present disclosure, the receiver 801, the transmitter 802, the processor 803 and the memory 804 may be connected via a bus or other means.
[0205] The memory 804 may include a read-only memory and a random access memory, and provides instructions and data to the processor 803. A portion of the memory 804 may also include a non-volatile random access memory (NVRAM). The memory 804 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0206] The processor 803 controls the operation of the execution device. In a specific application, the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0207] The method disclosed in the above embodiment of the present disclosure can be applied to the processor 803, or implemented by the processor 803. The processor 803 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 803. The above processor 803 can be a general processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 803 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present disclosure. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiment of the present disclosure can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 804, and the processor 803 reads the information in the memory 804 and completes the steps of the above method in combination with its hardware.
[0208] The receiver 801 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device. The transmitter 802 can be used to output digital or character information through the first interface; the transmitter 802 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 802 can also include a display device such as a display screen.
[0209] In the embodiment of the present disclosure, the application processor 8031 in the processor 803 is used to execute the rendering method in the embodiment of the present disclosure. It should be noted that the specific manner in which the application processor 8031 executes each step is based on the same concept as the various method embodiments in the present disclosure, and the technical effects brought by it are the same as the various method embodiments in the present disclosure. For specific contents, please refer to the description in the method embodiments shown in the above disclosure, and no further description will be given here.
[0210] The disclosed embodiment also provides a chip for executing instructions, and the chip is used to execute the technical solution of the rendering method in the above embodiment.
[0211] The embodiment of the present disclosure further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a processor, the processor executes the technical solution of the rendering method in the above embodiment.
[0212] The embodiments of the present disclosure further provide a computer program product, including a computer program, which is used to execute the technical solution of the rendering method in the above embodiments when executed by a processor.
[0213] The computer readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or dedicated server.
[0214] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0215] Although the present disclosure is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present disclosure. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the present disclosure shall be based on the scope defined by the claims of the present disclosure.
Claims
1. A rendering method, characterized in that: The method comprises: Acquire a rendering configuration file in a target format generated by the first graphics processing device for a virtual target; the target format is a format recognizable by a RenderMan renderer; Writing the storage path of the rendering configuration file into the RenderMan renderer configuration file; Writing the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file; Submitting the Deadline job file to the Deadline server, so that the Deadline server assigns the rendering task for the virtual target to the rendering node configured with the RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node.
2. The method according to claim 1, characterized in that Writing the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file includes: Assemble target commands; Running the target command to create a system subprocess; Running the Deadlinecommand tool through the system subprocess; The rendering configuration information in the RenderMan renderer configuration file is written into the Deadline job file through the Deadlinecommand tool.
3. The method according to claim 2, characterized in that Writing the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file through the Deadlinecommand tool includes: Run the pre-configured RenderMan rendering task script through the Deadlinecommand tool; The rendering configuration information in the RenderMan renderer configuration file is written into the Deadline job file through the RenderMan rendering task script.
4. The method according to claim 1, characterized in that The Deadline job file includes a Deadline rendering task information job file and a Deadline rendering plug-in information job file, and the writing of the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file includes: Writing the first rendering configuration information in the RenderMan renderer configuration file into the Deadline rendering task information job file; The second rendering configuration information in the RenderMan renderer configuration file is written into the Deadline rendering plug-in information job file.
5. The method according to claim 4, characterized in that The step of writing the first rendering configuration information in the RenderMan renderer configuration file into the Deadline rendering task information job file comprises: Writing the SceneBox configuration parameter in the RenderMan renderer configuration file into the RibFile configuration item in the Deadline rendering task information job file; Writing the WorkingDirBox configuration parameter in the RenderMan renderer configuration file into the WorkingDirectory configuration item in the Deadline rendering task information job file; Write the ThreadsBox configuration parameter in the RenderMan renderer configuration file into the Thread configuration item in the Deadline rendering task information job file; Write the CommandLineBox configuration parameter in the RenderMan renderer configuration file into the CommandLineOptions configuration item in the Deadline rendering task information job file.
6. The method according to claim 4, characterized in that The step of writing the second rendering configuration information in the RenderMan renderer configuration file into the Deadline rendering plug-in information job file comprises: Write the SceneBox configuration parameter in the RenderMan renderer configuration file into the Name configuration item in the Deadline rendering plug-in information job file; Write the name of the RenderMan renderer to the Plugin configuration item in the Deadline rendering plugin information job file.
7. The method according to claim 1, characterized in that The step of writing the storage path of the rendering configuration file into the RenderMan renderer configuration file comprises: The storage path of the rendering configuration file is written into the SceneBox configuration item in the RenderMan renderer configuration file.
8. The method according to claim 1, characterized in that The obtaining of a rendering configuration file in a target format generated by the first graphics processing device for the virtual target includes: importing the virtual target into the first graphics processing device; Exporting a rendering configuration file having a first format for the virtual target by the first graphics processing device; the first format is a format that is not recognizable by a RenderMan renderer but is recognizable by a second graphics processing device, and the second graphics processing device can recognize the target format; The rendering configuration file in the first format is converted into a rendering configuration file in the target format by the second graphics processing device.
9. The method according to claim 1, characterized in that: The obtaining of a rendering configuration file in a target format generated by the first graphics processing device for the virtual target includes: importing the virtual target into the first graphics processing device; Exporting a rendering configuration file in a second format for the virtual target through the first graphics processing device; the second format is a format that is unrecognizable by the RenderMan renderer; Running a preconfigured format conversion code in the first graphics processing device; The rendering configuration file in the second format is converted into a rendering configuration file in the target format by using the format conversion code.
10. The method according to claim 1, characterized in that The obtaining of a rendering configuration file in a target format generated by the first graphics processing device for the virtual target includes: importing the virtual target into the first graphics processing device; A rendering configuration file having the target format is exported for the virtual target through a RenderMan plug-in configured in the first graphics processing device.
11. The method according to claim 1, characterized in that: The Deadline server assigns the rendering task for the virtual target to a rendering node configured with the RenderMan renderer according to the Deadline job file, including: The Deadline server selects one or more rendering nodes configured with the RenderMan renderer from rendering nodes connected to the Deadline server; The job content in the Deadline job file is distributed to the one or more rendering nodes, so as to assign the rendering task for the virtual target to the one or more rendering nodes.
12. The method according to claim 11, characterized in that The rendering node performs distributed parallel rendering for the rendering task, including: The one or more rendering nodes respectively obtain the storage path of the rendering configuration file from the job content received by each of them; Acquire the rendering configuration file according to the storage path of the rendering configuration file; Parsing the rendering configuration file; Distributed parallel rendering is performed on the virtual target described in the rendering configuration file according to the received job content.
13. The method according to claim 1, characterized in that The target format is the RIB format.
14. The method according to claim 1, characterized in that The first graphics processing device includes at least one of the following: three-dimensional graphics software and a three-dimensional graphics engine.
15. The method according to claim 1, characterized in that The virtual target includes at least one of the following: a virtual scene and a virtual model.
16. A rendering device, characterized in that: The device comprises: An acquisition module, used to acquire a rendering configuration file having a target format generated by the first graphics processing device for a virtual target; the target format is a format recognizable by a RenderMan renderer; A first writing module is used to write the storage path of the rendering configuration file into the RenderMan renderer configuration file; A second writing module is used to write the rendering configuration information in the RenderMan renderer configuration file into the Deadline job file; A rendering submission module is used to submit the Deadline job file to the Deadline server, so that the Deadline server assigns the rendering task for the virtual target to the rendering node configured with the RenderMan renderer according to the Deadline job file, and performs distributed parallel rendering for the rendering task through the rendering node.
17. An electronic device, characterized in that: include: A processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the rendering method as described in any one of claims 1 to 15 is implemented.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, they are used to implement the rendering method according to any one of claims 1 to 15.
Citation Information
Cited By
Data processing method, service platform, program product and storage medium
CN120523854A