CN109246902B - Light editing method and computer readable storage medium - Google Patents
Light editing method and computer readable storage medium Download PDFInfo
- Publication number
- CN109246902B CN109246902B CN201810876956.6A CN201810876956A CN109246902B CN 109246902 B CN109246902 B CN 109246902B CN 201810876956 A CN201810876956 A CN 201810876956A CN 109246902 B CN109246902 B CN 109246902B
- Authority
- CN
- China
- Prior art keywords
- channel
- lamp
- light
- unique identifier
- effect material
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
The invention discloses a light editing method and a computer readable storage medium, wherein the method comprises the following steps: presetting a corresponding unique identifier according to the channel attribute; associating the unique identifier with a preset channel attribute value to generate a light effect material; acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with a channel address of the lamp channel; and setting the channel attribute value of the channel address corresponding to the unique identifier in the lighting effect material data in the lamp as the channel attribute value in the lighting effect material data. The invention can improve the efficiency of light editing and the universality of light effect materials.
Description
Technical Field
The present invention relates to the field of lighting control technologies, and in particular, to a lighting editing method and a computer-readable storage medium.
Background
Along with the development of the stage lighting industry, the requirements on lamps are higher and higher, more and more types of programmable lamps are generated, and therefore more diversified lighting effects can be combined, but the lamps produced by each manufacturer and various types of lamps of the same manufacturer on the market are independently defined, so that the lighting effects written by lighting programmers cannot be reused, the workload of the whole lighting programmers is increased, the effects must be rewritten on site every time the effects are realized, and the whole working efficiency is reduced.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a light editing method and a computer-readable storage medium are provided, which can improve the efficiency of light editing and the universality of light effect materials.
In order to solve the technical problems, the invention adopts the technical scheme that: a light editing method, comprising:
presetting a corresponding unique identifier according to the channel attribute;
associating the unique identifier with a preset channel attribute value to generate a light effect material;
acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with a channel address of the lamp channel;
and setting the channel attribute value of the channel address corresponding to the unique identifier in the lighting effect material data in the lamp as the channel attribute value in the lighting effect material data.
The invention also relates to a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps as described above.
The invention has the beneficial effects that: the lamp channels with the same attribute in various programmable lamps are extracted, the unique identifiers corresponding to the channel attributes are managed in a unified mode, the unique identifiers are associated with different channel attribute values, different light effect materials are generated, and then the corresponding channel addresses are assigned according to the unique identifiers, so that different lamps can use the same light effect material, and the multiplexing of the light effect materials is achieved. The invention can improve the efficiency of light editing and the universality of the light effect material by realizing the universality of the light effect material of the single lamp.
Drawings
Fig. 1 is a flowchart of a light editing method according to a first embodiment of the present invention.
Detailed Description
In order to explain technical contents, objects and effects of the present invention in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
The most key concept of the invention is as follows: the method comprises the steps of extracting lamp channels with the same attribute in various programmable lamps, uniformly managing unique identifiers corresponding to the channel attributes, associating the unique identifiers with different channel attribute values to generate different lighting effect materials, and assigning values to corresponding channel addresses according to the unique identifiers, so that multiplexing of the lighting effect materials is achieved.
Referring to fig. 1, a light editing method includes:
presetting a corresponding unique identifier according to the channel attribute;
associating the unique identifier with a preset channel attribute value to generate a light effect material;
acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with a channel address of the lamp channel;
and setting the channel attribute value of the channel address corresponding to the unique identifier in the lighting effect material data in the lamp as the channel attribute value in the lighting effect material data.
From the above description, the beneficial effects of the present invention are: the universality of the lighting effect material can be improved.
Further, according to the channel attribute of the lamp channel, obtaining a unique identifier corresponding to the lamp channel, and associating the unique identifier with the channel address of the lamp channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with a channel address of the lamp channel;
and when the lamp calls a light effect material, setting the channel attribute value of the channel address corresponding to the unique identifier in the light effect material data in the lamp as the channel attribute value in the light effect material data.
According to the description, the channel addresses and the unique identifiers are firstly associated with all the lamps, and then the lamps can be directly called when the lighting effect materials need to be called, so that the field editing efficiency of the lighting is improved.
Further, according to the channel attribute of the lamp channel, obtaining a unique identifier corresponding to the lamp channel, and associating the unique identifier with the channel address of the lamp channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
when a lamp calls a light effect material, acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel of the lamp, and associating the unique identifier with a channel address of the lamp channel;
and setting the channel attribute value of the channel address corresponding to the unique identifier in the light effect material data in the lamp as the channel attribute value in the light effect material data.
From the above description, when the light needs to call the light effect material, the association between the channel address and the unique identifier is performed, so that the workload of light early-stage editing is reduced.
Further, according to the channel attribute of the lamp channel, obtaining a unique identifier corresponding to the lamp channel, and associating the unique identifier with the channel address of the lamp channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
when a lamp calls a light effect material, judging whether an association relation corresponding to the type of the lamp exists or not, wherein the association relation is the association relation between a unique identifier and a channel address;
if the unique identifier does not exist, acquiring the unique identifier corresponding to the lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with the channel address of the lamp channel to obtain an association relation corresponding to the type of the lamp;
and if the channel address exists, acquiring the channel address corresponding to the unique identifier in the lighting effect material data in the lamp according to the association relation, and setting the channel attribute value of the channel address as the channel attribute value in the lighting effect material data.
From the above description, it can be known that when a light effect material is called for the first time by a type of light, the channel address is associated with the unique identifier, and when a light effect material is called by a subsequent light of the same type, the channel attribute value of the corresponding channel address can be directly assigned, so that the overall efficiency of light editing is improved.
Further, the light effect comprises more than two light actions; the associating the unique identifier with a preset channel attribute value to generate the light effect material specifically comprises:
respectively presetting the sequence of each light action and the corresponding channel attribute and channel attribute value;
determining a unique identifier corresponding to each light action according to the channel attribute corresponding to each light action;
and respectively associating the sequence of each light action, the corresponding unique identifier and the corresponding channel attribute value to generate a light effect material.
Further, when a light effect material is called by a lamp, setting a channel attribute value of a channel address in the lamp corresponding to a unique identifier in the light effect material data to a channel attribute value in the light effect material data specifically includes:
when a lamp calls a lamplight effect material, sequentially acquiring a unique identifier and a channel attribute value in the lamplight effect material data according to the sequence in the lamplight effect material, and setting the channel attribute value of a channel address corresponding to the unique identifier in the lamp as the channel attribute value.
According to the description, the lamplight effect materials containing a plurality of lamplight actions are arranged, so that the lamp can execute the plurality of lamplight actions by only calling one lamplight effect material, the workload of lamplight programmers is greatly reduced, and the working efficiency of lamplight editing is improved.
Further, still include:
selecting and combining more than two lighting effect materials to generate a lighting group effect material;
creating a lamp group, wherein the number of lamps in the lamp group is consistent with the number of light effect materials in the lamp group effect materials;
sequentially acquiring a lamp from the lamp group, and simultaneously sequentially acquiring a light effect material from the lamp group effect material;
and acquiring a lamp channel corresponding to the unique identifier in the light effect material in the lamp, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material.
According to the description, the calling of the effect materials of the whole lamp group can be realized, and the efficiency of light editing is further improved.
Further, still include:
selecting and combining more than two lamp group effect materials to generate a scene effect material;
creating a scene, wherein the number of lamp groups in the scene is consistent with the number of lamp group effect materials in the scene effect materials, and the number of lamps in the lamp groups is in one-to-one correspondence with the number of lamp effect materials in the lamp group effect materials;
sequentially acquiring a lamp group from the scene, and simultaneously acquiring a lamp group effect material corresponding to the lamp group from the scene effect material;
sequentially acquiring a lamp from the lamp group, and simultaneously sequentially acquiring a light effect material from the corresponding lamp group effect material;
and acquiring a lamp channel corresponding to the unique identifier in the light effect material in the lamp, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material.
According to the description, the calling of the whole scene effect material can be realized, and the light editing efficiency is further improved.
The invention also proposes a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps as described above.
Example one
Referring to fig. 1, a first embodiment of the present invention is: a light editing method comprises the following steps:
s1: and presetting a corresponding unique identifier according to the channel attribute. Preferably, the unique identifier is a name. For example, the names of the channels for controlling the horizontal trajectory and the vertical trajectory in the motion control channel are x and y, the names of the channels for controlling the red color value, the green color value, and the blue color value in the color control channel are r, g, and b, and the name of the speed control channel is s.
S2: associating the unique identifier with a preset channel attribute value to generate a light effect material; for example, (r, g, b) and (255, 255, 255) are associated, and when the lamp calls the light effect material, white light is emitted. The light programmer can associate different unique identifiers with different channel attribute values as required, thereby generating various light effect materials.
Further, more than two lighting actions can be included in one lighting effect material, wherein the lighting actions can be executed in sequence or in the same step. Specifically, the sequence of each light action, the corresponding channel attribute and the corresponding channel attribute value are respectively preset; determining a unique identifier corresponding to each light action according to the channel attribute corresponding to each light action; and respectively associating the sequence of each light action, the corresponding unique identifier and the corresponding channel attribute value to generate a light effect material. Preferably, the obtained association relationship may be saved to a container (qvector), and finally the container is saved as the light effect material resource file.
For example, the preset one lighting effect material includes three lighting actions, the three lighting actions are executed in two steps, the first step is to move to a preset first position, the second step is to move to a preset second position and to make the lighting color display red, and then the association relationship in the lighting effect material is as shown in table 1.
TABLE 1
Sequence of | Unique identifier | Channel attribute value |
1 | (x,y) | (2,4) |
2 | (x,y) | (100,200) |
2 | (r,g,b) | (255,0,0) |
The light programmer can set different sequences of light actions according to requirements, and accordingly various light effect materials are generated.
Further, the time difference between the light actions in different sequences can also be set simultaneously.
S3: and acquiring a unique identifier corresponding to the lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with the channel address of the lamp channel.
Each desk lamp contains a plurality of control channels, and the corresponding channel is identified by adding an index to a base address, for example, a 16-channel lamp, and assuming that the base address is 20, the channel addresses of the lamp channels of the lamp are 20+1, 20+2, 20. Assuming that the two lamp channels with channel addresses of 20+1 and 20+2 in the lamp are respectively channels for controlling a horizontal track and a vertical track in the motion control channel, associating the channel address of 20+1 with x, and associating the channel address of 20+2 with y; assuming that the three lamp channels with channel addresses of 20+7, 20+8, and 20+9 in the lamp are channels for controlling a red value, a green value, and a blue value in the color control channel, the channel addresses 20+7 and r are associated, the channel addresses 20+8 and g are associated, the channel addresses 20+9 and b are associated, and so on, and all the lamp channels of the lamp are associated with corresponding names according to the channel attributes.
S4: and setting a channel attribute value of a channel address corresponding to the unique identifier in the lighting effect material data in the lamp as the channel attribute value in the lighting effect material data, thereby realizing the calling of the lighting effect material by the lamp. For example, assuming that the lighting color of the lamp is to be displayed as blue, the called lighting effect material includes the association relationship between (r, g, b) and (0, 0, 255), and then the channel address corresponding to r, the channel address corresponding to g, and the channel address corresponding to b in the lamp are obtained according to the association relationship obtained in step S3, the channel attribute value corresponding to the channel address of r is set to 0, the channel attribute value corresponding to the channel address of g is set to 0, and the channel attribute value corresponding to the channel address of b is set to 255, and the calling can be realized.
Further, for steps S3 and S4, step S3 may be performed on all lamps, and step S4 may be performed when the light effect material needs to be called, that is, according to the channel attribute of the lamp channel, the unique identifier corresponding to the lamp channel is obtained, and the unique identifier is associated with the channel address of the lamp channel, and when a light effect material is called by a lamp, the channel attribute value of the channel address in the lamp corresponding to the unique identifier in the light effect material data is set as the channel attribute value in the light effect material data.
And when the lamp needs to call the light effect material, sequentially executing the steps S3 and S4 on the lamp, that is, when the lamp calls the light effect material, acquiring the unique identifier corresponding to the lamp channel according to the channel attribute of the lamp channel of the lamp, associating the unique identifier with the channel address of the lamp channel, and setting the channel attribute value of the channel address corresponding to the unique identifier in the light effect material data in the lamp as the channel attribute value in the light effect material data.
It is also possible to perform step S3 first when a light of one type calls the light effect material, and then perform step S4, and then perform step S4 directly when a light of the same type calls the light effect material. Specifically, when a lamp calls a light effect material, judging whether a corresponding association relationship exists according to the type of the lamp; if the unique identifier does not exist, acquiring the unique identifier corresponding to the lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with the channel address of the lamp channel to obtain an association relation corresponding to the type of the lamp; and if the channel address exists, acquiring the channel address corresponding to the unique identifier in the lighting effect material data in the lamp according to the association relation, and setting the channel attribute value of the channel address as the channel attribute value in the lighting effect material data.
Further, the same type of lamps mentioned above refers to a single type and the same type of lamps, excluding a plurality of types including the one type.
Further, if the called light effect material includes more than two light actions, sequentially acquiring a unique identifier and a channel attribute value in the light effect material data according to the sequence in the light effect material, and setting a channel attribute value of a channel address corresponding to the unique identifier in the lamp as the channel attribute value.
For example, if a light effect material including the association shown in table 1 is called, first, a unique identifier and channel attribute values in the order of 1, that is, (x, y) and (2, 4), are obtained, then the channel attribute value corresponding to the channel address of x in the lamp is set to 2, and the channel attribute value corresponding to the channel address of y is set to 4; then, the unique identifier and the channel attribute value in the order of 2, that is, (x, y) and (100, 200), (r, g, b) and (255, 0, 0), are obtained, and then the channel attribute value corresponding to the channel address of x in the lamp is set to 100, the channel attribute value corresponding to the channel address of y is set to 200, the channel attribute value corresponding to the channel address of r is set to 255, the channel attribute value corresponding to the channel address of g is set to 0, and the channel attribute value corresponding to the channel address of b is set to 0.
In the embodiment, the lamp channels with the same attribute in various programmable lamps are extracted, the unique identifiers corresponding to the channel attributes are managed in a unified mode, the unique identifiers are associated with different channel attribute values to generate different light effect materials, and the corresponding channel addresses are assigned subsequently according to the unique identifiers, so that different lamps can use the same light effect material, the multiplexing of the light effect materials is realized, the light editing efficiency can be improved, and the universality of the light effect materials can be improved.
Example two
This embodiment is a further development of the above-described embodiment.
The first embodiment realizes the universality of the light effect material of a single lamp, and the second embodiment further realizes the universality of the light group effect material. Specifically, more than two lighting effect materials are selected and combined to generate a lighting group effect material. The same light effect materials can be selected for combination, and different light effect materials can also be selected for combination. Preferably, each light group effect material may be assigned a unique light group effect number.
When the lamp group effect materials need to be called, specifically, a lamp group is created first, and the number of lamps in the lamp group is consistent with the number of the lamp effect materials in the lamp group effect materials; i.e. the number of lamps in the group that call the group effect material is the same as the number of light effect material. In this embodiment, the lamps in the same lamp group may be the same type of lamp, or different types of lamps, as long as the lamp channel that contains the channel attribute corresponding to the light effect material. Then, sequentially obtaining a lamp from the lamp group, and simultaneously sequentially obtaining a light effect material from the lamp group effect material; and acquiring a channel attribute lamp channel corresponding to the unique identifier in the light effect material in the light, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material. That is to say, each lamp in the lamp group calls one of the lamp group effect materials in sequence, thereby realizing the call of the whole lamp group effect material.
This embodiment is through realizing the general of banks effect material for light programming personnel can realize the banks effect rapidly through making up the banks effect material, has further improved the work efficiency of light editing.
EXAMPLE III
This embodiment is a further development of the above-described embodiment. The embodiment realizes the universality of the scene effect materials.
Firstly, more than two lamp group effect materials are selected and combined to generate a scene effect material. The same lamp group effect materials can be selected for combination, and different lamp group effect materials can also be selected for combination. Preferably, a unique scene effect number is assigned to the scene effect material.
When the scene effect materials need to be called, specifically, a scene is created first, the number of lamp groups in the scene is consistent with the number of the lamp group effect materials in the scene effect materials, the number of the lamps in the lamp groups is in one-to-one correspondence with the number of the light effect materials in the lamp group effect materials, namely, each lamp group in the scene is in one-to-one correspondence with one lamp group effect material in the scene effect materials according to the number of the lamps and the number of the light effect materials.
Then, sequentially acquiring a lamp group from the scene, and simultaneously acquiring a lamp group effect material corresponding to the lamp group from the scene effect material; sequentially acquiring a lamp from the lamp group, and simultaneously sequentially acquiring a light effect material from the corresponding lamp group effect material; and acquiring a channel attribute lamp channel corresponding to the unique identifier in the light effect material in the light, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material. That is to say, each lamp group in the scene sequentially calls one lamp group effect material in the scene effect materials, and the method for calling the lamp group effect materials by the lamp group is the same as that in the second embodiment, so that the call of the whole scene effect material is realized.
This embodiment is through realizing the general of scene effect material for light programming personnel can realize the scene effect rapidly through the effect material of combination banks, has further improved the work efficiency of light editing.
Example four
This embodiment is a further development of the above-described embodiment. In this embodiment, the lamps in the same lamp group are the same type of lamp. Therefore, in this embodiment, the combination of two or more light group effect materials is a program effect material, and the combination of two or more program effect materials is a scene effect material. The program effect material in this embodiment may be considered a combination of a plurality of different types of lamp sets.
Specifically, more than two lamp group effect materials are selected and combined to generate a program effect material. The method of calling the program effect material is similar to the method of calling the scene effect material in the third embodiment. Preferably, the program effect material is assigned a unique program effect number.
More than two program effect materials are selected and combined to generate the scene effect materials. When the scene effect materials need to be called, a scene is created first, the number of program groups in the scene is consistent with the number of program effect materials in the scene effect materials, the number of lamp groups in the program groups is in one-to-one correspondence with the number of lamp group effect materials in the program effect materials, and the number of lamps in the lamp groups is consistent with the number of light effect materials in the lamp group effect materials corresponding to the lamp groups.
Then, a program group is sequentially obtained from a scene, and simultaneously, a program effect material corresponding to the program group is obtained from the scene effect material; sequentially acquiring a lamp group from the program group, and acquiring a lamp group effect material corresponding to the lamp group from the corresponding program effect material; sequentially acquiring a lamp from the lamp group, and simultaneously sequentially acquiring a light effect material from the corresponding lamp group effect material; and acquiring a channel attribute lamp channel corresponding to the unique identifier in the light effect material in the light, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material.
That is to say, each program group in the scene calls one program effect material in the scene effect materials in sequence, each lamp group in the program group calls one lamp group effect material in the corresponding program effect materials respectively, and each lamp in the lamp group calls one light effect material in the corresponding lamp group effect materials respectively, so that the calling of the whole scene effect materials is realized.
In the embodiment, the hierarchical design is called through multi-layer combination, and various lighting effect materials can be combined and managed, so that diversified stage lighting effects are realized.
EXAMPLE five
The present embodiment is a computer-readable storage medium corresponding to the above-mentioned embodiments, on which a computer program is stored, which when executed by a processor, performs the steps of:
presetting a corresponding unique identifier according to the channel attribute;
associating the unique identifier with a preset channel attribute value to generate a light effect material;
acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with a channel address of the lamp channel;
and setting the channel attribute value of the channel address corresponding to the unique identifier in the lighting effect material data in the lamp as the channel attribute value in the lighting effect material data.
Further, according to the channel attribute of the lamp channel, obtaining a unique identifier corresponding to the lamp channel, and associating the unique identifier with the channel address of the lamp channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with a channel address of the lamp channel;
and when the lamp calls a light effect material, setting the channel attribute value of the channel address corresponding to the unique identifier in the light effect material data in the lamp as the channel attribute value in the light effect material data.
Further, according to the channel attribute of the lamp channel, obtaining a unique identifier corresponding to the lamp channel, and associating the unique identifier with the channel address of the lamp channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
when a lamp calls a light effect material, acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel of the lamp, and associating the unique identifier with a channel address of the lamp channel;
and setting the channel attribute value of the channel address corresponding to the unique identifier in the light effect material data in the lamp as the channel attribute value in the light effect material data.
Further, according to the channel attribute of the lamp channel, obtaining a unique identifier corresponding to the lamp channel, and associating the unique identifier with the channel address of the lamp channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
when a lamp calls a light effect material, judging whether an association relation corresponding to the type of the lamp exists or not, wherein the association relation is the association relation between a unique identifier and a channel address;
if the unique identifier does not exist, acquiring the unique identifier corresponding to the lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with the channel address of the lamp channel to obtain an association relation corresponding to the type of the lamp;
and if the channel address exists, acquiring the channel address corresponding to the unique identifier in the lighting effect material data in the lamp according to the association relation, and setting the channel attribute value of the channel address as the channel attribute value in the lighting effect material data.
Further, the light effect comprises more than two light actions; the associating the unique identifier with a preset channel attribute value to generate the light effect material specifically comprises:
respectively presetting the sequence of each light action and the corresponding channel attribute and channel attribute value;
determining a unique identifier corresponding to each light action according to the channel attribute corresponding to each light action;
and respectively associating the sequence of each light action, the corresponding unique identifier and the corresponding channel attribute value to generate a light effect material.
Further, when a light effect material is called by a lamp, setting a channel attribute value of a channel address in the lamp corresponding to a unique identifier in the light effect material data to a channel attribute value in the light effect material data specifically includes:
when a lamp calls a lamplight effect material, sequentially acquiring a unique identifier and a channel attribute value in the lamplight effect material data according to the sequence in the lamplight effect material, and setting the channel attribute value of a channel address corresponding to the unique identifier in the lamp as the channel attribute value.
Further, still include:
selecting and combining more than two lighting effect materials to generate a lighting group effect material;
creating a lamp group, wherein the number of lamps in the lamp group is consistent with the number of light effect materials in the lamp group effect materials;
sequentially acquiring a lamp from the lamp group, and simultaneously sequentially acquiring a light effect material from the lamp group effect material;
and acquiring a lamp channel corresponding to the unique identifier in the light effect material in the lamp, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material.
Further, still include:
selecting and combining more than two lamp group effect materials to generate a scene effect material;
creating a scene, wherein the number of lamp groups in the scene is consistent with the number of lamp group effect materials in the scene effect materials, and the number of lamps in the lamp groups is in one-to-one correspondence with the number of lamp effect materials in the lamp group effect materials;
sequentially acquiring a lamp group from the scene, and simultaneously acquiring a lamp group effect material corresponding to the lamp group from the scene effect material;
sequentially acquiring a lamp from the lamp group, and simultaneously sequentially acquiring a light effect material from the corresponding lamp group effect material;
and acquiring a lamp channel corresponding to the unique identifier in the light effect material in the lamp, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material.
In summary, according to the light editing method and the computer-readable storage medium provided by the present invention, the lamp channels with the same attribute in various programmable lamps are extracted, the unique identifiers corresponding to the channel attributes are managed in a unified manner, the unique identifiers are associated with different channel attribute values to generate different light effect materials, and then the corresponding channel addresses are assigned according to the unique identifiers, so that different lamps can use the same light effect material, thereby realizing the multiplexing of the light effect materials. The invention can improve the efficiency of light editing and the universality of the light effect material by realizing the universality of the light effect material of the single lamp.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.
Claims (9)
1. A light editing method, comprising:
presetting a corresponding unique identifier according to the channel attribute;
associating the unique identifier with a preset channel attribute value to generate a light effect material;
acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with a channel address of the lamp channel;
setting a channel attribute value of a channel address corresponding to a unique identifier in lighting effect material data in the lamp as a channel attribute value in the lighting effect material data;
the channel attribute refers to a control object of a control channel of the light, and the channel attribute value refers to a value of the control object.
2. The light editing method according to claim 1, wherein the unique identifier corresponding to the light channel is obtained according to a channel attribute of the light channel, and the unique identifier is associated with a channel address of the light channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with a channel address of the lamp channel;
and when the lamp calls a light effect material, setting the channel attribute value of the channel address corresponding to the unique identifier in the light effect material data in the lamp as the channel attribute value in the light effect material data.
3. The light editing method according to claim 1, wherein the unique identifier corresponding to the light channel is obtained according to a channel attribute of the light channel, and the unique identifier is associated with a channel address of the light channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
when a lamp calls a light effect material, acquiring a unique identifier corresponding to a lamp channel according to the channel attribute of the lamp channel of the lamp, and associating the unique identifier with a channel address of the lamp channel;
and setting the channel attribute value of the channel address corresponding to the unique identifier in the light effect material data in the lamp as the channel attribute value in the light effect material data.
4. The light editing method according to claim 1, wherein the unique identifier corresponding to the light channel is obtained according to a channel attribute of the light channel, and the unique identifier is associated with a channel address of the light channel; setting a channel attribute value of a channel address in the lamp corresponding to the unique identifier in the lighting effect material data to a channel attribute value in the lighting effect material data specifically includes:
when a lamp calls a light effect material, judging whether an association relation corresponding to the type of the lamp exists or not, wherein the association relation is the association relation between a unique identifier and a channel address;
if the unique identifier does not exist, acquiring the unique identifier corresponding to the lamp channel according to the channel attribute of the lamp channel, and associating the unique identifier with the channel address of the lamp channel to obtain an association relation corresponding to the type of the lamp;
and if the channel address exists, acquiring the channel address corresponding to the unique identifier in the lighting effect material data in the lamp according to the association relation, and setting the channel attribute value of the channel address as the channel attribute value in the lighting effect material data.
5. A light editing method according to claim 1, characterized in that the light effect comprises more than two light actions; the associating the unique identifier with a preset channel attribute value to generate the light effect material specifically comprises:
respectively presetting the sequence of each light action and the corresponding channel attribute and channel attribute value;
determining a unique identifier corresponding to each light action according to the channel attribute corresponding to each light action;
and respectively associating the sequence of each light action, the corresponding unique identifier and the corresponding channel attribute value to generate a light effect material.
6. A light editing method according to claim 5, wherein when a light calls a light effect material, setting a channel attribute value of a channel address in the light corresponding to a unique identifier in the light effect material data to a channel attribute value in the light effect material data specifically includes:
when a lamp calls a lamplight effect material, sequentially acquiring a unique identifier and a channel attribute value in the lamplight effect material data according to the sequence in the lamplight effect material, and setting the channel attribute value of a channel address corresponding to the unique identifier in the lamp as the channel attribute value.
7. A light editing method according to claim 1, further comprising:
selecting and combining more than two lighting effect materials to generate a lighting group effect material;
creating a lamp group, wherein the number of lamps in the lamp group is consistent with the number of light effect materials in the lamp group effect materials;
sequentially acquiring a lamp from the lamp group, and simultaneously sequentially acquiring a light effect material from the lamp group effect material;
and acquiring a lamp channel corresponding to the unique identifier in the light effect material in the lamp, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material.
8. A light editing method according to claim 7, further comprising:
selecting and combining more than two lamp group effect materials to generate a scene effect material;
creating a scene, wherein the number of lamp groups in the scene is consistent with the number of lamp group effect materials in the scene effect materials, and the number of lamps in the lamp groups is in one-to-one correspondence with the number of lamp effect materials in the lamp group effect materials;
sequentially acquiring a lamp group from the scene, and simultaneously acquiring a lamp group effect material corresponding to the lamp group from the scene effect material;
sequentially acquiring a lamp from the lamp group, and simultaneously sequentially acquiring a light effect material from the corresponding lamp group effect material;
and acquiring a lamp channel corresponding to the unique identifier in the light effect material in the lamp, and setting a channel attribute value of a channel address of the lamp channel as the channel attribute value in the light effect material.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810876956.6A CN109246902B (en) | 2018-08-03 | 2018-08-03 | Light editing method and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810876956.6A CN109246902B (en) | 2018-08-03 | 2018-08-03 | Light editing method and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109246902A CN109246902A (en) | 2019-01-18 |
CN109246902B true CN109246902B (en) | 2020-01-21 |
Family
ID=65070363
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810876956.6A Active CN109246902B (en) | 2018-08-03 | 2018-08-03 | Light editing method and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109246902B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101489337A (en) * | 2008-12-19 | 2009-07-22 | 上海广茂达灯光景观工程有限公司 | Editing method for LED lamp light landscape scene |
CN101873752A (en) * | 2009-04-21 | 2010-10-27 | 先进国际有限公司 | Intelligent lamplight control method and system |
US8299719B1 (en) * | 2009-03-06 | 2012-10-30 | Masoud Moshirnoroozi | Individually selective intelligent lighting system |
CN103024975A (en) * | 2011-09-27 | 2013-04-03 | 北京同步科技有限公司 | Light control device, light control method and illuminating device |
US20130099701A1 (en) * | 2011-10-24 | 2013-04-25 | Advanced Analogic Technologies, Inc. | Low Cost LED Driver With Improved Serial Bus |
-
2018
- 2018-08-03 CN CN201810876956.6A patent/CN109246902B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101489337A (en) * | 2008-12-19 | 2009-07-22 | 上海广茂达灯光景观工程有限公司 | Editing method for LED lamp light landscape scene |
US8299719B1 (en) * | 2009-03-06 | 2012-10-30 | Masoud Moshirnoroozi | Individually selective intelligent lighting system |
CN101873752A (en) * | 2009-04-21 | 2010-10-27 | 先进国际有限公司 | Intelligent lamplight control method and system |
CN103024975A (en) * | 2011-09-27 | 2013-04-03 | 北京同步科技有限公司 | Light control device, light control method and illuminating device |
US20130099701A1 (en) * | 2011-10-24 | 2013-04-25 | Advanced Analogic Technologies, Inc. | Low Cost LED Driver With Improved Serial Bus |
Also Published As
Publication number | Publication date |
---|---|
CN109246902A (en) | 2019-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105487864A (en) | Method and device for automatically generating code | |
JP2011515819A (en) | Apparatus and method for combining light emitters | |
CN110136654B (en) | Dimming backlight partition dimming control method, intelligent terminal and storage medium | |
CN103123660B (en) | A kind of method to software and hardware system CAD mathematics library | |
CN106202490A (en) | A kind of SolrCloud configuration file amending method, Apparatus and system | |
US20200170090A1 (en) | Method for Lamp Position Mapping | |
CN107391622B (en) | Data access method and equipment | |
CN105138326A (en) | Method and system for achieving structured query language (sql) dynamic configuration based on ibatis | |
CN104486389A (en) | Communication channel establishing method and system between window management services and APP (Application) | |
CN112291386A (en) | Bluetooth address allocation method of intelligent lamp, computer device and computer readable storage medium | |
CN109246902B (en) | Light editing method and computer readable storage medium | |
CN107734746A (en) | A kind of control system of LED lamp | |
CN111191161B (en) | Page display method, storage medium, electronic device and system | |
CN105303465A (en) | Tree-shaped view defining and displaying method based on CIM model | |
KR20100079619A (en) | Method and apparatus for automatically arranging images | |
CN110659085A (en) | Method and device for overloading limited number of functions in Linux kernel module | |
CN104731329B (en) | A kind of method and apparatus of user handwriting color treatments | |
JP2020057593A (en) | Lighting control system, and lighting control program | |
CN102270135A (en) | Television and method for realizing user interface (UI) framework thereof | |
CN105045709A (en) | Capability-based test equipment exchange method | |
CN105700842A (en) | Method and system batch-controlling display parameter through network | |
CN113766699A (en) | Lamp control system and control method thereof | |
CN104166737A (en) | Database name modifying method and device | |
CN110633459A (en) | Method and system for automatically generating data report and computer readable storage medium | |
CN111930375A (en) | Data visualization application development method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |