US20070139435A1 - Data structure for texture data, computer program product, and texture mapping method - Google Patents

Data structure for texture data, computer program product, and texture mapping method Download PDF

Info

Publication number
US20070139435A1
US20070139435A1 US11/706,993 US70699307A US2007139435A1 US 20070139435 A1 US20070139435 A1 US 20070139435A1 US 70699307 A US70699307 A US 70699307A US 2007139435 A1 US2007139435 A1 US 2007139435A1
Authority
US
United States
Prior art keywords
texture
data
value
shading
texture data
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.)
Abandoned
Application number
US11/706,993
Inventor
Yuichi Higuchi
Naohiro Warama
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.)
Sega Corp
Original Assignee
Sega Corp
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 Sega Corp filed Critical Sega Corp
Priority to US11/706,993 priority Critical patent/US20070139435A1/en
Publication of US20070139435A1 publication Critical patent/US20070139435A1/en
Abandoned legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping

Definitions

  • This invention relates to a data structure for texture data, and in particular to a data structure appropriate for cell shading.
  • FIG. 8 is a figure explaining the texture data used in conventional cell shading.
  • the texture data 70 shown in the figure is used for shading processing from white to black when the brightness of the object surface exceeds a constant threshold, and in the normalized UV coordinate system (0.0 ⁇ U ⁇ 1.0 and 0.0 ⁇ V ⁇ 1.0), comprises data regions 71 in which “white” data (0.0 ⁇ U ⁇ 0.5 and 0.0 ⁇ V ⁇ 1.0) is allocated as well as data regions 72 in which “black” data (0.5 ⁇ U ⁇ 1.0 and 0.0 ⁇ V ⁇ 1.0) is allocated.
  • V c*I+d (2)
  • I is the brightness value, computed from the inner product of the normalized normal vector to the object surface and the normalized light ray vector, and a, b, c, d are constants. Because the cell shading method is well known, the details of a, b, c, d are here omitted. If the brightness I can be computed, the UV coordinates for the texture data can be computed from equations (1) and (2). The movement locus of UV coordinates when the value of the brightness I is changed is similar to the straight line 73 .
  • FIG. 9 explains a case in which the texture data to be used is changed according to the color of the light source; as the light sources illuminating the object 50 , a red light source 41 , green light source 42 , and blue light source 43 are arranged in a virtual space. Three types of texture data are prepared for binary shading processing according to each light source color. In the state shown in the drawing, because the object 50 is in the position of the green light source 42 , texture data for green shading processing is used to perform texture mapping. However, when the object 50 crosses the boundary 61 between the red light source 41 and green light source 42 to move to the side of the red light source 41 , the texture data for the green light source 42 can no longer be used for shading, and shading must be performed using the texture data for the red light source 41 .
  • FIG. 10 explains a case in which the texture data used is changed according to the positional relation between the camera (virtual viewpoint) and object; the light source 40 , object 50 , and camera 60 are arranged in prescribed positions.
  • each of the polygons comprised by the object 50 is modeling-transformed into world coordinates, and after performing field-of-view transformation to the camera viewpoint as seen from the camera 60 , three-dimensional clipping processing, hidden surface elimination, texture mapping, shading processing, display priority processing, and other processing, the result is displayed on a video display.
  • texture data for a plurality of types of shading processing are prepared in advance, and when the distance between the object 50 and camera 60 exceeds a certain distance, the texture used in shading is changed.
  • the texture used is changed.
  • the texture used changes suddenly at the boundary 63 , the shades displayed on the surface of the object 50 changes suddenly, and the appearance of the graphic display is extremely unnatural.
  • the data actually used is only the data on the straight line 73 , and the other data regions are not used, and the problem of considerable waste of memory for texture data storage has been noted.
  • An object of the present invention is to propose a data structure for texture data, a program to cause a computer system to execute texture mapping, and texture mapping method, and a texture mapping device which resolve the above-described problems and enable smooth shading while also conserving memory resources.
  • this invention provides a method comprising a step in which, in order to access texture data comprising a computer-readable data region in which color data forming density gradients in two mutually orthogonal directions is arranged, coordinates are calculated in order to access the above data region in one of the directions among the above two directions, using brightness information of the object surface for texture mapping based on a prescribed equation; a step to calculate coordinates to access the above data region in the other direction of the above two directions based on an arbitrary value substituted into a dynamic variable; and, a step to read color data by accessing the above data region based on the calculated coordinates and perform texture mapping to the surface of the above object.
  • the present invention can provide computer-readable recording media on which is recorded a computer program to cause a computer system to execute the above method.
  • Such recording media may be, for example, optical recording media (such as CD-RAM, CD-ROM, DVD-RAM, DVD-ROM, DVD-R, PD discs, MD discs, MO discs, and other recording media the data of which can be read optically), magnetic recording media (such as flexible disks, magnetic cards, magnetic tape, and other recording media the data of which can be read magnetically), as well as memory cartridges comprising DRAM, SRAM, MRAM, FRAM, or other memory devices, and other transportable recording media.
  • optical recording media such as CD-RAM, CD-ROM, DVD-RAM, DVD-ROM, DVD-R, PD discs, MD discs, MO discs, and other recording media the data of which can be read optically
  • magnetic recording media such as flexible disks, magnetic cards, magnetic tape, and other recording media the data of which can be read magnetically
  • memory cartridges comprising DRAM, SRAM, MRAM
  • the above program can be distributed on demand from a Web server or other network server in response to a request from a client device (such as a personal computer, game equipment, portable telephone equipped with a Web browser, PDA, Palm-type PC, or other portable information terminal or similar) connected to the Internet or to a packet communication or other open network.
  • a client device such as a personal computer, game equipment, portable telephone equipped with a Web browser, PDA, Palm-type PC, or other portable information terminal or similar
  • FIG. 1 is a drawing which explains texture data
  • FIG. 2 is a drawing which explains texture data
  • FIG. 3 is a drawing which explains texture mapping
  • FIG. 4 is a drawing which explains texture mapping
  • FIG. 5 is a drawing which explains texture mapping
  • FIG. 6 is a drawing which explains texture mapping
  • FIG. 7 is a functional block diagram of the generation of video signals
  • FIG. 8 is a drawing which explains conventional texture data
  • FIG. 9 is a drawing which explains conventional texture mapping.
  • FIG. 10 is a drawing which explains conventional texture mapping.
  • FIG. 7 is a functional block diagram of texture mapping onto an object using texture data for shading, to output video signals to a video display.
  • 11 texture memory in which is stored texture data
  • 12 is a filter
  • 13 is frame memory for writing one screen's worth of image data
  • 14 is a video signal generation unit to output video signals to a video display.
  • FIG. 1 is a drawing which explains the texture data of this aspect.
  • the texture data 20 shown in the drawing is, for convenience in explanation, shown with the texture in a state of expansion in a two-dimensional plane; however, the state in which data is stored in the texture memory 11 need not necessarily be expanded in a two-dimensional plane, and the data structure of the texture data is identical so long as the interrelation between color data at arbitrary coordinates of the texture data shown in the drawing is satisfied.
  • “data structure” in this specification does not signify the interrelation between individual data bits in the state in which the texture data is stored in memory or other recording media, but refers instead to the interrelation between color data at individual coordinates defined by texture data read addresses.
  • Color data comprises, in the case of chromatic colors, information relating to brightness, hue, and color saturation, and in the case of achromatic colors, information relating to brightness (brightness and darkness).
  • color data comprises information relating to transparency; in the case of colored translucence, color data comprises, in addition to transparency, information relating to brightness, hue, and saturation.
  • the texture data 20 is prepared for use in shading of the object surface in cases where the object 50 moves in the lateral direction in the drawing under the red, green, and blue light sources 41 , 42 and 43 .
  • white texture data is allocated in data region C 10 in which 0.0 ⁇ U ⁇ 0.5 and 0.0 ⁇ V ⁇ 1.0
  • texture data for use in shading for the light sources 41 , 42 , 43 is allocated at substantially equal intervals in data regions C 1 to C 9 , in which 0.5 ⁇ U ⁇ 1.0 and 0.0 ⁇ V ⁇ 1.0.
  • C 1 is deep red texture data
  • C 2 is light red
  • C 3 is a mixture of light red and light green
  • C 4 is light green
  • C 5 is dark green
  • C 6 is light green
  • C 7 is a mixture of light green and light blue
  • C 8 is light blue
  • C 9 is dark blue texture data. That is, texture data for shading in a plurality of different color tones is arranged in the V coordinate direction, according to the positions of the light sources 41 , 42 and 43 .
  • a density gradient is provided in nine stages; however, in actuality a finer density gradient, with several tens of stages, may be provided.
  • setting the U coordinate and V coordinate of the texture in the opposite manner does not change the essence of this invention.
  • equation (1) is employed to compute the U value through light source calculations, and in place of equation (2), the following equation (3) is used to determine the V value.
  • V d (3)
  • the V value can be set by the value of the variable d, regardless of the brightness I.
  • the variable d is a dynamic variable which can be changed arbitrarily by the program, and can, for example, be changed in realtime according to the distance between the light source and object; moreover, the variable d can be changed as appropriate according to an unfolding game situation in a virtual space (for example, according to whether a player is in a favorable situation or not, or whether the number of points scored is increased or not), regardless of the positional relation with the light source.
  • the value to which the variable d is set can be decided appropriately by the programmer according to various applications, such as whether this invention is to be used for computer graphics art or for game applications.
  • the value of d if the value of d is set to 0.15, light red shading enables representation of a weak contrast, whereas if the value of d is set to 0.9, dark blue shading can be used to represent a strong contrast. If the value of d is defined in association with the distance from the light source, the value of d can be changed in realtime in concert with the positional relation between the light source and the object. For example, in the example of FIG.
  • the distance between the light source 40 and the object 50 is relatively small, so that shading is performed using shades with a comparatively strong contrast
  • the intensity of light incident on the object surface weakens in inverse proportion to the square of the distance, so that shading with gradually weaker contrast is performed, and an effect equivalent to the effect of lighting can be obtained.
  • FIG. 5 is a drawing explaining the case in which the value of d is changed in concert with the distance between the camera 60 and object 50 to perform shading.
  • a density gradient is set such that, as the value of d increases from 0.0 to 1.0, the texture data changes gradually from dark black to light black, then as the object moves away from the camera 60 , shading is performed with gradually weaker contrast, and an effect similar to fog can be obtained.
  • the light intensity of the light source may be associated with the value of d to perform shading.
  • the value of d is 0.0 for a light source for which the light intensity is maximum, and the value of d is gradually increased as the light intensity gradually weakens, so that the value of d is 1.0 for a light source with minimum light intensity, then fine adjustment of the shade contrast can be performed according to the magnitude of the light intensity of the light source.
  • a density gradient is set such that, as the value of d increases from 0.0 to 1.0, the texture data changes gradually from dark black to light black.
  • the value of d may be associated with the distance from the object to sea level, or with the distance between objects, or with other game parameters.
  • FIG. 2 shows another example of texture data.
  • the texture data 30 shown in the drawing is arranged in a white data region C 11 , light gray data region C 12 , gray data region C 13 , dark gray data region C 14 , and black data region C 15 , so as to form curved density gradients in the U coordinate direction and in the V coordinate direction.
  • Equation (1) is used to determine the U value of texture data 30 through light source calculations, and equation (3) is used to determine the V value.
  • the V value can take the values of any of the data regions C 11 , C 13 , or C 15 , so that three values are possible for shades; if the d value is 0.8, the V value can take the values of any of the data regions from C 11 to C 15 , so that five values are possible for shades.
  • FIG. 6 explains an example of application of shading using the texture data 30 ; by increasing or decreasing the value of d in concert with the number of points obtained by a player in a game, the number of gray scales of shades is adjusted.
  • the number of gray scales when there are no points, the number of gray scales is set to 3 by setting the d value to 0.2, and when there are numerous points, the number of gray scales is set to 5 by setting the d value to 0.8. Because the number of gray scales of the shades of a game character or other object can be adjusted freely in concert with the number of points acquired by a player, the atmosphere of a character can be freely changed from animation-style to comic-style as the game unfolds, so that the game can be made more amusing.
  • the color tone of the texture is changed not only in the U coordinate direction, but in the V coordinate direction as well; hence it is possible, for example, to apply shading in a smooth transition from red shades to blue shades, and the color tone of the shades can be changed naturally and without abnormalities.
  • the texture for shading has a design in advance, more complex drawing can easily be performed compared with the continuous changes of conventional fog.
  • the plurality of texture data sets can be consolidated into a single texture data set, so that the hit rate of the cache can be raised, and the drawing speed can be increased.
  • the V value can be specified independently and regardless of the brightness I, so that data regions in the entirety of the texture data can be utilized effectively, with no waste of texture memory.
  • texture mapping is performed using texture data comprising computer-readable data regions in which color data is arranged forming density gradients in two mutually orthogonal directions, so that coordinates to access the texture data can be computed from a value computed from object surface brightness information using a prescribed equation and from a value computed based on an arbitrary value assigned to a dynamic variable, and the color tone, density, and other parameters of the texture data to be read can be changed appropriately according to the assigned value of the dynamic variable.
  • shading with different shade colors can be displayed with natural transitions.
  • a plurality of texture data sets can be consolidated into a single texture data set, so that texture memory requirements can be reduced.

