CN113902868A - Large-scale ocean scene creation method and device based on Wang Cubes - Google Patents

Large-scale ocean scene creation method and device based on Wang Cubes Download PDF

Info

Publication number
CN113902868A
CN113902868A CN202111370156.5A CN202111370156A CN113902868A CN 113902868 A CN113902868 A CN 113902868A CN 202111370156 A CN202111370156 A CN 202111370156A CN 113902868 A CN113902868 A CN 113902868A
Authority
CN
China
Prior art keywords
marine
octahedral
cubes
cube
entity
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.)
Granted
Application number
CN202111370156.5A
Other languages
Chinese (zh)
Other versions
CN113902868B (en
Inventor
王欣捷
朱思源
王玉成
王明
魏志强
金小刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ocean University of China
Original Assignee
Ocean University of China
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ocean University of China filed Critical Ocean University of China
Priority to CN202111370156.5A priority Critical patent/CN113902868B/en
Publication of CN113902868A publication Critical patent/CN113902868A/en
Application granted granted Critical
Publication of CN113902868B publication Critical patent/CN113902868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/603D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Remote Sensing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a large-scale ocean scene creation method and device based on Wang Cubes, wherein the method comprises the following steps: extracting marine entity information from the real picture, storing the marine entity information in a recording table, and making into an octahedral block; synthesizing the octahedron blocks into Marine Cubes; based on the Wang cube algorithm, utilizing Marine Cubes to rapidly tile the three-dimensional ocean scene to generate an aperiodic tiling result; randomizing the species and orientation of the entity; and adjusting the density of the population by using a density control point set-based method. The method can generate ocean scenes of various scales, can generate scenes with hundreds of thousands of individuals in only a few seconds, has diversity of individual behaviors such as arrangement, aggregation, hiding, escape and other behaviors, and has no obvious periodical repetition.

Description

Large-scale ocean scene creation method and device based on Wang Cubes
Technical Field
The invention belongs to the technical field of graphics, relates to a virtual scene creation technology, and particularly relates to a large-scale ocean scene creation method and device based on Wang Cubes.
Background
In the field of computer animation, natural environment simulation has gained wide attention. Ocean scenes are usually found in natural environments, and the creation and generation of ocean scenes are valuable in the fields of three-dimensional visualization of ocean data, movie making, scientific education and the like. In order to create a realistic, immersive virtual marine environment, it is necessary to fill the environment with marine entities, such as fish, sea grass and rocks on the sea floor, while ensuring that the distribution of these entities is as close as possible to the real environment. However, the study of marine scenes has mainly been around the field of physical simulation, such as sea surface shadows, wave motion, refraction and halos. There is also a lack of adequate research for large-scale marine entity filling methods. In practical applications, it is desirable that a user can quickly create a diversified marine scene with naturally distributed marine entities by simply adjusting several parameters.
The aim of the invention is to provide an interactive authoring tool which can rapidly generate a scene with large-scale marine entities according to marine entity samples and virtual models provided by users. This scenario should have the following design goals:
(1) diversity of behaviors. The behavior of organisms (e.g. fish stocks) should be diverse, such as arranged, aggregated, hidden and escaped. And these behaviors should not have a significant periodic pattern.
(2) Species (subject) diversity. The scene should contain various populations of organisms and they should have population interactions. In addition, the scene should contain non-biological marine entities, such as coral reefs and plants, to make the marine scene more vivid.
(3) Speed. The scene generation time should be short enough to facilitate the user to quickly create and edit scenes.
We can use population (crowd) simulation techniques to accomplish this task. Various models have been used to generate large-scale populations, largely classified into two categories: continuous models and discrete models. However, these population simulation models are generally not able to satisfy the above three objectives simultaneously, and therefore do not satisfy our expectations for the creation of marine scenes. Specifically, the continuous model is a macroscopic simulation, and population behaviors are taken as research objects. These models typically use field potentials or fluid dynamics to control the behavior of a population. However, continuous models typically focus on overall behavior only, ignoring the diversity of individual species. Furthermore, continuous models are typically designed to guide a population for path planning. In the task, the ocean scene comprises various independent groups and has no specific path, so that the existing continuous model is not suitable for generating the ocean scene. The discrete model is a simulation at a microscopic level and takes an individual as a research object. Each individual is treated as an independent agent that is influenced by surrounding agents and environmental activity, resulting in interaction between the agents, revealing the behavior of the group. However, existing large-scale population-generated discrete models tend to cause populations to exhibit the same behavior, or to have the same motion path between populations, i.e., a periodic pattern. It is also not suitable for the generation of marine scenes.
It is challenging to address the above design goals. Firstly, the diversified group behaviors and the group species in an aperiodic mode are not enough only by a plurality of predefined rules or random algorithms, and a reasonable synthesis method is needed; secondly, the number of ocean groups is huge, the variety is various, and if the calculation is carried out for each individual in the 3D space, the calculation amount is huge, and the requirement of quick editing cannot be met.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a large-scale ocean scene creation method and device based on Wang Cubes, and solves the technical problem of how to quickly create diversified ocean scenes with naturally distributed ocean entities by simply adjusting a plurality of parameters.
In order to solve the technical problems, the invention adopts the technical scheme that:
firstly, the invention provides a large-scale ocean scene creation method based on Wang Cubes, which comprises the following steps:
step 1, extracting marine entity information from a real picture, storing the marine entity information in a recording table, and making into an octahedral block;
step 2, synthesizing the octahedral blocks into Marine Cubes;
3, rapidly tiling the three-dimensional ocean scene by using Marine Cubes based on the Wang Cubes algorithm to generate an aperiodic tiling result;
step 4, randomizing species and orientation of the entity;
and 5, adjusting the density of the population by using a method based on the density control point set.
Further, in the step 1, marine entity information is extracted from the real picture, stored in a recording table, and made into an octahedral block, which specifically comprises the following steps:
step 101, establishing a data set of a marine real image required by creating a three-dimensional marine scene;
102, extracting the distribution of marine entities from the real image as a sample, and setting a corresponding entity information table for each marine entity, wherein the entity information table comprises coordinates, size, species type, population number, survival depth and survival probability; in the extraction process, the behavior and distribution of the entities in each fish school should be matched with the real images;
step 103, filling the samples into a plurality of octahedral blocks, and creating an entity information table and a color number for each octahedral block;
step 104, establishing an octahedral block set: dividing the non-seabed octahedral blocks into three directions, wherein the upper octahedral block, the lower octahedral block, the front octahedral block, the rear octahedral block, the left octahedral block and the right octahedral block respectively form an octahedral block set which is named as UBlocks, FBlocks and Llocks; dividing the octahedral block into three directions, and respectively naming the octahedral block as UBlocks, GFblocks and GLblocks; these octahedral blocks will be used in step 2 to synthesize Marine Cubes.
Further, the concrete steps of synthesizing the octahedral blocks into Marine Cubes in the step 2 are as follows:
step 201, selecting a proper octahedral block, and defining six directions for each Marine Cube: the upper, lower, front, back, left and right are provided with two types of Marine Cube sets: the synthesis of the seabed Marine Cube set is characterized in that the upper direction of the non-seabed Marine Cube set and the seabed Marine Cube (namely coral reefs and plants) set uses octahedral blocks in UBlocks, and the lower direction is set to be empty; the octahedral blocks in the front, back, left and right directions are respectively selected from GFblocks and GLblocks; for the non-seabed Marine Cube set, octahedral blocks in the upper, lower, front, back, left and right directions are respectively selected from UBlocks, FBlocks and LBlocks;
202, synthesizing the selected octahedral blocks by using a Wang Cube synthesis method, wherein each six octahedral blocks can synthesize a Marine Cube;
step 203, creating an entity information table for each Marine Cube according to the entity information table and the color number of the octahedral block, and allocating the color number to each surface.
Further, in step 203, when determining the color number of the Marine Cube, each direction of the Marine Cube inherits the color number of the corresponding octahedral block, and each Marine Cube has a number calculated by the color number, which is expressed as Numcube
All color numbers in the octahedral block sets at each position are arranged using the full permutation method, and assuming that each octahedral block set contains N octahedral blocks, after the full arrangement, there are N octahedral blocks in the non-seafloor Marine Cube set6The Marine Cubes have N in the aggregate5The Marine Cubes adopt an N system to store all the conditions; defining the color sequence of the non-seafloor Marine Cube set as (r, l, b, f, d, u), defining the seafloor Marine Cube set as (r, l, b, f, u), and storing the color sequence in N-ary, which corresponds to decimal NumcubeColor sequence and NumcubeThe conversion formula between is:
Figure BDA0003362162710000031
the letters u, d, f, b, l, r represent the color numbers of octahedral blocks selected in the up, down, front, back, left, and right directions, respectively.
Further, step 3, in the paving process, the Marine cuts are paved from bottom to top, from left to right and from back to front, and the adjacent surfaces of the adjacent Marine cuts are combined together if the colors are the same;
for each Marine Cube, calculating Marine Cubes with the same colors as the positions of the bottom, the front and the left of the Marine Cube in advance, and defining the Marine Cubes as preset Marine Cubes; during splicing, only the preset Marine Cubes are matched; if the pre-ordered Marine Cube already exists, the color of the corresponding position of the Marine Cube is obtained; the positions of the upper, rear and right are randomly selected from the color set.
Further, when the density of the population is adjusted by using the method based on the density control point set in step 5, it is determined whether each entity remains in the scene, and it needs to be determined by using a density adjustment probability formula, which is expressed as follows:
P(i)=ωd*fd(i)+ωu*fu(i)+ωs*si
wherein s isiSurvival probability, f, recorded in the information table for entity idAs a function of depth probability, fuFor the user probability function, P (i) is represented by fd(i)、fu(i) And siCo-determination of ωd、ωuAnd ωsAre their respective weights, the sum of all ω is 1;
depth probability function fd(i) Is defined as:
fd(i)=K0*|di-d|
wherein d isiIs the current depth of entity i in the scene, d is the survival depth in the entity information table, K0Is an attenuation factor;
user probability function fu(i) Is defined as:
fu(i)=K1*Min(|Vi-Vj|),j∈U
where U is a user-provided set of density control points, ViRepresentation entityThree-dimensional coordinates, V, of the body ijIs the three-dimensional coordinate of a certain point j in U. Min (| V)i-VjI) represents the minimum distance value of entity i to U, K1Is an attenuation factor;
finally, each entity i is assigned a random number xi from 0 to 1, and when xi > p (i), the entity i is discarded, otherwise, the entity i remains in the scene.
The invention also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the Wang Cubes-based large-scale ocean scene authoring method as described above.
Compared with the prior art, the invention has the advantages that:
1. the method comprises the steps of extracting Marine entity information from a real picture, storing the Marine entity information in a recording table, making into an octahedral block, extracting real distribution, synthesizing Marine Cubes by using the octahedral block, quickly tiling a three-dimensional Marine scene by using the Marine Cubes based on a Wang Cubes algorithm, generating an aperiodic tiling result, and randomizing the species and orientation of an entity; the density of the population is adjusted using a point set based approach to decide whether each entity remains in the scene.
2. The invention can quickly generate ocean scenes of various scales, can generate scenes with hundreds of thousands of individuals in only a few seconds, has diversity of individual behaviors, such as arrangement, aggregation, hiding, escape and other behaviors, and has no obvious periodical repetition.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a large-scale ocean scene creation method in embodiment 1 of the present invention;
FIG. 2 is a flow chart of a method of making an octahedral block in example 1 of the present invention;
FIG. 3 is a flow chart of a method for synthesizing Marine Cubes from octahedral blocks in example 1 of the present invention;
FIG. 4 is a drawing example 1 of a sample taken from a real photograph in example 1 of the present invention;
FIG. 5 is a drawing example 2 of a sample taken from a real photograph in example 1 of the present invention;
FIG. 6 is a schematic representation of an octahedral block selected from UBlocks in example 1 of the present invention;
FIG. 7 is a schematic representation of an octahedral block selected from GLBlocks in example 1 of the present invention.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference herein to "a plurality" means greater than or equal to two. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Example 1
In order to rapidly create a large-scale three-dimensional ocean scene, ocean entity information is extracted from a real picture, stored in a recording table and made into an octahedral block; synthesizing the octahedron blocks into Marine Cubes, and quickly tiling the three-dimensional ocean scene by using the Marine Cubes based on the Wang Cubes algorithm to generate an aperiodic tiling result; then, randomizing the species and orientation of the entity, finally, adjusting the population density by using a point set-based method, and outputting the created large-scale marine population scene.
The specific implementation method is a flowchart of a large-scale ocean scene creation method based on Wang Cubes as shown in FIG. 1, and the method comprises the following steps:
step 1, extracting marine entity information from a real picture, storing the marine entity information in a recording table, and making into an octahedral block;
step 2, synthesizing the octahedron blocks into Marine Cubes (the Marine Cubes are Cubes synthesized by octahedrons in the Wang Cubes algorithm; the Marine Cubes are used for specifying cube samples for ocean scene creation in the patent);
3, rapidly tiling the three-dimensional ocean scene by using Marine Cubes based on the Wang Cubes algorithm to generate an aperiodic tiling result;
step 4, randomizing species and orientation of the entity;
and 5, adjusting the density of the population by using a method based on the density control point set.
In the embodiment, in the step 1, marine entity information is extracted from a real picture, stored in a recording table and made into an octahedral block; as shown in fig. 2, the method specifically includes the following steps:
step 101, establishing a data set of a marine real image required by creating a three-dimensional marine scene;
step 102, extracting the distribution of the marine entities from the real image as a sample, and setting a corresponding entity information table for each marine entity, wherein the entity information table comprises coordinates, size, species type, population number, survival depth and survival probability. During the extraction process, the behavior and distribution of entities in each fish shoal should be matched to the real image.
Fig. 4 and 5 are two examples of extraction, the upper two images are real photos of Pennant coralfish and Raccoon butterflyblow respectively, and the lower two images are extracted distribution information.
These samples are filled into octahedral blocks, and an entity information table and a color number are created for each octahedral block, step 103. To avoid filling out the boundary, it is necessary to perform intersection tests on marine entities in the octahedral mass to ensure that the marine entities are all within the octahedral mass. Suppose the center coordinate of the marine entity i is ViThe number of each face of the octahedral block is j, j ∈ [0,7 ]]And the vertex set of each surface is VertexSetjEach ofNormal vector of face is NjThen the test formula is described as follows:
Figure BDA0003362162710000071
in addition, it should be noted that the octahedral blocks may also be generated empirically; that is, the user provides the characteristics of the designated marine fish to create the corresponding octahedral mass.
And step 104, establishing an octahedral block set. Because the subsequent synthesis steps require that the octahedral blocks cannot be inverted, the non-seabed octahedral blocks are divided into three directions, wherein the upper octahedral block, the lower octahedral block, the front octahedral block, the rear octahedral block, the left octahedral block and the right octahedral block respectively form an octahedral set which is named as UBlocks, FBlocks and LBlocks. The octahedral blocks are also divided into three directions, named UBlocks (to represent fish shoal near the seafloor), GFblocks, GLblocks. These octahedral blocks will be used in step 2 to synthesize Marine Cubes.
Two octahedral blocks selected from UBlocks and GLblocks, respectively, are shown in FIGS. 6 and 7, FIG. 6 being a block with a fish school, FIG. 7 being a block with both fish school and aquatic plants.
In this embodiment, synthesizing octahedral blocks into Marine Cubes in step 2 specifically includes the following steps:
step 201, selecting a proper octahedral block. Six directions are defined for each Marine Cube: up, down, front, back, left, right. There are two types of Marine Cube sets: non-subsea Marine Cube (i.e., fish) collections and subsea Marine Cube (i.e., coral reefs and plants) collections. For the synthesis of Marine Cube sets, the top direction uses octahedral blocks in UBlocks and the bottom direction is set to empty because it is not filled. Octahedral blocks in the front, back, left and right directions are selected from GFblocks and GLblocks, respectively. For the non-seafloor Marine Cube set, octahedral blocks in the up, down, front, back, left, and right directions are selected from UBlocks, FBlocks, and LBlocks, respectively.
Step 202, synthesizing the selected octahedral blocks by using the Wang Cube synthesis method, wherein every six octahedral blocks can synthesize a Marine Cube.
And step 203, creating an entity information table for each Marine Cube, and allocating a color number to each surface.
Because the present invention assigns each octahedral block a color number (assigned in step 103), each orientation of Marine Cube can inherit the color number of the corresponding octahedral block. The letters u, d, f, b, l, r are used in the present invention to indicate the color numbers selected in the directions of up, down, front, back, left, and right. Each Marine Cube has a number (denoted as Num) calculated from the color numbercube). The invention creates an entity information table for each Marine Cube according to the entity information table of the octahedral block, and particularly pays attention to updating coordinates in the information table.
To ensure that a matching Marine Cube can be found in each case, the present invention arranges all color numbers in the octahedral block set at each position by full permutation. Assuming that each octahedral mass set contains N octahedral masses, then after complete alignment, there are N in the non-seafloor Marine Cube set6The Marine Cubes have N in the aggregate5The Marine Cubes can adopt an N system to store all the conditions. The color sequence of the non-seafloor Marine Cube set is defined as (r, l, b, f, d, u), and the seafloor Marine Cube set is defined as (r, l, b, f, u). Storing a sequence of colors in N, which corresponds to Num in decimal systemcube. Color sequence and NumcubeThe conversion formula between is:
Figure BDA0003362162710000081
in this embodiment, in step 3, the Marine Cubes are used to tile the three-dimensional ocean scene quickly based on the Wang Cubes algorithm, so as to generate an aperiodic tiling result, which is specifically described as follows:
step 301, inspired by the Wang Cubes algorithm, in the paving process, the Marine Cubes are paved from bottom to top, from left to right and from back to front. The adjacent surfaces of adjacent Marine Cubes, if of the same color, can be combined together. For each Marine Cube, those Marine Cubes with the same color as the positions of the bottom, front and left sides thereof are calculated in advance and defined as preset Marine Cubes. And only matching preset Marine Cubes during splicing. If the pre-ordered Marine Cube already exists, the color of the corresponding position is obtained. The positions of top, back and right are randomly chosen from the color set because the following Marine Cubes have not been laid down.
The specific selection strategy is as follows. In the laying process, each Marine Cube index in a scene is set to be (i, j, k), wherein i is the left-right direction, j is the up-down direction, and k is the front-back direction. We also use the letters u, d, f, b, l, r to denote the color numbers selected in the directions up, down, front, back, left, and right. When j is 0, the Marine Cube set is selected, and the corresponding Marine Cube color sequence is (r, l, b, f, d, u). When $ h <0, in the non-seafloor Marine Cube set selection, the corresponding Marine Cube color sequence is (r, l, b, f, u). The color sequence calculation formula is:
Random,dir∈u,f,r
Figure BDA0003362162710000091
Figure BDA0003362162710000092
Figure BDA0003362162710000093
in this example, the species and orientation of the entities are randomized in step 4, which is described in detail below:
step 401, in the scene laying process, a large number of Marine Cubes are used. However, due to the limited number of octahedral volume sets, the distribution and orientation of entities and entity clusters may be repeated in the scene. To address this problem, the present invention randomly assigns a species type to each entity and assigns a random direction to each group of entities. When making octahedral blocks, each entity is assigned a cluster number. However, in the process of synthesizing Marine Cubes, the same octahedral block is used many times, and the group number is not unique. Therefore, the unique index for each Marine Cube needs to be used to update the group number for each entity. Random species and random directions are then assigned according to the group number and species type of each entity. The species used for random assignment were obtained from a pool of marine entities.
In this embodiment, when the density of the population is adjusted by using the density control point set-based method in step 5, it is determined whether each entity remains in the scene, and it needs to be determined by using a density adjustment probability formula. The formula is expressed as follows:
P(i)=ωd*fd(i)+ωu*fu(i)+ωs*si
wherein s isiSurvival probability, f, recorded in the information table for entity idAs a function of depth probability, fuAs a function of the user probability. P (i) is prepared fromd(i)、fu(i) And siCo-determination of ωd、ωuAnd ωsAre their respective weights, and the sum of all ω is 1.
Depth probability function fd(i) Is defined as:
fd(i)=K0*|di-d|
wherein d isiIs the current depth of entity i in the scene, d is the survival depth in the entity information table, K0Is the attenuation factor.
User probability function fu(i) Is defined as:
fu(i)=K1*Min(|Vi-Vj|),j∈U
where U is a user-provided set of density control points, ViThree-dimensional coordinates, V, representing entity ijIs the three-dimensional coordinate of a certain point j in U. Min (| V)i-VjI) represents the minimum distance value of entity i to U, K1Is the attenuation factor.
Finally, each entity i is assigned a random number xi from 0 to 1, and when xi > p (i), the entity i is discarded, otherwise, the entity i remains in the scene.
Example 2
The present invention further provides an electronic apparatus, including a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to perform the method for creating a large-scale three-dimensional ocean scene based on Wang Cubes as described in embodiment 1, which is not described herein again.
It should be understood by those skilled in the art that various features of the above-described embodiments can be combined in any combination, and for the sake of brevity, all possible combinations of features in the above-described embodiments are not described in detail, but rather, all combinations of features which are not inconsistent with each other should be construed as being within the scope of the present disclosure.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (7)

