CN107909656A - Font size processing method and processing device for ornaments - Google Patents
Font size processing method and processing device for ornaments Download PDFInfo
- Publication number
- CN107909656A CN107909656A CN201711334187.9A CN201711334187A CN107909656A CN 107909656 A CN107909656 A CN 107909656A CN 201711334187 A CN201711334187 A CN 201711334187A CN 107909656 A CN107909656 A CN 107909656A
- Authority
- CN
- China
- Prior art keywords
- font
- ornaments
- scene
- font size
- dimensional scenic
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2219/00—Indexing scheme for manipulating 3D models or images for computer graphics
- G06T2219/20—Indexing scheme for editing of 3D models
- G06T2219/2016—Rotation, translation, scaling
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Architecture (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Processing Or Creating Images (AREA)
Abstract
This application discloses a kind of font size processing method and processing device for ornaments.This method includes:Determine default three-dimensional scenic, receive the first process instruction, determine the ornaments, receive second processing instruction, determine that the font on the ornaments performs font size change operation, performing font to the font on the ornaments performs Rendering operations.Present application addresses the technical problem that font on ornaments can not carry out size adjustment.It is achieved thereby that on ornaments font personalized customization technique effect.
Description
Technical field
This application involves software field, changes processing method and processing device in particular to a kind of font for ornaments.
Background technology
The ornaments such as necklace, bracelet, ring, are usually all that producer designs a model and completes, and when buyer wants to buy ornaments, are led to
The style and material that can only be often designed according to producer are bought.
Inventor has found, lacks the word size processing mode of customization at present for ornaments, such as, it is desirable to adoring
The text font of different zoom ratio or want, when highlighting a certain text font on ornaments, can not usually realize on product
Processing to font size.Although some businessmans provide the approach of on-line purchase, can not meet substantially growing
Personalized word processing demand.
The problem of can not carrying out size adjustment for font on ornaments in correlation technique, not yet propose effective solve at present
Scheme.
The content of the invention
The main purpose of the application is to provide a kind of font size processing method and processing device for ornaments, to solve to adorn
Font can not carry out the problem of size adjustment on product.
To achieve these goals, according to the one side of the application, there is provided at a kind of font size for ornaments
Reason method.
According to the font size processing method for ornaments of the application, created by applications engine and painted based on three-dimensional
The three-dimensional scenic of figure agreement, is drawn in the three-dimensional scenic and renders the ornaments, including:Determine default three dimensional field
Scape, wherein, the three-dimensional scenic includes:Scene, camera and renderer;The first process instruction is received, wherein, first processing
Instruction is used for the render instruction as the ornaments;Determine the ornaments, the ornaments are used for the wash with watercolours as the three-dimensional scenic
Contaminate object;Second processing instruction is received, wherein, the second processing instruction is used to perform the font being attached on the ornaments
Font size changes predetermined registration operation;And determine that the font on the ornaments performs font size change operation, to the ornaments
On font perform font perform Rendering operations.
Further, the applications engine is:Three.js, it is real by three.js d engines on a web browser
The establishment of existing three-dimensional scenic, including at least following processing side when being drawn in the three-dimensional scenic and rendering the ornaments
Method:Pass through constructed fuction THREE.Scene ();THREE.OrthographicCamera();THREE.WebGLRenderer
(), for creating three scene, camera, renderer total objects;Grid model and illumination in scene set;Camera is set
Position, direction of visual lines and projection pattern.
Further, further included when realizing the establishment of three-dimensional scenic by three.js d engines on a web browser:It is logical
Cross constructed fuction Mesh () and create grid model object, for by the ornaments object containing vertex position information and containing color
The material object of information is as parameter;After grid model creates, by using the method .add () of scenario objects three-dimensional scenic
Subobject be added in scene;The subobject of default point light source, ambient light object as scene is inserted into scene;
Scene, camera object are used as to the parameter of renderer object method render () by constructed fuction renderer., for making
To send the operational order of the three-dimensional scenic object created according to the shooting of the modes of emplacement of camera to browser.
Further, receiving second processing instruction includes following one or more:Font on the ornaments is performed
Font size presets amplifieroperation process instruction;Font on the ornaments is performed font size and presets reduction operation and handle and is referred to
Order;Font on the ornaments is performed font size to preset etc. than amplifieroperation process instruction;By the font on the ornaments
Perform font size and preset Scaling operation process instruction;Font on the ornaments is performed into font size and presets middle word
Body amplifieroperation process instruction;Font on the ornaments is performed font size and presets Chinese font reduction operation and handle and is referred to
Order;Font on the ornaments is performed into font size and presets english font reduction operation process instruction;By on the ornaments
Font performs font size and presets english font amplifieroperation process instruction.
Include further, it is determined that the font on the ornaments performs font size change operation:Existed according to the ornaments
Position in the three-dimensional scenic, adjusts light source object;Perform add methods and the light source object is added to scene as parameter
In object;Point light source is added in scenario objects Scene by constructed fuction scene.add ();And/or by constructing letter
Environment light source object is added in scenario objects Scene by number scene.add ();Whenever a grid model is rendered, then
The vertex objects specified from the grid model constructed fuction obtain vertex data, perform method scale ().
To achieve these goals, according to the another aspect of the application, there is provided at a kind of font size for ornaments
Manage device.
According to the font size processing unit for ornaments of the application, created by applications engine and painted based on three-dimensional
The three-dimensional scenic of figure agreement, is drawn in the three-dimensional scenic and renders the ornaments, including:First determining module, is used
In definite default three-dimensional scenic, wherein, the three-dimensional scenic includes:Scene, camera and renderer;First receiving module, is used
In receiving the first process instruction, wherein, first process instruction is used for the render instruction as the ornaments;Second determines mould
Block, for determining the ornaments, the ornaments are used for the rendering objects as the three-dimensional scenic;Second receiving module, is used for
Second processing instruction is received, wherein, the second processing instruction is used for big to the font execution font being attached on the ornaments
Small change predetermined registration operation;3rd determining module, for determining that the font on the ornaments performs font size change operation, to institute
State the font on ornaments and perform font execution Rendering operations.
Further, device further includes:Three-dimensional scenic module, the three-dimensional scenic module, for passing through constructed fuction
THREE.Scene();THREE.OrthographicCamera();THREE.WebGLRenderer (), for creating field
Three scape, camera, renderer total objects;Grid model and illumination in scene set;Set the position of camera, direction of visual lines and
Projection pattern.
Further, the three-dimensional scenic module, is additionally operable to create grid model object by constructed fuction Mesh (), uses
In using the ornaments for containing vertex position information object and containing the material object of colouring information as parameter;Grid model creates
Afterwards, the subobject of three-dimensional scenic is added in scene by using the method .add () of scenario objects;By default light
Source, ambient light object are respectively as in the subobject insertion scene of scene;By constructed fuction renderer. by scene, camera
Parameter of the object as renderer object method render (), for as the modes of emplacement sent to browser according to camera
Shoot the operational order of the three-dimensional scenic object created.
Further, the 3rd determining module, is additionally operable to the position in the three-dimensional scenic according to the ornaments, adjusts
Whole light source object;Perform add methods to be added to the light source object in scenario objects as parameter, pass through constructed fuction
Point light source is added in scenario objects Scene by scene.add ();And/or by constructed fuction scene.add () by environment
Light source object is added in scenario objects Scene;Whenever a grid model is rendered, then letter is constructed from the grid model
The vertex objects that number is specified obtain vertex data, perform method scale ().
Further, the second receiving module, which is additionally operable to perform, includes following one or more kinds of operations:By on the ornaments
Font perform font size preset amplifieroperation process instruction;Font on the ornaments is performed into font size and presets diminution
Operate process instruction;Font on the ornaments is performed font size to preset etc. than amplifieroperation process instruction;By the decorations
Font on product performs font size and presets Scaling operation process instruction;Font on the ornaments is performed into font size
Default Chinese font amplifieroperation process instruction;Font on the ornaments is performed into font size and presets Chinese font diminution behaviour
Deal with instruction;Font on the ornaments is performed into font size and presets english font reduction operation process instruction;By described in
Font on ornaments performs font size and presets english font amplifieroperation process instruction.
In the embodiment of the present application, the three-dimensional scenic based on three-dimensional drawing agreement is created using by applications engine,
Drawn in the three-dimensional scenic and render the mode of the ornaments, by being performed to the font being attached on the ornaments
Font size changes predetermined registration operation, is rendered after having achieveed the purpose that font size conversion, it is achieved thereby that font individual character on ornaments
Change the technique effect of customization, and then solve font on ornaments not carrying out the technical problem of size adjustment.
Brief description of the drawings
The attached drawing for forming the part of the application is used for providing further understanding of the present application so that the application's is other
Feature, objects and advantages become more apparent upon.The illustrative examples attached drawing and its explanation of the application is used to explain the application, not
Form the improper restriction to the application.In the accompanying drawings:
Fig. 1 is the font size processing method schematic diagram for ornaments according to the application first embodiment;
Fig. 2 is the font size processing method schematic diagram for ornaments according to the application second embodiment;
Fig. 3 is the font size processing method schematic diagram for ornaments according to the application 3rd embodiment;
Fig. 4 is the font size processing method schematic diagram for ornaments according to the application fourth embodiment;
Fig. 5 is the font size processing method schematic device for ornaments according to the application first embodiment;And
Fig. 6 is the font size processing method schematic device for ornaments according to the application second embodiment.
Embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction with the embodiment of the present application
Attached drawing, is clearly and completely described the technical solution in the embodiment of the present application, it is clear that described embodiment is only
The embodiment of the application part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's all other embodiments obtained without making creative work, should all belong to the model of the application protection
Enclose.
It should be noted that term " first " in the description and claims of this application and above-mentioned attached drawing, "
Two " etc. be for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so use
Data can exchange in the appropriate case, so as to embodiments herein described herein.In addition, term " comprising " and " tool
Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing series of steps or unit
Process, method, system, product or equipment are not necessarily limited to those steps clearly listed or unit, but may include without clear
It is listing to Chu or for the intrinsic other steps of these processes, method, product or equipment or unit.
It should be noted that in the case where there is no conflict, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
As shown in Figure 1, this method includes steps S102 to step S110:
Step S102, determines default three-dimensional scenic,
The three-dimensional scenic includes:Scene, camera and renderer.
It can include grid model in scene, grid model is used for the shape and size for setting solid.Grid model is also
For setting color, textures and the transparency of material.
It can also include illumination in scene, illumination is used to set color.Illumination is according to classification of type:Ambient light, point light
Source and directional light.
Camera can include:The position of camera.
Camera can include:Adjust direction of visual lines.
Camera can also include:Transmission projection and orthogonal projection.
For example, grid model is used for the shape Geometry for setting solid, constructed fuction can be passed through
It is all x that THREE.BoxGeometry (x, y, z), which creates a length, width and height, the cube of y, z, when change parameter value, in user
The design sketch after data change is checked after refreshing browser.
For example, lattice model is additionally operable to set material Material, constructed fuction can be passed through
THREE.MeshLambertMaterial({color:0x0000ff }) create one and be used for cubical material object, it is right
As containing color color, color attribute value is that 0x0000ff represents red, color value can be changed to 0x00ff00, can be with
See it being green cube effect.
For example, illumination Light can also be included in scene, constructed fuction THREE.PointLight can be passed through
(0xffffff) creates a point light source object, and what parameter 0xffffff was defined is intensity of illumination.If after changing parameter, refresh
Browser client sees that cubical surface color is dimmed.
For example, camera Camera, can also include:Transmission projection and orthogonal projection can pass through constructed fuction
THREE.OrthographicCamera () creates an orthogonal projection camera object, and what can also be defined is the position of camera
Put and take pictures direction, display of finding a view can be carried out with Zoom display three-dimensional scenic, to the different angle of three-dimensional scenic by camera.
Step S104, receives the first process instruction,
First process instruction is used for the render instruction as the ornaments.
The render instruction of ornaments can include:Change the sphere material Object constructors in scene
The parameter of THREE.MeshLambertMaterial (), adds opacity and transparent attributes, and the value of opacity is
Between 0~1, transparent indicates whether to open transparency interaction.
The render instruction of ornaments can include:Bloom effect will be simulated by constructed fuction MeshPhongMaterial ()
Mirror-reflection realizes that attribute specular represents the high light color of sphere grid model, changes rgb value meeting and the lighting color of color
RGB component be multiplied, shininess attributes can be understood as the coefficient of intensity of illumination.
The render instruction of ornaments can include:Material Object constructors, MeshBasicMaterial are Base Materials,
The common appearance attribute such as solid color, transparency, texture mapping can be set.MeshLambertMaterial is orchid primary
Special Lambert materials, in addition to supporting the attribute of Base Material, also support diffusing reflection illumination model, can set reflectivity, folding
Penetrate the physical optical parameters such as rate.Lambert material color light and shades are influenced by illumination power direction;MeshPhongMaterial is
Phong materials, support mirror-reflection illumination model, and local bloom effect is added to solid.MeshDepthMaterial is deep
Material is spent, calculating is influenced be subject to vertex depth values.MeshNormalMaterial is normal vector material, and Normal is exactly normal
The meaning, there is different normal directions in the position that the surface of object is different, from the point of view of solid object, solid vertex phase
Closing data generally has vertex scheme vector data, and the color that these data can be used for vertex calculates.
Step S106, determines the ornaments,
The ornaments are used for the rendering objects as the three-dimensional scenic.Ornaments can be necklace, bracelet, ring etc..
Step S108, receives second processing instruction,
The second processing instruction is used to perform the font being attached on the ornaments font size change predetermined registration operation.
It can be splicing, connection, combination to perform font to the font being attached on the ornaments.
It can surround, protrude, being recessed that font is performed to the font being attached on the ornaments.
It can also be splicing to perform font to the font being attached on the ornaments.
It can also irregularly change to perform font to the font being attached on the ornaments.
Font is performed to the font being attached on the ornaments and can also be ending connection.
Step S110, determines that the font on the ornaments performs font size change operation, to the font on the ornaments
Perform font and perform Rendering operations.
Determine that the font on the ornaments performs font size change operation and can determine the relative position of font, relative angle
Degree and relative size.
Relative position is position relationship of the font size relative to the ornaments center.
It can be seen from the above description that the present invention realizes following technique effect:
In the embodiment of the present application, the three-dimensional scenic based on three-dimensional drawing agreement is created using by applications engine,
Drawn in the three-dimensional scenic and render the mode of the ornaments, by being performed to the font being attached on the ornaments
Font size changes predetermined registration operation, is rendered after having achieveed the purpose that font size conversion, it is achieved thereby that font individual character on ornaments
Change the technique effect of customization, and then solve font on ornaments not carrying out the technical problem of size adjustment.
According to embodiments of the present invention, as preferred in the present embodiment, as shown in Fig. 2, the applications engine is:
Three.js, realizes the establishment of three-dimensional scenic by three.js d engines on a web browser, in the three-dimensional scenic into
Including at least following processing method when row is drawn and renders the ornaments:
Step S202, passes through constructed fuction THREE.Scene ();THREE.OrthographicCamera();
THREE.WebGLRenderer (), for creating three scene, camera, renderer total objects;
Step S204, grid model and illumination in scene set;
Step S206, sets position, direction of visual lines and the projection pattern of camera.
According to embodiments of the present invention, as preferred in the present embodiment, as shown in figure 3, passing through on a web browser
Three.js d engines further include when realizing the establishment of three-dimensional scenic:
Step S302, creates grid model object, for will contain vertex position information by constructed fuction Mesh ()
Ornaments object and contain the material object of colouring information as parameter;
Creating a mesh object Mesh needs solid Geometry, one or more material Material, grid
After Object Creation is good, it is possible to be added to the attribute rendered in scene using grid, thus it is possible to vary its position in the scene
Put and display effect.
The position of mesh object Mesh, by this attribute, we can set the x of object, y, z-axis coordinate, this
Coordinate is relative to parent object.Usual namely scenario objects.
The rotation of mesh object Mesh, rotating object.
The scale of mesh object Mesh, scaling.
The translate of mesh object Mesh, ohject displacement is different from position, and the displacement of translate is opposite
Oneself position offset in itself.
Step S304, after grid model creates, by using the method .add () of scenario objects the sub right of three-dimensional scenic
As being added in scene;
Step S306, the subobject of default point light source, ambient light object as scene is inserted into scene;
Point light source PointLight, calculate the incidence angle of incident ray needs to set the three-dimensional coordinate position of point light source naturally
Put, set the position of point light source to pass through position attributes, constructed fuction form:PointLight(color,
Intensity, distance, decay) parameter intensity represents intensity of illumination coefficient, it is 1 in the case of acquiescence hair, such as
PointLight (0x080808,0.5) is equivalent to PointLight (0x040404).Parameter distance represents to be used for setting light
The degree that source light is decayed with distance change.
Environment radiant AmbientLight, sets light rgb value.By constructing THREE.AmbientLight
()。
Step S308, regard scene, camera object as renderer object method render by constructed fuction renderer.
The parameter of (), for sending the three-dimensional scenic object created according to the shooting of the modes of emplacement of camera as to browser
Operational order.
According to embodiments of the present invention, as preferred in the present embodiment, as shown in figure 4, determining the font on the ornaments
Performing font size change operation includes:
Step S402, according to position of the ornaments in the three-dimensional scenic, adjusts light source object;
Step S404, performs add methods and is added to the light source object in scenario objects as parameter;
Point light source, is added in scenario objects Scene by step S406 by constructed fuction scene.add ();
Step S408, and/or, environment light source object is added to by scenario objects by constructed fuction scene.add ()
In Scene;
Step S410, whenever a grid model is rendered, then from the vertex that the grid model constructed fuction is specified
Object acquisition vertex data, performs method scale ().
For example, pass through construction such as minor function
Varmesh=THREE.SceneUtils.createMultiMaterialObject (geometry,
[material1,,material2]);
What is obtained is the group for including multiple grids, creates a grid group, which includes multiple grids, when this group carries out
Scaling, mobile, rotation, when deformation, the grid in group all can and then change.
Sphere and cube are all added in the group by establishment group.The border of calculating group, one border infinity of generation
Cube, converts subobject application matrix in group and group, obtains the coordinate after subobject vertex changes in group, replicon pair
Each apex coordinate of elephant, resets cubical border.Wherein, parameter includes:Auxiliary line ArrowHelper, its parameter
Deciphering, dir:Direction, acquiescence are normal vectors;origin:The coordinate position of beginning;length:The length of auxiliary line;color:
The color of auxiliary line;headLength:The length on head;headWidth:The width on head.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions
Performed in computer system, although also, show logical order in flow charts, in some cases, can be with not
The order being same as herein performs shown or described step.
According to embodiments of the present invention, additionally provide a kind of for implementing the above-mentioned font size processing method for ornaments
Device, creates the three-dimensional scenic based on three-dimensional drawing agreement by applications engine, is drawn in the three-dimensional scenic
And the ornaments are rendered, as shown in figure 5, described device includes:First determining module 10, for determining default three-dimensional scenic,
Wherein, the three-dimensional scenic includes:Scene, camera and renderer;First receiving module 20, for receiving the first process instruction,
Wherein, first process instruction is used for the render instruction as the ornaments;Second determining module 30, for determining the decorations
Product, the ornaments are used for the rendering objects as the three-dimensional scenic;Second receiving module 40, refers to for receiving second processing
Order, wherein, the second processing instruction is used to perform the font being attached on the ornaments font size change predetermined registration operation;
3rd determining module 50, for determining that the font on the ornaments performs font size change operation, to the word on the ornaments
Body performs font and performs Rendering operations.
Using by applications engine create the three-dimensional scenic based on three-dimensional drawing agreement, in the three-dimensional scenic into
Row is drawn and renders the mode of the ornaments, by performing the default behaviour of font size change to the font being attached on the ornaments
Make, achieveed the purpose that font size conversion after render, it is achieved thereby that on ornaments font personalized customization technique effect, into
And the technical problem of size adjustment can not be carried out by solving font on ornaments.
Three-dimensional scenic includes described in the first determining module 10 of embodiments herein:Scene, camera and renderer.
It can include grid model in scene, grid model is used for the shape and size for setting solid.Grid model is also
For setting color, textures and the transparency of material.
It can also include illumination in scene, illumination is used to set color.Illumination is according to classification of type:Ambient light, point light
Source and directional light.
Camera can include:The position of camera.
Camera can include:Adjust direction of visual lines.
Camera can also include:Transmission projection and orthogonal projection.
For example, grid model is used for the shape Geometry for setting solid, constructed fuction can be passed through
It is all x that THREE.BoxGeometry (x, y, z), which creates a length, width and height, the cube of y, z, when change parameter value, in user
The design sketch after data change is checked after refreshing browser.
For example, lattice model is additionally operable to set material Material, constructed fuction can be passed through
THREE.MeshLambertMaterial({color:0x0000ff }) create one and be used for cubical material object, it is right
As containing color color, color attribute value is that 0x0000ff represents red, color value can be changed to 0x00ff00, can be with
See it being green cube effect.
For example, illumination Light can also be included in scene, constructed fuction THREE.PointLight can be passed through
(0xffffff) creates a point light source object, and what parameter 0xffffff was defined is intensity of illumination.If after changing parameter, refresh
Browser client sees that cubical surface color is dimmed.
For example, camera Camera, can also include:Transmission projection and orthogonal projection can pass through constructed fuction
THREE.OrthographicCamera () creates an orthogonal projection camera object, and what can also be defined is the position of camera
Put and take pictures direction, display of finding a view can be carried out with Zoom display three-dimensional scenic, to the different angle of three-dimensional scenic by camera.
The first process instruction described in the first receiving module 20 of embodiments herein is used for as the ornaments
Render instruction.
The render instruction of ornaments can include:Change the sphere material Object constructors in scene
The parameter of THREE.MeshLambertMaterial (), adds opacity and transparent attributes, and the value of opacity is
Between 0~1, transparent indicates whether to open transparency interaction.
The render instruction of ornaments can include:Bloom effect will be simulated by constructed fuction MeshPhongMaterial ()
Mirror-reflection realizes that attribute specular represents the high light color of sphere grid model, changes rgb value meeting and the lighting color of color
RGB component be multiplied, shininess attributes can be understood as the coefficient of intensity of illumination.
The render instruction of ornaments can include:Material Object constructors, MeshBasicMaterial are Base Materials,
The common appearance attribute such as solid color, transparency, texture mapping can be set.MeshLambertMaterial is orchid primary
Special Lambert materials, in addition to supporting the attribute of Base Material, also support diffusing reflection illumination model, can set reflectivity, folding
Penetrate the physical optical parameters such as rate.Lambert material color light and shades are influenced by illumination power direction;MeshPhongMaterial is
Phong materials, support mirror-reflection illumination model, and local bloom effect is added to solid.MeshDepthMaterial is deep
Material is spent, calculating is influenced be subject to vertex depth values.MeshNormalMaterial is normal vector material, and Normal is exactly normal
The meaning, there is different normal directions in the position that the surface of object is different, from the point of view of solid object, solid vertex phase
Closing data generally has vertex scheme vector data, and the color that these data can be used for vertex calculates.
The ornaments described in the second determining module 30 of embodiments herein are used for rendering as the three-dimensional scenic
Object.Ornaments can be necklace, bracelet, ring etc..
Second processing instruction is used for being attached to the decorations described in the second receiving module 40 of embodiments herein
Font on product performs font size change predetermined registration operation.
It can be splicing, connection, combination to perform font to the font being attached on the ornaments.
It can surround, protrude, being recessed that font is performed to the font being attached on the ornaments.
It can also be splicing to perform font to the font being attached on the ornaments.
It can also irregularly change to perform font to the font being attached on the ornaments.
Font is performed to the font being attached on the ornaments and can also be ending connection.
Determine that the font on the ornaments performs font size and becomes in the 3rd determining module 50 of embodiments herein
Relative position, relative angle and the relative size of font can be determined by changing operation.
Relative position is position relationship of the font size relative to the ornaments center.
According to embodiments of the present invention, as preferred in the present embodiment, as shown in fig. 6, described device further includes:Three dimensional field
Scape module 60, the three-dimensional scenic module 60, for passing through constructed fuction THREE.Scene ();
THREE.OrthographicCamera();THREE.WebGLRenderer (), for creating scene, camera, renderer
Three total objects;Grid model and illumination in scene set;Position, direction of visual lines and the projection pattern of camera are set.
As preferred in the present embodiment, the three-dimensional scenic module 60, it is additionally operable to create by constructed fuction Mesh ()
Grid model object, for using the ornaments for containing vertex position information object and containing the material object of colouring information as ginseng
Number;After grid model creates, the subobject of three-dimensional scenic is added to by using the method .add () of scenario objects by scene
In;The subobject of default point light source, ambient light object as scene is inserted into scene;Pass through constructed fuction
Renderer. using scene, camera object as renderer object method render () parameter, for being sent out as to browser
Send the operational order of the three-dimensional scenic object created according to the shooting of the modes of emplacement of camera.
A mesh object Mesh is created in the three-dimensional scenic module 60 in the embodiment of the present application needs solid
Geometry, one or more material Material, after mesh object creates, it is possible to be added in scene and render
Utilize the attribute of grid, thus it is possible to vary its position and display effect in the scene.
The position of mesh object Mesh, by this attribute, we can set the x of object, y, z-axis coordinate, this
Coordinate is relative to parent object.Usual namely scenario objects.
The rotation of mesh object Mesh, rotating object.
The scale of mesh object Mesh, scaling.
The translate of mesh object Mesh, ohject displacement is different from position, and the displacement of translate is opposite
Oneself position offset in itself.
Point light source PointLight in the three-dimensional scenic module 60 in the embodiment of the present application, calculates entering for incident ray
Firing angle needs to set the three-dimensional coordinate position of point light source naturally, sets the position of point light source to pass through position attributes, structure
Make Function Format:PointLight (color, intensity, distance, decay) parameters intensity represents that illumination is strong
Coefficient is spent, is 1 in the case of acquiescence hair, for example PointLight (0x080808,0.5) is equivalent to PointLight
(0x040404).Parameter distance represents to be used for setting the degree that source light is decayed with distance change.
Environment radiant AmbientLight, sets light rgb value.By constructing THREE.AmbientLight
()。
According to embodiments of the present invention, as preferred in the present embodiment, as shown in fig. 6, in the 3rd determining module 50,
The position in the three-dimensional scenic according to the ornaments is additionally operable to, adjusts light source object;Add methods are performed by the light source pair
As being added to as parameter in scenario objects, point light source is added to by scenario objects by constructed fuction scene.add ()
In Scene;And/or environment light source object is added in scenario objects Scene by constructed fuction scene.add ();Often
When rendering a grid model, then the vertex objects specified from the grid model constructed fuction obtain vertex data, hold
Row method scale ().
For example, pass through construction such as minor function
Varmesh=THREE.SceneUtils.createMultiMaterialObject (geometry,
[material1,,material2]);
What is obtained is the group for including multiple grids, creates a grid group, which includes multiple grids, when this group carries out
Scaling, mobile, rotation, when deformation, the grid in group all can and then change.
Sphere and cube are all added in the group by establishment group.The border of calculating group, one border infinity of generation
Cube, converts subobject application matrix in group and group, obtains the coordinate after subobject vertex changes in group, replicon pair
Each apex coordinate of elephant, resets cubical border.Wherein, parameter includes:Auxiliary line ArrowHelper, its parameter
Deciphering, dir:Direction, acquiescence are normal vectors;origin:The coordinate position of beginning;length:The length of auxiliary line;color:
The color of auxiliary line;headLength:The length on head;headWidth:The width on head.
As preferred in the present embodiment, the second receiving module 20, which is additionally operable to perform, includes following one or more kinds of grasp
Make:
Font on the ornaments is performed into font size and presets amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets reduction operation process instruction;
Font on the ornaments is performed font size to preset etc. than amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets Scaling operation process instruction;
Font on the ornaments is performed into font size and presets Chinese font amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets Chinese font reduction operation process instruction;
Font on the ornaments is performed into font size and presets english font reduction operation process instruction;
Font on the ornaments is performed into font size and presets english font amplifieroperation process instruction.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general
Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed
Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they
In multiple modules or step be fabricated to single integrated circuit module to realize.In this way, the present invention be not restricted to it is any specific
Hardware and software combines.
The foregoing is merely the preferred embodiment of the application, the application is not limited to, for the skill of this area
For art personnel, the application can have various modifications and variations.It is all within spirit herein and principle, made any repair
Change, equivalent substitution, improvement etc., should be included within the protection domain of the application.
Claims (10)
1. a kind of font size processing method for ornaments, it is characterised in that created by applications engine based on three-dimensional
The three-dimensional scenic of drawing agreement, is drawn in the three-dimensional scenic and renders the ornaments, the described method includes:
Determine default three-dimensional scenic, wherein, the three-dimensional scenic includes:Scene, camera and renderer;
The first process instruction is received, wherein, first process instruction is used for the render instruction as the ornaments;
Determine the ornaments, the ornaments are used for the rendering objects as the three-dimensional scenic;
Second processing instruction is received, wherein, the second processing instruction is used to perform word to the font being attached on the ornaments
Body size variation predetermined registration operation;And
Determine that the font on the ornaments performs font size change operation, performing font to the font on the ornaments performs wash with watercolours
Dye operation.
2. font size processing method according to claim 1, it is characterised in that the applications engine is:
Three.js, realizes the establishment of three-dimensional scenic by three.js d engines on a web browser, in the three-dimensional scenic into
Including at least following processing method when row is drawn and renders the ornaments:
Pass through constructed fuction THREE.Scene ();THREE.OrthographicCamera();THREE.WebGLRenderer
(), for creating three scene, camera, renderer total objects;
Grid model and illumination in scene set;
Position, direction of visual lines and the projection pattern of camera are set.
3. font size processing method according to claim 2, it is characterised in that pass through three.js tri- on a web browser
Further included during the establishment for tieing up engine implementation three-dimensional scenic:
Grid model object is created by constructed fuction Mesh (), for by the ornaments object containing vertex position information and containing
The material object of colouring information is as parameter;
After grid model creates, the subobject of three-dimensional scenic is added to by using the method .add () of scenario objects by scene
In;
The subobject of default point light source, ambient light object as scene is inserted into scene;
Scene, camera object are used as to the parameter of renderer object method render () by constructed fuction renderer., are used for
As the operational order that the three-dimensional scenic object created according to the shooting of the modes of emplacement of camera is sent to browser.
4. font size processing method according to claim 1, it is characterised in that reception second processing instruction includes following
It is one or more kinds of:
Font on the ornaments is performed into font size and presets amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets reduction operation process instruction;
Font on the ornaments is performed font size to preset etc. than amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets Scaling operation process instruction;
Font on the ornaments is performed into font size and presets Chinese font amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets Chinese font reduction operation process instruction;
Font on the ornaments is performed into font size and presets english font reduction operation process instruction;
Font on the ornaments is performed into font size and presets english font amplifieroperation process instruction.
5. font size processing method according to claim 1, it is characterised in that determine that the font on the ornaments performs
Font size change operation includes:
According to position of the ornaments in the three-dimensional scenic, light source object is adjusted;
Add methods are performed to be added to the light source object in scenario objects as parameter;
Point light source is added in scenario objects Scene by constructed fuction scene.add ();
And/or environment light source object is added in scenario objects Scene by constructed fuction scene.add ();
Whenever a grid model is rendered, then the vertex objects specified from the grid model constructed fuction obtain number of vertex
According to execution method scale ().
6. a kind of font size processing unit for ornaments, it is characterised in that created by applications engine based on three-dimensional
The three-dimensional scenic of drawing agreement, is drawn in the three-dimensional scenic and renders the ornaments, described device includes:
First determining module, for determining default three-dimensional scenic, wherein, the three-dimensional scenic includes:Scene, camera and render
Device;
First receiving module, for receiving the first process instruction, wherein, first process instruction is used for as the ornaments
Render instruction;
Second determining module, for determining the ornaments, the ornaments are used for the rendering objects as the three-dimensional scenic;
Second receiving module, for receiving second processing instruction, wherein, the second processing instruction is used for being attached to the decorations
Font on product performs font size change predetermined registration operation;
3rd determining module, for determining that the font on the ornaments performs font size change operation, on the ornaments
Font performs font and performs Rendering operations.
7. font size processing method according to claim 6, it is characterised in that further include:Three-dimensional scenic module,
The three-dimensional scenic module, for passing through constructed fuction THREE.Scene ();THREE.OrthographicCamera
();THREE.WebGLRenderer (), for creating three scene, camera, renderer total objects;
Grid model and illumination in scene set;
Position, direction of visual lines and the projection pattern of camera are set.
8. font size processing method according to claim 7, it is characterised in that the three-dimensional scenic module, is additionally operable to
Grid model object is created by constructed fuction Mesh (), for by the ornaments object containing vertex position information and containing face
The material object of color information is as parameter;
After grid model creates, the subobject of three-dimensional scenic is added to by using the method .add () of scenario objects by scene
In;
The subobject of default point light source, ambient light object as scene is inserted into scene;
Scene, camera object are used as to the parameter of renderer object method render () by constructed fuction renderer., are used for
As the operational order that the three-dimensional scenic object created according to the shooting of the modes of emplacement of camera is sent to browser.
9. font size processing method according to claim 6, it is characterised in that the 3rd determining module, is additionally operable to
According to position of the ornaments in the three-dimensional scenic, light source object is adjusted;
Add methods are performed to be added to the light source object in scenario objects as parameter,
Point light source is added in scenario objects Scene by constructed fuction scene.add ();
And/or environment light source object is added in scenario objects Scene by constructed fuction scene.add ();
Whenever a grid model is rendered, then the vertex objects specified from the grid model constructed fuction obtain number of vertex
According to execution method scale ().
10. according to claim 6-9 any one of them font size processing methods, it is characterised in that the second receiving module is also
Include following one or more kinds of operations for performing:
Font on the ornaments is performed into font size and presets amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets reduction operation process instruction;
Font on the ornaments is performed font size to preset etc. than amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets Scaling operation process instruction;
Font on the ornaments is performed into font size and presets Chinese font amplifieroperation process instruction;
Font on the ornaments is performed into font size and presets Chinese font reduction operation process instruction;
Font on the ornaments is performed into font size and presets english font reduction operation process instruction;
Font on the ornaments is performed into font size and presets english font amplifieroperation process instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711334187.9A CN107909656A (en) | 2017-12-10 | 2017-12-10 | Font size processing method and processing device for ornaments |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711334187.9A CN107909656A (en) | 2017-12-10 | 2017-12-10 | Font size processing method and processing device for ornaments |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107909656A true CN107909656A (en) | 2018-04-13 |
Family
ID=61865609
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711334187.9A Pending CN107909656A (en) | 2017-12-10 | 2017-12-10 | Font size processing method and processing device for ornaments |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107909656A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101458732A (en) * | 2008-12-25 | 2009-06-17 | 浙江师范大学 | Knowledge application method orienting ornament innovation design |
CN102156808A (en) * | 2011-03-30 | 2011-08-17 | 北京触角科技有限公司 | System and method for improving try-on effect of reality real-time virtual ornament |
CN104851004A (en) * | 2015-05-12 | 2015-08-19 | 杨淑琪 | Display device of decoration try and display method thereof |
CN106251203A (en) * | 2016-07-29 | 2016-12-21 | 成都我的科技有限公司 | A kind of jewelry Photographing On-line system and the method for Photographing On-line thereof |
-
2017
- 2017-12-10 CN CN201711334187.9A patent/CN107909656A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101458732A (en) * | 2008-12-25 | 2009-06-17 | 浙江师范大学 | Knowledge application method orienting ornament innovation design |
CN102156808A (en) * | 2011-03-30 | 2011-08-17 | 北京触角科技有限公司 | System and method for improving try-on effect of reality real-time virtual ornament |
CN104851004A (en) * | 2015-05-12 | 2015-08-19 | 杨淑琪 | Display device of decoration try and display method thereof |
CN106251203A (en) * | 2016-07-29 | 2016-12-21 | 成都我的科技有限公司 | A kind of jewelry Photographing On-line system and the method for Photographing On-line thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106600712B (en) | A kind of texture replacement method based on two dimensional image | |
Heckbert | Graphics gems | |
US10121281B2 (en) | System and method for visualizing an object in a simulated environment | |
CN108564646A (en) | Rendering intent and device, storage medium, the electronic device of object | |
CN112316420B (en) | Model rendering method, device, equipment and storage medium | |
CA2817497C (en) | Method and system for efficient modeling of specular reflection | |
TWI406186B (en) | 2d editing metaphor for 3d graphics | |
Eck | Introduction to Computer Graphics | |
CN104091366B (en) | Three-dimensional intelligent digitalization generation method and system based on two-dimensional shadow information | |
CN107886552A (en) | Stick picture disposing method and apparatus | |
WO2017123163A1 (en) | Improvements in or relating to the generation of three dimensional geometries of an object | |
Verhoeven | Computer graphics meets image fusion: The power of texture baking to simultaneously visualise 3D surface features and colour | |
CN108090948A (en) | Change processing method and processing device for the font of ornaments | |
CN114119848B (en) | Model rendering method and device, computer equipment and storage medium | |
CN107909656A (en) | Font size processing method and processing device for ornaments | |
CN107967628A (en) | Ornaments calculation of price method and device for on-line customization | |
Hu et al. | Research on 3d interactive model selection and customization of ceramic products based on big data cloud service platform | |
Takayama | Computer-generated gothic tracery with a motif-oriented approach | |
Yu et al. | A fire model for 2-D computer animation | |
CN110136239A (en) | A method of enhancing virtual reality scenario illumination and reflection validity | |
KR20030083962A (en) | Method For Applying Shading Effect To 3D Rendering Images And Information Storage Medium Storing A Program Implementing The Same | |
US20180005432A1 (en) | Shading Using Multiple Texture Maps | |
GB2341529A (en) | Three-dimensional embroidery design simulator | |
Takita et al. | A simple method for rendering penumbrae caused by sunlight | |
Ji | Design and Modeling of Chinese Classical Lanterns Based on Different Processes |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180413 |
|
RJ01 | Rejection of invention patent application after publication |