Abstract

The present invention has as an object to propose a texture mapping method which enables smooth shading, and is also appropriate for conserving memory resources. In order to achieve this object, in this invention, data regions with different color tones are set so as to form density gradients in the U coordinate direction and in the V coordinate direction of the texture data. If the brightness of the surface of the object to which texture mapping is performed is I, then among the coordinates to be read to access texture fdata, the U coordinate is calculated as U=a*I+b, and the V coordinate is determined from V=d. The value of the dynamic variable d can be set appropriately according to the application. Because the texture data is such that color tone density gradients are formed in two mutually orthogonal directions, smooth shading is possible, and a plurality of texture memory areas can be consolidated to conserve memory usage.

Description

    BACKGROUND OF THE INVENTION
  • 1. Field of the Invention
  • This invention relates to a data structure for texture data, and in particular to a data structure appropriate for cell shading.
  • 2. Description of the Related Art
  • In conventional computer graphics, a technique called cell shading is known as a method of texture mapping using multiple textures. Cell shading is also called toon shading; in this shading method, the distance between the object (the model) for texture mapping and the light source, as well as the angles made by normal vectors to the object surface, are used to compute texture data UV coordinates (read addresses) and brightnesses and colors are appropriately filtered and textures mapped to the object surface. FIG. 8 is a figure explaining the texture data used in conventional cell shading. The texture data 70 shown in the figure is used for shading processing from white to black when the brightness of the object surface exceeds a constant threshold, and in the normalized UV coordinate system (0.0≦U≦1.0 and 0.0≦V≦1.0), comprises data regions 71 in which “white” data (0.0≦U ≦0.5 and 0.0≦V≦1.0) is allocated as well as data regions 72 in which “black” data (0.5≦U≦1.0 and 0.0≦V≦1.0) is allocated. UV coordinates referenced during texture mapping can be computed using the following two equations.
    U=a*I+b  (1)
    V=c*I+d  (2)
  • Here I is the brightness value, computed from the inner product of the normalized normal vector to the object surface and the normalized light ray vector, and a, b, c, d are constants. Because the cell shading method is well known, the details of a, b, c, d are here omitted. If the brightness I can be computed, the UV coordinates for the texture data can be computed from equations (1) and (2). The movement locus of UV coordinates when the value of the brightness I is changed is similar to the straight line 73. As is clear from the figure, as a result of light source calculations, when setting the UV values at each vertex of the object, a small U value is specified and white texture mapping is performed at each portion for which the angle made by the object surface normal vector and the light ray vector is small and on which a large amount of light is incident; on the other hand, a large U value is specified and black texture mapping is performed at each portion for which the angle made by the object surface normal vector and the light ray vector is large and on which not much light is incident. In other words, when the U value exceeds 0.5, pixels on the object surface are shaded from white to black. Thus by performing shading processing using the two values of white and black, the difference between exposed faces and unexposed faces on the object surface can be made apparent, and so-called animation-style shading can be performed.
  • However, in conventional cell shading methods, it is necessary to prepare texture data for shading according to the light source color, distance between light source, and object, light intensity of the light source and other exposure conditions, and consequently there are the problems of additional labor for the designer, and waste of hardware resources. Further, in the past object details were represented in texture mapping by applying a two-dimensional design or pattern to a two-dimensional plane; but when texture mapping is employed for shading as described above, because texture data for shades suffices in only a single-dimension direction, the use of two-dimensional texture data as texture data for shading results in wasted memory. This problem is explained referring to FIGS. 9 and 10.
  • FIG. 9 explains a case in which the texture data to be used is changed according to the color of the light source; as the light sources illuminating the object 50, a red light source 41, green light source 42, and blue light source 43 are arranged in a virtual space. Three types of texture data are prepared for binary shading processing according to each light source color. In the state shown in the drawing, because the object 50 is in the position of the green light source 42, texture data for green shading processing is used to perform texture mapping. However, when the object 50 crosses the boundary 61 between the red light source 41 and green light source 42 to move to the side of the red light source 41, the texture data for the green light source 42 can no longer be used for shading, and shading must be performed using the texture data for the red light source 41. When the texture data to be used is suddenly changed at the border line 61, the shading displayed on the surface of the object 50 suddenly changes, and the appearance of the graphic display is extremely unnatural. The case in which the object 50 crosses the boundary 62 between the green light source 42 and blue light source 43 to move to the side of the blue light source 43 is similar.
  • FIG. 10 explains a case in which the texture data used is changed according to the positional relation between the camera (virtual viewpoint) and object; the light source 40, object 50, and camera 60 are arranged in prescribed positions. In three-dimensional computer graphics, each of the polygons comprised by the object 50 is modeling-transformed into world coordinates, and after performing field-of-view transformation to the camera viewpoint as seen from the camera 60, three-dimensional clipping processing, hidden surface elimination, texture mapping, shading processing, display priority processing, and other processing, the result is displayed on a video display. Because the shading to which the object 50 is subjected is viewed differently according to the distance between the camera 60 and object 50, texture data for a plurality of types of shading processing are prepared in advance, and when the distance between the object 50 and camera 60 exceeds a certain distance, the texture used in shading is changed. In the example of the drawing, when the object 50 crosses over the boundary 63 and moves farther from the camera 60, the texture used is changed. However, if the texture used changes suddenly at the boundary 63, the shades displayed on the surface of the object 50 changes suddenly, and the appearance of the graphic display is extremely unnatural.
  • However, of the texture data 70 shown in FIG. 8, the data actually used is only the data on the straight line 73, and the other data regions are not used, and the problem of considerable waste of memory for texture data storage has been noted.
  • SUMMARY OF THE INVENTION
  • An object of the present invention is to propose a data structure for texture data, a program to cause a computer system to execute texture mapping, and texture mapping method, and a texture mapping device which resolve the above-described problems and enable smooth shading while also conserving memory resources.
  • In order to resolve the above problems, this invention provides a method comprising a step in which, in order to access texture data comprising a computer-readable data region in which color data forming density gradients in two mutually orthogonal directions is arranged, coordinates are calculated in order to access the above data region in one of the directions among the above two directions, using brightness information of the object surface for texture mapping based on a prescribed equation; a step to calculate coordinates to access the above data region in the other direction of the above two directions based on an arbitrary value substituted into a dynamic variable; and, a step to read color data by accessing the above data region based on the calculated coordinates and perform texture mapping to the surface of the above object.
  • Further, the present invention can provide computer-readable recording media on which is recorded a computer program to cause a computer system to execute the above method. Such recording media may be, for example, optical recording media (such as CD-RAM, CD-ROM, DVD-RAM, DVD-ROM, DVD-R, PD discs, MD discs, MO discs, and other recording media the data of which can be read optically), magnetic recording media (such as flexible disks, magnetic cards, magnetic tape, and other recording media the data of which can be read magnetically), as well as memory cartridges comprising DRAM, SRAM, MRAM, FRAM, or other memory devices, and other transportable recording media.
  • Moreover, the above program can be distributed on demand from a Web server or other network server in response to a request from a client device (such as a personal computer, game equipment, portable telephone equipped with a Web browser, PDA, Palm-type PC, or other portable information terminal or similar) connected to the Internet or to a packet communication or other open network.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 is a drawing which explains texture data;
  • FIG. 2 is a drawing which explains texture data;
  • FIG. 3 is a drawing which explains texture mapping;
  • FIG. 4 is a drawing which explains texture mapping;
  • FIG. 5 is a drawing which explains texture mapping;
  • FIG. 6 is a drawing which explains texture mapping;
  • FIG. 7 is a functional block diagram of the generation of video signals;
  • FIG. 8 is a drawing which explains conventional texture data;
  • FIG. 9 is a drawing which explains conventional texture mapping; and,
  • FIG. 10 is a drawing which explains conventional texture mapping.
  • DESCRIPTION OF THE PREFERRED EMBODIMENTS
  • Below, aspects of this invention are explained, referring to the drawings.
  • FIG. 7 is a functional block diagram of texture mapping onto an object using texture data for shading, to output video signals to a video display. In the figure, 11 is texture memory in which is stored texture data, 12 is a filter, 13 is frame memory for writing one screen's worth of image data, and 14 is a video signal generation unit to output video signals to a video display. After the results of light source calculations corresponding to individual pixels on the object surface or the vertices of polygons comprised by the object, which are brightness data and color data corresponding to each pixel or to the vertices of polygons, are read from texture memory 11, filter computations are performed in the filter 12, referring to the brightness data and color data of surrounding pixels, and the processing results are written to frame memory 13. The video signal generator unit 14 generates video signals based on the image data written to the frame memory 13, and outputs the signals to a video display, not shown.
  • FIG. 1 is a drawing which explains the texture data of this aspect. The texture data 20 shown in the drawing is, for convenience in explanation, shown with the texture in a state of expansion in a two-dimensional plane; however, the state in which data is stored in the texture memory 11 need not necessarily be expanded in a two-dimensional plane, and the data structure of the texture data is identical so long as the interrelation between color data at arbitrary coordinates of the texture data shown in the drawing is satisfied. In other words, “data structure” in this specification does not signify the interrelation between individual data bits in the state in which the texture data is stored in memory or other recording media, but refers instead to the interrelation between color data at individual coordinates defined by texture data read addresses. Color data comprises, in the case of chromatic colors, information relating to brightness, hue, and color saturation, and in the case of achromatic colors, information relating to brightness (brightness and darkness). In the case of transparent colors, color data comprises information relating to transparency; in the case of colored translucence, color data comprises, in addition to transparency, information relating to brightness, hue, and saturation.
  • As shown in FIG. 3, the texture data 20 is prepared for use in shading of the object surface in cases where the object 50 moves in the lateral direction in the drawing under the red, green, and blue light sources 41, 42 and 43. In the texture data 20, white texture data is allocated in data region C10 in which 0.0≦U≦0.5 and 0.0≦V≦1.0, and texture data for use in shading for the light sources 41, 42, 43 is allocated at substantially equal intervals in data regions C1 to C9, in which 0.5≦U≦1.0 and 0.0≦V≦1.0. More specifically, C1 is deep red texture data, C2 is light red, C3 is a mixture of light red and light green, C4 is light green, C5 is dark green, C6 is light green, C7 is a mixture of light green and light blue, C8 is light blue, and C9 is dark blue texture data. That is, texture data for shading in a plurality of different color tones is arranged in the V coordinate direction, according to the positions of the light sources 41, 42 and 43. In the example shown in the drawing, for convenience in explanation, a density gradient is provided in nine stages; however, in actuality a finer density gradient, with several tens of stages, may be provided. Of course, setting the U coordinate and V coordinate of the texture in the opposite manner does not change the essence of this invention. By providing a density gradient which is appropriate to the application, various shading processing can be performed, from animation-style shading processing with binary shades, to comic-style shading processing with multi-value shades. In this aspect, when using the texture data 20 to perform shading, equation (1) is employed to compute the U value through light source calculations, and in place of equation (2), the following equation (3) is used to determine the V value.
    V=d  (3)
  • According to equation (3), the V value can be set by the value of the variable d, regardless of the brightness I. The variable d is a dynamic variable which can be changed arbitrarily by the program, and can, for example, be changed in realtime according to the distance between the light source and object; moreover, the variable d can be changed as appropriate according to an unfolding game situation in a virtual space (for example, according to whether a player is in a favorable situation or not, or whether the number of points scored is increased or not), regardless of the positional relation with the light source. The value to which the variable d is set can be decided appropriately by the programmer according to various applications, such as whether this invention is to be used for computer graphics art or for game applications.
  • For example, in the example of FIG. 1, if the value of d is set to 0.15, light red shading enables representation of a weak contrast, whereas if the value of d is set to 0.9, dark blue shading can be used to represent a strong contrast. If the value of d is defined in association with the distance from the light source, the value of d can be changed in realtime in concert with the positional relation between the light source and the object. For example, in the example of FIG. 3 a coordinate axis is set in the lateral direction in the drawing, and if the position of the light source 41 is set to d=0.0, the position of the light source 42 is set to d=0.5, and the position of the light source 43 is set to d=1.0, then as the object 50 approaches the light source 41, the value of d approaches to 0.0; as the object 50 approaches the light source 42, the value of d approaches 0.5; and as the object 50 approaches the light source 43, the value of d approaches 1.0. In the example of the drawing, the object 50 is slightly to the left of the position of the light source 42; if the value of d on the above coordinate axis is determined to be d=0.35, the color of shades on the surface of the object 50 will be light green.
  • In this way, by using the U value for shading, and using the V value for color tone control of the shades, smooth shading processing for light sources with three colors can be realized. And because there is no sudden change in the color tone of shades at a boundary set in advance by the positional relation with light sources, as in the prior art, smooth shading without abnormalities can be realized. Also, in the prior art it was necessary to prepare a plurality of texture data sets according to the number of light sources, but in the present aspect only one data set is necessary, so that the labor of a designer creating a plurality of texture data sets can be eliminated, and texture memory requirements can be reduced.
  • Another usage example employing the texture data of this aspect is explained below. If it is supposed that a density gradient is set such that the texture data gradually changes from dark black to light black as the value of d increases from 0.0 to 1.0, then the shade contrast can be changed in concert with the positional relation between light source and object. For example, in FIG. 4, a coordinate axis is set in the lateral direction in the drawing, and if the position of the light source 40 is d=0.0, then as the object moves away from the light source 40, the value of d changes from d=0.0 to d=1.0. For example, at d=0.3 the distance between the light source 40 and the object 50 is relatively small, so that shading is performed using shades with a comparatively strong contrast, whereas when d=0.8 the distance between the light source 40 and object 50 is relatively large, so that shading is performed using shades with a comparatively weak contrast. In other words, in moving away from the light source 40, the intensity of light incident on the object surface weakens in inverse proportion to the square of the distance, so that shading with gradually weaker contrast is performed, and an effect equivalent to the effect of lighting can be obtained.
  • FIG. 5 is a drawing explaining the case in which the value of d is changed in concert with the distance between the camera 60 and object 50 to perform shading. A coordinate axis is set in the lateral direction in the drawing, and if the position of the camera 60 is d=0.0, then the value of d changes from d=0.0 to d=1.0 as the object moves away from the camera 60. If it is supposed that a density gradient is set such that, as the value of d increases from 0.0 to 1.0, the texture data changes gradually from dark black to light black, then as the object moves away from the camera 60, shading is performed with gradually weaker contrast, and an effect similar to fog can be obtained.
  • This invention is not limited to cases in which the value of d is changed according to the distance between the light source or camera and the object to perform shading; for example, the light intensity of the light source may be associated with the value of d to perform shading. For example, if the value of d is 0.0 for a light source for which the light intensity is maximum, and the value of d is gradually increased as the light intensity gradually weakens, so that the value of d is 1.0 for a light source with minimum light intensity, then fine adjustment of the shade contrast can be performed according to the magnitude of the light intensity of the light source. However, in this case it is assumed that a density gradient is set such that, as the value of d increases from 0.0 to 1.0, the texture data changes gradually from dark black to light black. Further, as an example of setting of the d value, the value of d may be associated with the distance from the object to sea level, or with the distance between objects, or with other game parameters.
  • FIG. 2 shows another example of texture data. The texture data 30 shown in the drawing is arranged in a white data region C11, light gray data region C12, gray data region C13, dark gray data region C14, and black data region C15, so as to form curved density gradients in the U coordinate direction and in the V coordinate direction. Equation (1) is used to determine the U value of texture data 30 through light source calculations, and equation (3) is used to determine the V value. By using the texture data 30, the number of gray scales of the shades corresponding to the d value can be adjusted. For example, if the d value is 0.2, the V value can take the values of any of the data regions C11, C13, or C15, so that three values are possible for shades; if the d value is 0.8, the V value can take the values of any of the data regions from C11 to C15, so that five values are possible for shades. FIG. 6 explains an example of application of shading using the texture data 30; by increasing or decreasing the value of d in concert with the number of points obtained by a player in a game, the number of gray scales of shades is adjusted. In the example of the drawing, when there are no points, the number of gray scales is set to 3 by setting the d value to 0.2, and when there are numerous points, the number of gray scales is set to 5 by setting the d value to 0.8. Because the number of gray scales of the shades of a game character or other object can be adjusted freely in concert with the number of points acquired by a player, the atmosphere of a character can be freely changed from animation-style to comic-style as the game unfolds, so that the game can be made more amusing.
  • As explained above, by means of this aspect, the color tone of the texture is changed not only in the U coordinate direction, but in the V coordinate direction as well; hence it is possible, for example, to apply shading in a smooth transition from red shades to blue shades, and the color tone of the shades can be changed naturally and without abnormalities. And because the texture for shading has a design in advance, more complex drawing can easily be performed compared with the continuous changes of conventional fog. Also, whereas in the prior art a plurality of texture data sets were prepared corresponding to the number of light sources or other conditions, in this aspect the plurality of texture data sets can be consolidated into a single texture data set, so that the hit rate of the cache can be raised, and the drawing speed can be increased. Also, the V value can be specified independently and regardless of the brightness I, so that data regions in the entirety of the texture data can be utilized effectively, with no waste of texture memory.
  • According to this aspect, in addition to the number of color tons and number of stages of shades, highlights which appear in stages, increases and decreases in reflected light amounts, changes in the exposed area of the object surface, changes in color tones and color saturation, changes in transparency, and other parameters can be freely adjusted. And, by appropriately changing the setting of the d value, noise-like representations, as well as changes in light amounts which give a “dancing” effect as if light from a flame were incident, and changes in the area ratios of shaded portions and exposed portions, can be represented. Also, by changing the value of d at each vertex of the object, complicated point light sources can be represented, changes in the shades only of specific portions of the object surface can be represented, and a luster only at a specific portion can be represented. In addition to texture mapping to an object comprising polygons, this invention can also be used in texture mapping to NURBS and other curved surfaces.
  • By means of this invention, texture mapping is performed using texture data comprising computer-readable data regions in which color data is arranged forming density gradients in two mutually orthogonal directions, so that coordinates to access the texture data can be computed from a value computed from object surface brightness information using a prescribed equation and from a value computed based on an arbitrary value assigned to a dynamic variable, and the color tone, density, and other parameters of the texture data to be read can be changed appropriately according to the assigned value of the dynamic variable. Hence shading with different shade colors can be displayed with natural transitions. Also, a plurality of texture data sets can be consolidated into a single texture data set, so that texture memory requirements can be reduced.