1. A large-scale ocean scene creation method based on Wang Cubes is characterized by comprising the following steps:
step 1, extracting marine entity information from a real picture, storing the marine entity information in a recording table, and making into an octahedral block;
step 2, synthesizing the octahedral blocks into Marine Cubes;
3, rapidly tiling the three-dimensional ocean scene by using Marine Cubes based on the Wang Cubes algorithm to generate an aperiodic tiling result;
step 4, randomizing species and orientation of the entity;
and 5, adjusting the density of the population by using a method based on the density control point set.
2. The large-scale ocean scene creating method based on Wang Cubes as claimed in claim 1, wherein the step 1 of extracting the ocean entity information from the real picture, storing the ocean entity information in the recording table and making the ocean entity information into the octahedral block specifically comprises the following steps:
step 101, establishing a data set of a marine real image required by creating a three-dimensional marine scene;
102, extracting the distribution of marine entities from the real image as a sample, and setting a corresponding entity information table for each marine entity, wherein the entity information table comprises coordinates, size, species type, population number, survival depth and survival probability; in the extraction process, the behavior and distribution of the entities in each fish school should be matched with the real images;
step 103, filling the samples into a plurality of octahedral blocks, and creating an entity information table and a color number for each octahedral block;
step 104, establishing an octahedral block set: dividing the non-seabed octahedral blocks into three directions, wherein the upper octahedral block, the lower octahedral block, the front octahedral block, the rear octahedral block, the left octahedral block and the right octahedral block respectively form an octahedral block set which is named as UBlocks, FBlocks and Llocks; dividing the octahedral block into three directions, and respectively naming the octahedral block as UBlocks, GFblocks and GLblocks; these octahedral blocks will be used in step 2 to synthesize Marine Cubes.
3. The large-scale ocean scene creation method based on Wang Cubes as claimed in claim 2, wherein the concrete steps of synthesizing octahedral blocks into Marine Cubes in step 2 are as follows:
step 201, selecting a proper octahedral block, and defining six directions for each Marine Cube: the upper, lower, front, back, left and right are provided with two types of Marine Cube sets: the method comprises the steps that a non-submarine Marine Cube set and a submarine Marine Cube set are adopted, for the synthesis of the submarine Marine Cube set, an octahedral block in UBlocks is used in the upper direction, and the lower direction is set to be empty; the octahedral blocks in the front, back, left and right directions are respectively selected from GFblocks and GLblocks; for the non-seabed Marine Cube set, octahedral blocks in the upper, lower, front, back, left and right directions are respectively selected from UBlocks, FBlocks and LBlocks;
202, synthesizing the selected octahedral blocks by using a Wang Cube synthesis method, wherein each six octahedral blocks can synthesize a Marine Cube;
step 203, creating an entity information table for each Marine Cube according to the entity information table and the color number of the octahedral block, and allocating the color number to each surface.
4. The method as claimed in claim 3, wherein in step 203, when determining the color number of the Marine Cube, each direction of the Marine Cube inherits the color number of the corresponding octahedral block, and each Marine Cube has a number calculated from the color number, which is denoted as Numcube
All color numbers in the octahedral block sets at each position are arranged using the full permutation method, and assuming that each octahedral block set contains N octahedral blocks, after the full arrangement, there are N octahedral blocks in the non-seafloor Marine Cube set6The Marine Cubes have N in the aggregate5The Marine Cubes adopt an N system to store all the conditions; defining the color sequence of the non-seafloor Marine Cube set as (r, l, b, f, d, u), defining the seafloor Marine Cube set as (r, l, b, f, u), and storing the color sequence in N-ary, which corresponds to decimal NumcubeColor sequence and NumcubeThe conversion formula between is:
Figure FDA0003362162700000021
the letters u, d, f, b, l, r represent the color numbers of octahedral blocks selected in the up, down, front, back, left, and right directions, respectively.
5. The large-scale ocean scene creating method based on Wang Cubes according to claim 1, wherein in the laying process, Marine Cubes are laid from bottom to top, from left to right and from back to front, and adjacent surfaces of adjacent Marine Cubes are combined together if the colors are the same;
for each Marine Cube, calculating Marine Cubes with the same colors as the positions of the bottom, the front and the left of the Marine Cube in advance, and defining the Marine Cubes as preset Marine Cubes; during splicing, only the preset Marine Cubes are matched; if the pre-ordered Marine Cube already exists, the color of the corresponding position of the Marine Cube is obtained; the positions of the upper, rear and right are randomly selected from the color set.
6. The method as claimed in claim 1, wherein when the density of the population is adjusted by the density control point set-based method in step 5, it is determined whether each entity remains in the scene, and it needs to be determined by a density adjustment probability formula, which is expressed as follows:
P(i)=ωd*fd(i)+ωu*fu(i)+ωs*si
wherein s isiSurvival probability, f, recorded in the information table for entity idAs a function of depth probability, fuFor the user probability function, P (i) is represented by fd(i)、fu(i) And siCo-determination of ωd、ωuAnd ωsAre their respective weights, the sum of all ω is 1;
depth probability function fd(i) Is defined as:
fd(i)=K0*|di-d|
wherein d isiIs the current depth of entity i in the scene, d is the survival depth in the entity information table, K0Is an attenuation factor;
user probability function fu(i) Is defined as:
fu(i)=K1*Min(|Vi-Vj|),j∈U
wherein U is user-providedSet of density control points, ViThree-dimensional coordinates, V, representing entity ijIs the three-dimensional coordinate of a certain point j in U. Min (| V)i-VjI) represents the minimum distance value of entity i to U, K1Is an attenuation factor;
finally, each entity i is assigned a random number xi from 0 to 1, and when xi > P (i), the entity i is discarded, otherwise, the entity i remains in the scene.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the Wang Cubes-based large-scale ocean scene authoring method of any one of claims 1-6.
CN202111370156.5A 2021-11-18 2021-11-18 Wang Cubes-based large-scale ocean scene creation method and Wang Cubes-based large-scale ocean scene creation device Active CN113902868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111370156.5A CN113902868B (en) 2021-11-18 2021-11-18 Wang Cubes-based large-scale ocean scene creation method and Wang Cubes-based large-scale ocean scene creation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111370156.5A CN113902868B (en) 2021-11-18 2021-11-18 Wang Cubes-based large-scale ocean scene creation method and Wang Cubes-based large-scale ocean scene creation device

Publications (2)

Publication Number Publication Date
CN113902868A true CN113902868A (en) 2022-01-07
CN113902868B CN113902868B (en) 2024-04-26

Family

ID=79194560

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111370156.5A Active CN113902868B (en) 2021-11-18 2021-11-18 Wang Cubes-based large-scale ocean scene creation method and Wang Cubes-based large-scale ocean scene creation device

Country Status (1)

Country Link
CN (1) CN113902868B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070296721A1 (en) * 2004-11-08 2007-12-27 Electronics And Telecommunications Research Institute Apparatus and Method for Producting Multi-View Contents
KR20120121163A (en) * 2011-04-26 2012-11-05 (주)비엔티솔루션 System For Providing Real Time Ocean Spatial Data Using Web 3D And The Method Thereof
CN102800116A (en) * 2012-06-18 2012-11-28 浙江大学 Method for rapidly creating large-scale virtual crowd
CN102855662A (en) * 2012-07-25 2013-01-02 中国科学院对地观测与数字地球科学中心 Ocean environment visualization method
CN108090939A (en) * 2017-11-23 2018-05-29 北京中科创视文化传播有限公司 The benthon trunked analog method rendered based on cluster synergetic and GPU optimizations
CN112215959A (en) * 2020-10-19 2021-01-12 华能阜新风力发电有限责任公司 Three-dimensional model mapping system using picture cutting

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070296721A1 (en) * 2004-11-08 2007-12-27 Electronics And Telecommunications Research Institute Apparatus and Method for Producting Multi-View Contents
KR20120121163A (en) * 2011-04-26 2012-11-05 (주)비엔티솔루션 System For Providing Real Time Ocean Spatial Data Using Web 3D And The Method Thereof
CN102800116A (en) * 2012-06-18 2012-11-28 浙江大学 Method for rapidly creating large-scale virtual crowd
CN102855662A (en) * 2012-07-25 2013-01-02 中国科学院对地观测与数字地球科学中心 Ocean environment visualization method
CN108090939A (en) * 2017-11-23 2018-05-29 北京中科创视文化传播有限公司 The benthon trunked analog method rendered based on cluster synergetic and GPU optimizations
CN112215959A (en) * 2020-10-19 2021-01-12 华能阜新风力发电有限责任公司 Three-dimensional model mapping system using picture cutting

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高锡章;冯杭建;李伟;: "基于GIS的海洋观测数据三维可视化仿真研究", 系统仿真学报, no. 06, 8 June 2011 (2011-06-08) *