Claims (4)

1-11. (canceled)
12. A texture mapping method, which maps a texture to an object, comprising:
calculating first coordinate information in order to access a data region of said texture data in one direction of two mutually orthogonal directions defined for the texture data, from information set for said object surface;
calculating second coordinate information in order to access a data region of said texture data in the other direction of said two mutually orthogonal directions, from information other than information set for said object surface;
reading color data from said texture data by accessing said data region based on said first and second coordinate information; and
performing texture mapping to said object surface.
13-21. (canceled)
22. A texture mapping device for mapping a texture to an object, comprising:
means for calculating first coordinate information in order to access a data region of texture data in one direction of two mutually orthogonal directions defined for said texture data from information set on the surface of said object;
means for calculating second coordinate information in order to access a data region of said texture data in the other direction of said two directions from information other than information set on the surface of said object; and
means for accessing said data region based on said first and second coordinate information to read color data from said texture data and to perform texture mapping to said object surface.
US11/706,993 2002-02-19 2007-02-16 Data structure for texture data, computer program product, and texture mapping method Abandoned US20070139435A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US11/706,993 US20070139435A1 (en) 2002-02-19 2007-02-16 Data structure for texture data, computer program product, and texture mapping method

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2002-042137 2002-02-19
JP2002042137A JP4075039B2 (en) 2002-02-19 2002-02-19 Texture mapping method, program and apparatus
US10/361,565 US7193630B2 (en) 2002-02-19 2003-02-11 Data structure for texture data, computer program product, and texture mapping method
US11/706,993 US20070139435A1 (en) 2002-02-19 2007-02-16 Data structure for texture data, computer program product, and texture mapping method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US10/361,565 Division US7193630B2 (en) 2002-02-19 2003-02-11 Data structure for texture data, computer program product, and texture mapping method