Also Published As

Publication number Publication date
CN113902868B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
Hnaidi et al. Feature based terrain generation using diffusion equation
WO2002009037A2 (en) Modeling human beings by symbol manipulation
CN114174895A (en) System and method for augmented reality
US20230025285A1 (en) Method for Generating Simulations of Fluid Interfaces for Improved Animation of Fluid Interactions
CN109685095A (en) Classified according to 3D type of arrangement to 2D image
Shardakov et al. Development of an adaptive module for visualization of the surrounding space for cloud educational environment
Ibrahim Genshade: an evolutionary approach to automatic and interactive procedural texture generation
CN113902868A (en) Large-scale ocean scene creation method and device based on Wang Cubes
Antoniuk et al. Generation of complex underground systems for application in computer games with schematic maps and L-systems
Ichikawa et al. VR safari park: a concept-based world building interface using blocks and world tree
Onrust et al. Procedural generation and interactive web visualization of natural environments
Adzhiev et al. Augmented sculpture: Computer ghosts of physical artifacts
Penney Volumetric clouds in the VR movie, Allumette
Petrovas et al. Automated digital terrain elevation modification by procedural generation approach
Lim Evolving facial expressions
Chen et al. Animating 3D vegetation in real-time using a 2D approach
Zhang Implementation and Applications of Art-Directable Ocean Simulation Tools
US11961186B2 (en) Method and system for visually seamless grafting of volumetric data
Konsén 3D model of a real world model: Creating import-ready asset.
Vijayalakshmi et al. Architectural Visualisation using Virtual Reality
Jain 3D Image Creation With Standard Light Effects
Nikkola Procedural Terrain Generation in VR Simulations
Nadig Example-Based Terrain Authoring with Complex Features
Ziamtsov Dynamic textures
Pokorný et al. The Preparation of Graphic Models for a Virtual Reality Application in Unity

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