Publications (1)

Publication Number Publication Date
US20070139435A1 true US20070139435A1 (en) 2007-06-21

Family

ID=27678370

Family Applications (2)

Application Number Title Priority Date Filing Date
US10/361,565 Expired - Lifetime US7193630B2 (en) 2002-02-19 2003-02-11 Data structure for texture data, computer program product, and texture mapping method
US11/706,993 Abandoned US20070139435A1 (en) 2002-02-19 2007-02-16 Data structure for texture data, computer program product, and texture mapping method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US10/361,565 Expired - Lifetime US7193630B2 (en) 2002-02-19 2003-02-11 Data structure for texture data, computer program product, and texture mapping method

Country Status (2)

Country Link
US (2) US7193630B2 (en)
JP (1) JP4075039B2 (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3780954B2 (en) * 2002-02-06 2006-05-31 ソニー株式会社 Image generating apparatus and method
US9563980B2 (en) * 2005-11-18 2017-02-07 Autodesk, Inc. Grip manipulatable shadows in 3D models
CA2633680A1 (en) * 2005-12-20 2007-07-12 Mental Images Gmbh Modeling the three-dimensional shape of an object by shading of a two-dimensional image
JP5007633B2 (en) * 2007-09-04 2012-08-22 株式会社セガ Image processing program, computer-readable recording medium storing the program, image processing apparatus, and image processing method
US20120050494A1 (en) * 2010-08-27 2012-03-01 Xuemin Chen Method and system for creating a view-angle dependent 2d and/or 3d image/video utilizing a monoscopic video camera array
US9171401B2 (en) 2013-03-14 2015-10-27 Dreamworks Animation Llc Conservative partitioning for rendering a computer-generated animation
US9224239B2 (en) 2013-03-14 2015-12-29 Dreamworks Animation Llc Look-based selection for rendering a computer-generated animation
US9514562B2 (en) 2013-03-15 2016-12-06 Dreamworks Animation Llc Procedural partitioning of a scene
US9589382B2 (en) 2013-03-15 2017-03-07 Dreamworks Animation Llc Render setup graph
US9659398B2 (en) * 2013-03-15 2017-05-23 Dreamworks Animation Llc Multiple visual representations of lighting effects in a computer animation scene
US9208597B2 (en) 2013-03-15 2015-12-08 Dreamworks Animation Llc Generalized instancing for three-dimensional scene data
US9811936B2 (en) 2013-03-15 2017-11-07 Dreamworks Animation L.L.C. Level-based data sharing for digital content production
US9218785B2 (en) 2013-03-15 2015-12-22 Dreamworks Animation Llc Lighting correction filters
US9230294B2 (en) 2013-03-15 2016-01-05 Dreamworks Animation Llc Preserving and reusing intermediate data
US9626787B2 (en) 2013-03-15 2017-04-18 Dreamworks Animation Llc For node in render setup graph
CN104966312B (en) * 2014-06-10 2017-07-21 腾讯科技(深圳)有限公司 A kind of rendering intent, device and the terminal device of 3D models
CN109643467B (en) * 2016-07-29 2023-06-02 索尼公司 Image processing apparatus and image processing method
US10701244B2 (en) * 2016-09-30 2020-06-30 Microsoft Technology Licensing, Llc Recolorization of infrared image streams
US10922878B2 (en) * 2017-10-04 2021-02-16 Google Llc Lighting for inserted content
US11416159B2 (en) * 2019-04-29 2022-08-16 EMC IP Holding Company LLC Method and system for prioritizing critical data object storage during backup operations

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4609993A (en) * 1982-09-17 1986-09-02 Victor Company Of Japan, Limited Graphic display system having analog interpolators
US4835712A (en) * 1986-04-14 1989-05-30 Pixar Methods and apparatus for imaging volume data with shading
US4930010A (en) * 1988-01-11 1990-05-29 Crosfield Electronics Limited Apparatus for generating a two-dimensional coloured display
US5469274A (en) * 1992-03-12 1995-11-21 Sharp Kabushiki Kaisha Image processing apparatus for combining differently corrected images
US5489274A (en) * 1992-10-09 1996-02-06 Boston Scientific Corporation Rotatable medical valve closure
US5598185A (en) * 1994-06-10 1997-01-28 Integrated Image Solutions System for analyzing medical images having a particular color and intensity look-up table
US5974189A (en) * 1993-05-24 1999-10-26 Eastman Kodak Company Method and apparatus for modifying electronic image data
US6052127A (en) * 1996-12-30 2000-04-18 Cirrus Logic, Inc. Circuit for determining non-homogenous second order perspective texture mapping coordinates using linear interpolation
US6052126A (en) * 1992-05-15 2000-04-18 Fujitsu Limited Parallel processing three-dimensional drawing apparatus for simultaneously mapping a plurality of texture patterns
US6078312A (en) * 1997-07-09 2000-06-20 Gateway 2000, Inc. Pointing device with absolute and relative positioning capability
US20020060684A1 (en) * 2000-11-20 2002-05-23 Alcorn Byron A. Managing texture mapping data in a computer graphics system
US20030034981A1 (en) * 2001-07-27 2003-02-20 Sony Computer Entertainment Inc. Image rendering process
US6611609B1 (en) * 1999-04-09 2003-08-26 The Board Of Regents Of The University Of Nebraska Method of tracking changes in a multi-dimensional data structure
US6744440B1 (en) * 1999-09-10 2004-06-01 Sony Computer Entertainment Inc. Image processing apparatus, recording medium, and program
US6747660B1 (en) * 2000-05-12 2004-06-08 Microsoft Corporation Method and system for accelerating noise
US6751339B1 (en) * 1998-11-30 2004-06-15 Canon Kabushiki Kaisha Texture advisor
US6850242B1 (en) * 1999-09-09 2005-02-01 Namco Ltd. Image generating system and program
US6954219B2 (en) * 2001-12-12 2005-10-11 Stmicroelectronics, Inc. Method and system of continuously scaling video images
US6999093B1 (en) * 2003-01-08 2006-02-14 Microsoft Corporation Dynamic time-of-day sky box lighting

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4609993A (en) * 1982-09-17 1986-09-02 Victor Company Of Japan, Limited Graphic display system having analog interpolators
US4835712A (en) * 1986-04-14 1989-05-30 Pixar Methods and apparatus for imaging volume data with shading
US4930010A (en) * 1988-01-11 1990-05-29 Crosfield Electronics Limited Apparatus for generating a two-dimensional coloured display
US5469274A (en) * 1992-03-12 1995-11-21 Sharp Kabushiki Kaisha Image processing apparatus for combining differently corrected images
US6052126A (en) * 1992-05-15 2000-04-18 Fujitsu Limited Parallel processing three-dimensional drawing apparatus for simultaneously mapping a plurality of texture patterns
US5489274A (en) * 1992-10-09 1996-02-06 Boston Scientific Corporation Rotatable medical valve closure
US5974189A (en) * 1993-05-24 1999-10-26 Eastman Kodak Company Method and apparatus for modifying electronic image data
US5598185A (en) * 1994-06-10 1997-01-28 Integrated Image Solutions System for analyzing medical images having a particular color and intensity look-up table
US6052127A (en) * 1996-12-30 2000-04-18 Cirrus Logic, Inc. Circuit for determining non-homogenous second order perspective texture mapping coordinates using linear interpolation
US6078312A (en) * 1997-07-09 2000-06-20 Gateway 2000, Inc. Pointing device with absolute and relative positioning capability
US6751339B1 (en) * 1998-11-30 2004-06-15 Canon Kabushiki Kaisha Texture advisor
US6611609B1 (en) * 1999-04-09 2003-08-26 The Board Of Regents Of The University Of Nebraska Method of tracking changes in a multi-dimensional data structure
US6850242B1 (en) * 1999-09-09 2005-02-01 Namco Ltd. Image generating system and program
US6744440B1 (en) * 1999-09-10 2004-06-01 Sony Computer Entertainment Inc. Image processing apparatus, recording medium, and program
US6747660B1 (en) * 2000-05-12 2004-06-08 Microsoft Corporation Method and system for accelerating noise
US20020060684A1 (en) * 2000-11-20 2002-05-23 Alcorn Byron A. Managing texture mapping data in a computer graphics system
US20030034981A1 (en) * 2001-07-27 2003-02-20 Sony Computer Entertainment Inc. Image rendering process
US6954219B2 (en) * 2001-12-12 2005-10-11 Stmicroelectronics, Inc. Method and system of continuously scaling video images
US6999093B1 (en) * 2003-01-08 2006-02-14 Microsoft Corporation Dynamic time-of-day sky box lighting

Also Published As

Publication number Publication date
JP2003242520A (en) 2003-08-29
US7193630B2 (en) 2007-03-20
US20030156117A1 (en) 2003-08-21
JP4075039B2 (en) 2008-04-16

Similar Documents

Publication Publication Date Title
US20070139435A1 (en) Data structure for texture data, computer program product, and texture mapping method
US5522018A (en) Sorting processing system and image synthesizing system using the same
Lake et al. Stylized rendering techniques for scalable real-time 3d animation
US7583264B2 (en) Apparatus and program for image generation
US8896622B2 (en) Methods and apparatus for marker-based stylistic rendering
US7889208B1 (en) Z-texture mapping system, method and computer program product
US7542033B2 (en) Method and program for generating a two-dimensional cartoonish picturization of a three-dimensional object
US6078333A (en) Images and apparatus for carrying out the method
US8159499B2 (en) Rendering of shadows with hand-painted appearance
US7327364B2 (en) Method and apparatus for rendering three-dimensional images of objects with hand-drawn appearance in real time
US7064753B2 (en) Image generating method, storage medium, image generating apparatus, data signal and program
US7133052B1 (en) Morph map based simulated real-time rendering
JP3502796B2 (en) 3D model display method and apparatus in video game, game apparatus, and computer-readable recording medium storing 3D model display program for video game
US8842913B2 (en) Saturation varying color space
US8942476B1 (en) Saturation varying and lighting independent color color control for computer graphics
JP2003168130A (en) System for previewing photorealistic rendering of synthetic scene in real-time
KR100295709B1 (en) Spotlight characteristic forming method and image processor using the same
JP4617501B2 (en) Texture mapping method, program and apparatus
Yang et al. Real-time ray traced caustics
CN113936080A (en) Rendering method and device of virtual model, storage medium and electronic equipment
JP2001070634A (en) Game machine and its playing method
US6674918B1 (en) Image synthesis by illuminating a virtual deviation-mapped surface
Papaioannou et al. Enhancing Virtual Reality Walkthroughs of Archaeological Sites.
US6646650B2 (en) Image generating apparatus and image generating program
US20040233196A1 (en) Logic arrangements storage mediums, and methods for generating digital images using brush strokes

Legal Events

Date Code Title Description
STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION