CN101300602A - True sketch - Google Patents
True sketch Download PDFInfo
- Publication number
- CN101300602A CN101300602A CNA2006800410866A CN200680041086A CN101300602A CN 101300602 A CN101300602 A CN 101300602A CN A2006800410866 A CNA2006800410866 A CN A2006800410866A CN 200680041086 A CN200680041086 A CN 200680041086A CN 101300602 A CN101300602 A CN 101300602A
- Authority
- CN
- China
- Prior art keywords
- sketch
- geometric model
- user
- texture
- rendering
- 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
Images
Landscapes
- Processing Or Creating Images (AREA)
Abstract
Description
背景技术 Background technique
实现真实性是计算机图形学的一个主要目标,并且已经提出了范围从光与几何形状的基于物理学的建模到基于图象的绘制(IBR)的许多方法。逼真的影象已经革命性地改变了可视化过程,允许对未建造的场景进行呈现和探索。然而,尽管专业软件图形应用诸如AutoCAD等可用于创建逼真绘制的新内容,但是这些应用仍然是乏味且非常耗时的。该问题在对内容进行设计时更为恶化。二维半(2.5D)建模系统一般不便于使用且因此不适于设计的早期阶段,除非设计已经得到很好的规划。而且,2.5D建模过程需要对象创建以及向表面应用纹理的专业知识。Achieving realism is a major goal of computer graphics, and many approaches ranging from physics-based modeling of light and geometry to image-based rendering (IBR) have been proposed. Photorealistic imagery has revolutionized the visualization process, allowing unbuilt scenes to be represented and explored. However, although professional software graphics applications such as AutoCAD can be used to create realistically drawn new content, these applications are still tedious and very time consuming. This problem is exacerbated when designing content. Two-and-a-half-dimensional (2.5D) modeling systems are generally inconvenient to use and thus not suitable for the early stages of design unless the design has been well planned. Also, the 2.5D modeling process requires expertise in object creation and applying textures to surfaces.
发明内容 Contents of the invention
描述用于草绘真实(sketching reality)的系统和方法。在一个方面,根据2-D草图标识一组向量图元。在一个实现中,2-D草图是由用户手绘的。2.5D几何模型是从向量图元自动生成的。为用户自动绘制并呈现2.5D几何模型。在一个实现中,用户提供基于2-D草图的用户输入以修改以下各项中的一或多项:呈现的照明位置、照明方向、照明强度、纹理、颜色和几何形状。Systems and methods for sketching reality are described. In one aspect, a set of vector primitives is identified from the 2-D sketch. In one implementation, the 2-D sketch is drawn by hand by the user. 2.5D geometric models are automatically generated from vector primitives. Automatically draw and present 2.5D geometric models for users. In one implementation, the user provides 2-D sketch-based user input to modify one or more of: rendered lighting position, lighting direction, lighting intensity, texture, color, and geometry.
提供本概述是为了用简化的形式介绍将在以下详细描述中进一步描述的一些概念。本概述并不旨在标识要求保护的主题的关键特征或本质特征,也不旨在用于帮助确定要求保护的主题的范围。This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
附图说明 Description of drawings
图1示出按照一个实施例的用于草绘真实的示例系统。Figure 1 illustrates an example system for sketching a reality, according to one embodiment.
图2示出按照一个实现的草绘真实操作的示例概观。Figure 2 shows an example overview of sketching real operations according to one implementation.
图3示出按照一个实施例的一组示例性草图和图象表示。Figure 3 shows an exemplary set of sketches and image representations according to one embodiment.
图4示例性地图示了按照一个实施例的建筑设计,用于示出可按照线方向和消失点来分类线。Figure 4 exemplarily illustrates a building design according to one embodiment to show that lines can be sorted by line direction and vanishing point.
图5示出按照一个实施例的线l与消失点vp之间的距离函数d(l,vp)的示例性图示。Fig. 5 shows an exemplary illustration of a distance function d(l, vp) between a line l and a vanishing point vp according to one embodiment.
图6示出按照一个实施例的第一组示例性线段接合点(junction)。Figure 6 illustrates a first set of exemplary line segment junctions, according to one embodiment.
图7示出按照一个实施例的通过输入2-D草图标识的顶点以及相应的接合点标签。FIG. 7 illustrates vertices identified by inputting a 2-D sketch and corresponding junction labels, according to one embodiment.
图8示出按照一个实施例的一组示例性顶点面指派。Figure 8 shows an exemplary set of vertex face assignments according to one embodiment.
图9示出按照一个实施例的四种分割形状/多边形的示例性类型。Figure 9 shows four exemplary types of segmentation shapes/polygons according to one embodiment.
图10示出按照一个实施例的三种被遮蔽形状的示例性类型。Figure 10 illustrates three exemplary types of shaded shapes, according to one embodiment.
图11示出按照一个实施例的被遮蔽形状的另一个示例。Figure 11 shows another example of shaded shapes according to one embodiment.
图12是按照一个实施例示出具有不是作为属于同一对象的T接合点一部分的一个公共顶点的区域的示例性图示。FIG. 12 is an exemplary illustration showing regions having a common vertex that is not part of T-junctions belonging to the same object, according to one embodiment.
图13示出按照一个实施例的一组示例性的用于重建2-D草图的不明确部分的通用建筑组件。Figure 13 shows an exemplary set of generic building components for reconstructing ambiguous portions of a 2-D sketch, according to one embodiment.
图14示出按照一个实施例用于从2-D草图产生真实感绘制(photorealisticrendering)的示例性基于草图的交互用户界面(UI)1400。FIG. 14 illustrates an exemplary sketch-based interactive user interface (UI) 1400 for photorealistic rendering from 2-D sketches, according to one embodiment.
图15示出图14示例性基于草图的交互用户界面,不同之处在于所呈现的示例性绘制与图14所示的真实感绘制相比为非真实感的(non-photorealistic)。FIG. 15 illustrates the exemplary sketch-based interactive user interface of FIG. 14 except that the exemplary rendering presented is non-photorealistic compared to the photorealistic rendering shown in FIG. 14 .
图16示出按照一个实施例指定照明方向和阴影强度的示例性图示。Figure 16 shows an exemplary illustration of specifying lighting direction and shadow intensity according to one embodiment.
图17示出按照一个实施例示例地指定阴影表面的边界。Figure 17 illustrates exemplary designation of the boundaries of a shadow surface according to one embodiment.
图18示出按照一个实施例的用于草绘真实的示例性过程。Figure 18 illustrates an exemplary process for sketching a reality, according to one embodiment.
具体实施方式 Detailed ways
概观Overview
尽管在建模和绘制方面有进步,但设计者仍然偏爱通过徒手草绘来进行概念设计。草绘作为艺术媒体的吸引力在于其在表示、探测和交流几何创意方面的低开销。确实,这样的构思表示在精神与目的上根本不同于设计者最后用于呈现设计的媒体。以下将参考图1至18描述用于草绘真实的系统和方法,它为用户提供了一种从概念设计徒手绘画转移到真实感或非真实感呈现绘制的无缝方式。这与从输入的真实感图象产生非真实感绘制的常规系统和方法形成了对照。Despite advances in modeling and drawing, designers still prefer freehand sketching for conceptual design. The appeal of sketching as an artistic medium lies in its low overhead in representing, probing, and communicating geometric ideas. Indeed, such conceptual representations are radically different in spirit and purpose from the medium in which the designer ultimately presents the design. A system and method for sketching realism will be described below with reference to FIGS. 1 to 18 , which provides a seamless way for users to move from freehand drawing of concept designs to drawing for photorealistic or non-photorealistic rendering. This is in contrast to conventional systems and methods that generate non-photorealistic renderings from input photorealistic images.
更具体地,用于草绘真实的系统和方法解释徒手画(2-D草图)以产生真实性的成象。在该实现中且为了示例性说明目的,用于草绘真实的系统和方法被应用于基于建筑的绘图。在不同的实现中,用于草绘真实的系统和方法被应用于不是基于建筑的徒手绘画。在该实现中,用于草绘真实的系统和方法响应于接收或者以其他方式获得手绘草图输入(例如2-D草图),从该草图输入生成2.5D几何模型,并且允许用户提供基于草图的输入来对2.5D模型的外观进行精制以向用户进行绘制和呈现。2.5D模型指的是一种在其中深度信息可从单个视点获得的场景表示,而3D模型具有各个视点的深度。2.5D模型可视为不完全的3D模型。例如,增加了深度信息的2D上色就成为2.5D模型。More specifically, the system and method for sketching reality interprets freehand drawing (2-D sketching) to produce realistic imagery. In this implementation and for illustrative purposes, the systems and methods for sketching reality are applied to architectural-based drawings. In various implementations, the systems and methods for sketching reality are applied to freehand drawings that are not architecturally based. In this implementation, the system and method for sketching reality is responsive to receiving or otherwise obtaining freehand sketch input (e.g., a 2-D sketch), generating a 2.5D geometric model from the sketch input, and allowing the user to provide sketch-based Input to refine the appearance of the 2.5D model for drawing and presentation to the user. A 2.5D model refers to a scene representation in which depth information is available from a single viewpoint, while a 3D model has depth for each viewpoint. 2.5D models can be regarded as incomplete 3D models. For example, a 2D shader with added depth information becomes a 2.5D model.
更具体地,例如,用户使用简单输入设备接口诸如电子图形输入板来绘制一建筑物。该系统和方法随后分析所绘制的线以标识接合点和2.5D平行线组集,由此产生2.5D几何模型/表示。在一个实现中,用户通过纹理选择操作(例如通过在2-D草图上绘制纹理的粗糙外表)以及照明方向指定(例如通过在表面上手绘影线)来精制所得到的2.5D几何模型的外观。在一个实现中,最终的产品是手绘草图的逼真绘制/版本,这随后可用作动画的一部分或者编辑到照片中。More specifically, for example, a user draws a building using a simple input device interface such as an electronic tablet. The system and method then analyzes the drawn lines to identify junctions and sets of 2.5D parallel lines, thereby generating a 2.5D geometric model/representation. In one implementation, the user refines the appearance of the resulting 2.5D geometric model through texture selection operations (e.g., by painting the textured rough surface on a 2-D sketch) and lighting direction specification (e.g., by hand-painting hatching on the surface) . In one implementation, the final product is a realistic rendering/version of the hand-drawn sketch, which can then be used as part of an animation or edited into a photograph.
现在更详细地描述用于草绘真实的系统和方法的这些和其它方面。These and other aspects of the systems and methods for sketching the reality are now described in more detail.
示例系统example system
尽管不是必需的,但用于草绘真实的系统和方法是在由计算设备诸如个人计算机执行的计算机可执行指令的一般语境中描述的。程序模块一般包括例程、程序、对象、组件、数据结构等,它们执行特定的任务或者实现特定的抽象数据类型。尽管在上述语境中描述该系统和方法,但此后所述的动作和操作也可用硬件实现。Although not required, the systems and methods for sketching realities are described in the general context of computer-executable instructions being executed by a computing device, such as a personal computer. Program modules generally include routines, programs, objects, components, data structures, etc., which perform specific tasks or implement specific abstract data types. Although the systems and methods are described in the above context, acts and operations described hereinafter may also be implemented in hardware.
图1示出按照一个实施例的用于草绘真实的示例系统。系统100包括计算设备102,例如通用计算设备、服务器、膝上型、移动计算设备等等。计算设备102包括一或多个处理器104,它们耦合到实体的计算机可读存储介质(系统存储器106)。处理器108可以是微处理器、微型计算机、微控制器、数字信号处理器等等。系统存储器106包括例如易失性随机存取存储器(例如RAM)和非易失性只读存储器(例如ROM、闪存等)。系统存储器106包括能由处理器104执行的计算机程序指令以及由这些计算机程序指令中相应的一些产生和/或使用的程序数据。这些计算机程序指令以及程序数据分别示为程序模块108和程序数据110。程序模块108包括例如草绘真实模块112和“其它程序模块”114,如用于提供运行时环境的操作系统(OS)以及包括诸如设备驱动程序等的其它应用。Figure 1 illustrates an example system for sketching a reality, according to one embodiment.
草绘真实模块112自动从一或多个对象的手绘2-D草图118生成21/2维(2.5D)几何模型116,从而基于2.5D几何模型116和一或多个用户输入向用户呈现基于草图的真实感或非真实感绘制。在一个实现中,2-D草图118表示建筑设计。非真实感图象是看来像是通过手、水彩画、笔墨图、油画等等制作出来的图象(或动画)。草绘真实模块112在用户界面(UI)中向用户呈现绘制结果120。为了示例说明,这样的用户界面被示为“其它程序数据”122的相应部分(也请参考下述图14和15)。用户与UI交互,例如通过在输入设备124(例如图形板等)上重新绘制或者以其他方式修改2-D草图118来更新2.5D模型的几何形状。另外,用户可经由UI向2-D草图118添加可视提示(用户输入)以交互地控制绘制120的照明(位置、方向和强度)以及纹理,以及指定与绘制120相关联的材质色化处理等。响应于2.5D模型116的创建以及用于指定照明、纹理、颜色和/或其它参数的基于草图的用户交互,草绘真实模块112基于2.5D模型116和用户输入绘制真实感或非真实感结果120。The
图2示出按照一个实现的草绘真实模块112操作的示例性概观。如所示的且在该实现中,草绘真实模块112的操作包括四个不同阶段:(1)输入阶段,(2)几何模型重建阶段,(3)对外观的交互精制阶段以及(4)输出/呈现阶段。在输入阶段,草绘真实模块112获得手绘2-D草图118。在一个实现中,草绘真实模块112包括允许用户直接使用输入设备124(例如电子图形输入板等)绘制2-D输入草图118以供在显示设备126上的UI 122中呈现的逻辑。在一个实现中,显示设备126包括触摸屏,它允许用户直接在显示设备126上绘制2-D输入草图118。在另一个实现中,草绘真实模块112从数据存储(例如程序数据110的相应部分)、输入设备124(例如扫描仪、远程存储等)等等加载输入的草图118,以供在显示设备126上向用户呈现。在一个实现中,使用不同的应用(示为“其它程序模块”114的相应部分)来产生2-D输入草图118。FIG. 2 shows an exemplary overview of the operation of
参考图2,在第二阶段,或即几何模型重建阶段,草绘真实模块112通过估算输入2-D草图118的线中相应一些并将它们解释为通过透视看到的结构的边来产生2.5D几何形状116。在第三阶段,或即对外观进行交互精制阶段,用户指定纹理、照明方向、颜色等中的一或多项。在第四阶段,或即输出阶段,草绘真实模块112从2.5D模型116按照用户输入产生绘制以通过显示设备126向用户呈现基于草图的绘制结果120。图3示出按照一个实施例的草图和图象表示的示例集合。具体地,(a)表示示例2-D输入草图118;(b)表示示例输入草图的示例2.5D模型表示116;(c)表示在用户指定了纹理和照明指派之后示例2.5D模型116的示例外观;以及(d)表示最终的基于草图的示例性绘制结果120(照片合成)。2-D草图118是由一组向量线或曲线组成的草图。Referring to FIG. 2, in the second stage, or geometric model reconstruction stage, the
示例性几何模型重建Exemplary geometry reconstruction
在该实现中,草绘真实模块112的几何模型重建操作通过分析输入的2-D草图118标识(在3-D中)相互垂直线的组集、消失点以及照相机固有参数。接着,草绘真实模块112标识与所标识的线段中每一顶点相关联的接合点类型,并且将各顶点的有序集合与2.5D模型116的每个阶段相关联。这些操作之后是估计这些顶点的3-D位置,至此就标识了2.5D模型116的几何形状。In this implementation, the geometric model reconstruction operation of the
标识向量图元Identify vector primitives
草绘真实模块112标识与2-D输入草图118相关联的向量图元(例如点和线)。这些向量图元示为“其它程序数据”122的相应部分。由于所标识的线可能不是笔直的(例如弯弯曲曲或者非直线型的手绘线),草绘真实模块112向量化所标识的线以产生笔直的线和相应的向量数据。表1示出通过从手绘2-D草图118向量化(即生成线向量)线段来产生示例性数据集合。The
在表1的示例中,草绘真实模块112确定2-D草图118包括20条线。在一个实现中,使用最小平方法来拟合笔直线并且使用立方贝塞尔曲线来拟合曲线。对于手绘线或曲线,线向量/曲线用两个端点A、B来产生。在该实现中,线段可以表示直线或曲线。In the example of Table 1, sketch
草绘真实模块112从所标识的向量图元生成图结构G=(V,E),其中V是线的所有端点集合而E是线的集合。图结构示为“其它程序数据”122的相应部分。图结构指示所标识的点中相应的一些与笔直化线(即向量图元)之间的空间关系。V{vi},i=0...nv是草图118的所有点的集合。此外,E{li},i=0...nl是草图118中所有线的集合,其中li的两个端点在V中。草绘真实模块112使用图结构来将线分类为左、右或竖向并且标识线段消失点。这些分类和消失点随后用于标识线段端点接合点/交叉类型的集合。使用所标识的线段、所标识的线段接合点类型和所述的线连通性概率准则,草绘真实模块112如下所述将所标识的线段中相应的一些映射成2.5D模型116的相应表面/多边形。The sketch-
线分析line analysis
大多数建筑草图是由在3-D空间中相互正交的线组成:左、右或竖向(分别为X、Y和Z)。用于草绘真实的系统100利用该特性来确定线的组集,通过该线的组集估计消失点(vps)。图4示例性例示按照一个实施例的建筑设计,它用于说明可按照线方向和消失点分类线。在图4的示例中,2-D草图包括两个消失点:左消失点和右消失点。在另一个实现中,2-D草图可包括一个消失点或三个消失点。当设计师绘制2-D草图118时,建筑师可选择一、二或三个消失点。如果在2-D草图中仅存在一个与大多数线相关联的交叉,则仅存在一个消失点。在该情形中,经过该消失点的线对应于在与2-D草图相关联的世界坐标系统中的Y方向。K=0的线对应于世界坐标系统中X方向的竖向线(k是线的斜率,k=0指示水平线,而k=∞指示竖向线)。K=∞的线对应世界坐标中Y方向的水平线。Most architectural sketches consist of lines that are mutually orthogonal in 3-D space: left, right, or vertical (X, Y, and Z, respectively). The
为构建几何模型116,草绘真实模块如下为2-D草图118中每一对线确定假设的消失点vp,并且聚集所有其它线的拟合。给定线l和假设的消失点vp,草绘真实模块112按照以下公式计算拟合的度量:To construct the
g(l,vp)=1-d(l,vp)/Ta (1)g(l, v p )=1-d(l, v p )/T a (1)
其中d(l,vp)是2-D草图118中线l与消失点vp之间的距离(d)函数,Ta是该距离的阈限(例如敏感度参数)。在该实现中,阈限设为0.35。在不同的实现中,该阈限可设置为不同的值。where d(l, vp ) is a function of the distance (d) between line l and the vanishing point vp in the 2-
图5例示按照一个实施例的线l与消失点之间距离函数d(l,vp)。参考图5,(a)表示无限消失点,并且示出示例距离是线段l与无限消失点的方向之间的角度a。参考图5(b),示出了有限消失点,其中距离为线段l的中点与有限消失点之间的角度a。如果消失点是有限的:d(l,vp)=角度(l,V(vp))。如果消失点是无限的:d(l,vp)=角度(l,l(vp,中点))。Fig. 5 illustrates a distance function d(l, vp ) between a line l and a vanishing point according to one embodiment. Referring to FIG. 5 , (a) represents an infinite vanishing point, and shows that an example distance is an angle a between a line segment l and the direction of the infinite vanishing point. Referring to Fig. 5(b), a finite vanishing point is shown, where the distance is the angle a between the midpoint of the line segment l and the finite vanishing point. If the vanishing point is finite: d(l, v p ) = angle (l, V(v p )). If the vanishing point is infinite: d(l, vp )=angle(l,l( vp ,midpoint)).
接合点识别Junction identification
图6示出按照一个实施例的线段接合点的第一示例集合600。在该实现中,接合点类型是Y、T、L、E和X型接合点。在不同的实现中,可使用不同的接合点类型。接合点是二或多条线之间的交叉点。一旦2-D草图118的线已经按确定的对应消失点分组,则草绘真实模块112就确定每个顶点处的接合点类型,并将2.5D模型116的每一个面与顶点的有序列表相关联。为确定共用顶点的相应接合点类型,草绘真实模块112基于线段交叉的角度以及交叉线的数量来确定接合点分类。Y型接合点表示三个可见表面相交的公共顶点。T型接合点发生在一个表面被另一表面遮蔽时,或者在其表面之上本身存在分割线时。L型接合点是面的一个角,而E型接合点发生在两个可见面沿一条公共线汇合。更一般地,X型接合点是若干面汇合于一个公共顶点的结果。图7示出按照一个实施例的通过输入2-D草图118标识的顶点以及相应的接合点标签。在本例中,一组共用顶点和相应的接合点(Y、T、L、E和X)画上了圆圈并且加了标签。FIG. 6 illustrates a first example set 600 of line segment joins, according to one embodiment. In this implementation, the junction types are Y, T, L, E, and X junctions. In different implementations, different junction types may be used. A junction is an intersection between two or more lines. Once the lines of the 2-
示例性地将有序顶点指派给面Exemplary assignment of ordered vertices to faces
一旦已经确定了与线方向相关联的接合点类型和消失点,则草绘真实模块112通过关联每一个面的顶点的有序列表来确定2.5D模型116的拓扑结构。图G=(V,E)表示该拓扑结构,它编码线E与顶点V之间的连接信息。草绘真实模块112将来自面的单个任意顶点中的顶点(这些面包含该顶点)指派给其它顶点(它们是这些面的一部分),并依次类推。当检查具有顶点V的面F以确定其边界线时,候选线是连接到顶点V的那些线。在一个实现中,使用贪心算法来选择具有作为该面的边的最大可能性的线。在几何上,同一面的线不可能对应于与三个正交方向相关联的三个消失点。Once the junction types and vanishing points associated with the line directions have been determined, the
例如,假设当前面具有k条有序线l0,...,lk-1,并且lk是候选线。还假设该面由关联于两个消失点vpa和vpb的线作为边界。定义F是有效面的可能性为:For example, suppose there are currently k ordered lines l 0 , ..., l k-1 in front, and l k is a candidate line. Suppose also that the surface is bounded by lines associated with two vanishing points v pa and v pb . The probability that F is defined as a valid face is:
项p(vp)描述消失点vp与F一致的可能性,即p(vp)=maxig(li,vp),其中g()在(1)中定义。项p(li,vpa,vpb)是线li对应于F的消失点的可能性的度量,并且被定义为p(li,vpa,vpb)=larger(g(li,vpa),g(li,vpb)),其中larger()返回两个输入参数的较大者。The term p(v p ) describes the probability that the vanishing point v p coincides with F, ie p(v p ) = max i g( li , v p ), where g() is defined in (1). The term p(l i , v pa , v pb ) is a measure of the likelihood that line l i corresponds to the vanishing point of F, and is defined as p(l i , v pa , v pb )=larger(g(l i , v pa ), g(l i , v pb )), where larger() returns the larger of the two input arguments.
给出三个消失点vp0、vp1和vp2,草绘真实模块112选择生成p(F有效|l0,...,lk,vpa,vpb)的最大值的消失点对作为面F的消失点。如果最大的p(F有效|l0,...,lk,vpa,vpa)较小,则考虑面不是有效的;在此情形中,在当前顶点处终止传播。Given three vanishing points v p0 , v p1 and v p2 , the sketch
图8示出按照一个实施例的顶点面指派的顶点的示例集合。从任意一个顶点开始,在此例中为图8(a)的V0,草绘真实模块112按照接合点的局部特征指派新的面。由于此例的起始顶点对应于Y接合点,因此有了三个新的面(具有最初指派的顶点):F0:V1-V0-V3,F1:V4-V0-V1和F2:V4-V0-V3,如图8(b)所示。草绘真实模块112沿每个面的边遍历以获得封闭的形状。例如,参考图8(b)的面F0,并从V3开始,存在两条候选线:V3-V2和V3-V6。草绘真实模块112选择V3-V2因为它封闭了F0的环。该环因而为V1-V0-V3-V2-V1,如图8(c)所示。参考面F1并从V1开始,草绘真实模块112向V7和V8前进。然而,传播结束因为V8-V9与该面不一致,如图8(d)所示。因此,草绘真实模块112代之以从另一端传播至V4,然后至V5。由于V4-V5是被遮蔽的线(V5是T型接合点),因此传播再次终止。在此例中,以不完整的环结束V5-V4-V0-V1-V7-V8,如图8(e)所示。参考面F2,通过直接遍历,草绘真实模块112确定顶点V4-V0-V3-V6-V4。在该点处且在此例中,草绘真实模块112进行至作为至少一个未指派面的一部分的另一顶点以重复上述顶点指派操作。最后,得到了在图8中被指派了相应顶点的每个面的结果,如图8(f)所示。Figure 8 illustrates an example set of vertices for vertex face assignment, according to one embodiment. Starting from an arbitrary vertex, in this case V0 of FIG. 8( a ), the
形状分割或完成shape split or complete
由T型接合点引起的不完整区域可由现有形状上的一或多个条分割线或被遮蔽的平面所致。图9示出按照一个实施例的四种示例性的分割形状/多边形。当生成2-D草图118时,建筑师一般在现有平面上画线以将其分成若干区域。分割线不被分类为任何区域的边界。下图示出分割线的一些情形。在该例中,画有圆圈的端点表示关键接合点。在这些示例中,XY(左、右)线包含在一个完整的形状中。因此草绘真实模块112将完整的形状分割成包含在完整形状内的若干子形状。这些结果符合图9中所示的分割形状的四种类型之一。对于从左向右的线段,使用下列一组形状分割准则(或分割形状完成准则):Incomplete areas caused by T-junctions can be caused by one or more dividing lines or obscured planes on the existing shape. Figure 9 illustrates four exemplary segmentation shapes/polygons according to one embodiment. When generating 2-
·参考图9,区域(a)或即图9(a),存在四个接合点:具有四个T型接合点的两条交叉线;在四边形的每条边上的每个接合点。因此四边形被分割成四个四边形。• Referring to Figure 9, area (a) or ie Figure 9(a), there are four junctions: two intersecting lines with four T-junctions; each junction on each side of the quadrilateral. So the quadrilateral is split into four quadrilaterals.
·参考图9(b),两个接合点在四边形的对边上;四边形被分割成两个四边形。• Referring to Figure 9(b), the two junctions are on opposite sides of the quadrilateral; the quadrilateral is split into two quadrilaterals.
·参考图9(c),两个T型接合点在同一条线上;四边形被分割成大小两块。· Referring to Figure 9(c), the two T-junctions are on the same line; the quadrilateral is divided into two large and small pieces.
·参考图9(d),两个接合点在两条连接线上。四边形被分割成大小两块。• Referring to Figure 9(d), the two junctions are on the two connecting lines. The quadrilateral is divided into two large and small pieces.
图10示出按照一个实施例的三种示例性被遮蔽的形状。在这些示例中,画有圆圈的端点表示T型接合点。在被遮蔽的形状中,接合点的WXZ线(左、右、竖方向)是该形状的被遮蔽线。草绘真实模块112添加新的线段考虑一组被遮蔽形状完成准则用平行与垂直约束来完成该形状。更具体地且在该实现中,为创建正确的形状,草绘真实模块112在T型接合点数据库中定位最佳匹配。参考图10(a),一个接合点的XW与另一个接合点的ZX相同。在该情形中,草绘真实模块112添加与每个接合点的X点连接线平行的线,并且选择一条边以形成较大的形状。参考图10(b),在此情形中一个接合点的XW不同于其它接合点的ZX,草绘真实模块112扩展每个接合点的YX方向;交叉是该形状的被添加的顶点。参考图10(c),这里仅有一个T型接合点。在该情形中,草绘真实模块112定位与XY平行的最后一条线以完成该线的X和端点之间的形状,如上参考图10(a)所述。图10示出按照一个实施例的一组示例性的附加线(虚线),草绘真实的系统和方法使用这些线来完成一或多个相应的被遮蔽形状。Figure 10 illustrates three exemplary shaded shapes, according to one embodiment. In these examples, the circled endpoints represent T-junctions. In a shaded shape, the WXZ line (left, right, vertical direction) of the junction is the shaded line of the shape. The
图11示出按照一个实施例的被遮蔽形状的另一个示例。图11(a)示出关联于T型接合点和Y型接合点顶点的被遮蔽形状。图11(b)示出关联于具有两个T型接合点的顶点的被遮蔽形状。图11的最后两个示例是特殊的,因为T型接合点的两条底线是平行的并且找不到交叉点。在此情形中,草绘真实模块112检查不完整的面是否包含在另一个面中,如上在分割形状情形中所述,用于简单地连接两个T型接合点(图11(c))。否则,草绘真实模块112尝试找出要连接的一个不同的面,如图11(d)所示。Figure 11 shows another example of shaded shapes according to one embodiment. Figure 11(a) shows the shaded shapes associated with T-junction and Y-junction vertices. Figure 11(b) shows the shaded shape associated to a vertex with two T-junctions. The last two examples of Figure 11 are special because the two bottom lines of the T-junction are parallel and no intersection can be found. In this case, the
随着草绘真实模块112定位表示2.5D模型116表面的封闭形状,草绘真实模块112估计这些形状之间的关系以确定一或多个小形状是否被包含在一个较大的形状中。从封闭形状形成的顺序和所确定的形状包含关系,草绘真实模块112确定这些形状的一般位置使得第一个被完成的形状在2.5D模型116的最顶层,而最后被完成的形状在2.5D模型116的最底层。如果一或多个形状被另一个形状封入,则被封入的形状是该形状(父形状)的子形状。草绘真实模块112使用这样的父子关系来确定纹理映射操作的顺序。包含在另一区域内的区域在与该另一区域相同的平面上。因而,草绘真实模块112将具有包含关系的区域分组到同一表面。每一表面由不同深度的若干层组成。具有最低深度的层在表面的底层而具有最高深度的层在顶层。在该情形中,在每一层上存在若干相似类型的区域。As the sketch-
几何形状构建(2.5D坐标计算)Geometry construction (2.5D coordinate calculation)
图12例示了示出按照一个实施例的具有作为不是属于同一对象的T型接合点一部分的一个公共顶点的区域。在图12的示例中,草绘真实模块112标识来自2-D草图118的两个对象(即,1202和1204)。在该实现中,为从2-D草图118恢复对象的几何形状,草绘真实模块112计算顶点之间的相对位置。现在因为知道照相机固有参数、线分组(针对正交约束)以及面和顶点标签,这就有可能了。给出两个毗邻的顶点V1和V2(分别具有3D位置q1和q2)和对应于线q1q2的消失点(vp(=(xp,yp)T),则存在约束:Figure 12 is an illustration showing regions having one common vertex as part of T-junctions that are not part of the same object, according to one embodiment. In the example of FIG. 12 ,
其中f是预计算的焦距,qz是q的z分量,H(q)是3D点q到图象平面的投影,上标“T”表示向量转置。符号函数sgn(x)在x≥0时为正,否则为负。如果消失点无穷远,则约束可修改为如下:where f is the precomputed focal length, q z is the z component of q, H(q) is the projection of 3D point q onto the image plane, and the superscript "T" denotes vector transpose. The sign function sgn(x) is positive when x ≥ 0, and negative otherwise. If the vanishing point is at infinity, the constraints can be modified as follows:
草绘真实模块112设置一任意顶点为参考3D点(0,0,f)T,随后可使用上述公式将其位置传播至其它顶点。The sketch
存在一条线不对应于任何已知消失点(并且因此具有未知的方向)的可能性。因此,无法计算这类线的顶点的坐标。为处理该问题,草绘真实模块112使用通用建筑组件的模型库,并且用最佳匹配的模型重建建筑绘画118的任何不明确部分。每一模型作为一个如上所述加有标签的图G=(V,E)来提供。每一顶点的标签是以接合点类型和到该顶点的边之间的关系为基础的。图13示出按照一个实施例用于重建2-D草图118的不明确部分的一组示例性的通用建筑组件。如图13所示且在该实现中,顶点标签(1-11)是以接合点类型为基础的。沿三个已知方向之一的线与较暗的未知线相比较亮。草绘真实模块112使用已知的随机行走过程调整图匹配算法来匹配加有标签的图。从一个节点跟随一条给定弧的可能性定义为
基于草图的真实感绘制Sketch-based photorealistic drawing
图14示出按照一个实施例的示例性基于草图的交互用户界面(UI)1400,用于从2-D草图生成真实感绘制。在该实现中,UI 1400表示图1的UI 122。在一个实现中,草绘真实模块112在显示设备126上呈现具有UI 1400的用户界面以供用户在草图窗口中编辑2-D草图118。该编辑指定例如基于草图的最终绘制结果120(例如在绘制结果窗口中所示的)所需的照明、纹理、颜色等。图15示出图14的示例性基于草图的交互用户界面1400,不同之处在于绘制120与图14的真实感绘制120相比是非真实感的。现在更详细地描述UI 1400的这些和其它方面。FIG. 14 illustrates an exemplary sketch-based interactive user interface (UI) 1400 for generating photorealistic renderings from 2-D sketches, according to one embodiment. In this implementation,
UI 1400为用户提供基于草图的交互绘制能力以获得纹理、视点和照明条件等等。在该实现中,用户编辑2-D草图118,并且响应于这些用户编辑,草绘真实模块112向用户绘制并呈现基于草图的绘制结果120。例如,在该实现中,用户可以在2-D草图118上绘制影线以指示照明、纹理等等。在该实现中,用户还可以直接从纹理库中选择纹理。在一个实现中,用户还可以使用刷子调整建筑的颜色。The
示例性地指定照明方向Exemplary specifying lighting direction
在一个实现中,用户使用影线编辑工具1402以在2-D草图118上绘制一或多笔影线。用户在草图上绘制的影线可代表照明或纹理。对于照明,一或多笔用户提供的影线指示要在基于草图的绘制结果120中绘制的明暗处理或阴影的位置与角度。为了示例说明,这些影线笔画/输入示为图1的“其它程序数据”的相应部分。根据这样的影线输入,草绘真实模块112确定2.5D模型116的光源参数。这些光源参数包括例如位置、方向和强度。方向、位置和强度从影线的位置与强度推出。响应于接收到这样的影线输入,草绘真实模块112根据基于草图的绘制结构120中所确定的光源参数呈现所指示的明暗处理/阴影角度。In one implementation, the user uses the
图16示出按照一个实施例的指定照明方向和阴影强度的示例图示。参考图16,(a)是一个方块的风格绘制,它示出来自左方的照明方向。图16(b)示出一个示例性2.5D模型116,其中用户在各个面上提供具有各自不同强度的影线笔画以指定照明方向(“L”)和阴影强度。在该例中,“n1”和“n2”指相应面的法线。在建筑中,光源通常是太阳。因此光线是平行的。假设表面大部分为兰博特投影(Lambertian),则在方向性光之下的表面强度为:Figure 16 shows an example illustration of specifying lighting direction and shadow intensity, according to one embodiment. Referring to Figure 16, (a) is a style rendering of a block showing the direction of illumination from the left. Figure 16(b) shows an exemplary 2.5
I=kdIlcos(θ),I = k d I l cos(θ),
其中kd是表面的反射系数,Il是光源的强度,而θ是表面法线与光照方向之间的角度。where kd is the reflectance of the surface, Il is the intensity of the light source, and θ is the angle between the surface normal and the direction of the light.
给定太阳作为光源,则θ在平坦表面任何地方为常数。因此,强度在平坦表面各处是均匀的(在一个实现中,忽略内反射)。通过该简化并且在一个实现中,草绘真实模块112基于不同表面处的相对强度解释光方向。例如,假设光源方向是L(l1,l2,l3),其中||L||=1。那么,对于每一表面,具有以下约束:Given the sun as the light source, θ is constant anywhere on a flat surface. Therefore, the intensity is uniform across the flat surface (in one implementation, internal reflections are ignored). With this simplification and in one implementation, the sketch
Ii=kdIlcos(θi)=kdIlNi·L,I i = k d I l cos(θ i ) = k d I l N i L,
其中Ni是表面i的法线而Ii是根据用户绘制的影线计算出的表面i的相对强度。这里,使用表面上影线区域的平均强度来定义Ii。where N i is the normal to surface i and I i is the relative intensity of surface i calculated from the hatching drawn by the user. Here, I i is defined using the average intensity of the hatched area on the surface.
草绘真实模块112假设Il和kd对于整个对象(2.5D模型116的一或多个相应部分)为常数,使得kdIl=1。给定的草绘118有可能不准确,则在一个实现中,草绘真实模块112如下为每一明暗处理表面设置约束:The sketch-
Ili≤kdIlNi·L ≤Ihi,I li ≤ k d I l N i L ≤ I hi ,
其中Ili和Ihi为Bout和Bin的平均强度,如图17所示。图17示出按照一个实施例示例性地指定明暗处理表面的边界。在此例中,Bout是覆盖所有影线的边界框,而Bin是Bout一半尺寸的中心框。草绘真实模块112使用与带影线表面的数量对应的约束数量。为了找出光照方向的唯一解,草绘真实模块112最优化项∑Nlj·L,其中Nlj是没有被用户加阴影的表面。换言之,找出最大化不具有阴影的表面的强度同时又满足带阴影表面的约束的解。where I li and I hi are the average intensities of B out and B in , as shown in Figure 17. Figure 17 illustrates exemplary designation of the boundaries of a shaded surface according to one embodiment. In this example, B out is the bounding box that covers all hatches, and B in is the center box that is half the size of B out . The
示例性纹理选择Exemplary Texture Selection
在一个实现中,用户使用纹理编辑工具1402来为2.5D模型116的封闭区域绘制或选择纹理。例如,在一个实现中,用户直接在2-D草图118或2.5D模型116上绘制影线笔画来指示在对象上的纹理是什么样的(例如直接绘制所需纹理的相似形状)。根据这些用户输入,草绘真实模块112自动为对象选择正确的纹理。在一个实现中,草绘真实模块112将用户输入与所存储的纹理的绘画或对其的索引相匹配来检索最佳纹理匹配。在一个实现中,草绘真实模块112在UI 1400上呈现对应于用户输入的一或多个可能的纹理供用户选择。该纹理提供与用户在纹理数据库中搜索对象的纹理无关,而是以对线相似性的客观度量为基础。In one implementation, a user uses
线相似性在纹理分析中用于描述纹理元素的形状。在纹理库中笔画和索引行绘画两者都是由线组成的黑白图象,因此在匹配期间仅考虑形状,这通过线相似性得到很好的描述。线相似性是基于其元素Pd(i,j)被定义为在图象上沿边方向距离为d的两个灰度值i和j的相对频率的方向同现矩阵来计算的。对于一个方向d,线相似性度量被定义为Line similarity is used in texture analysis to describe the shape of texels. Both stroke and indexed line painting in the texture library are black and white images composed of lines, so only shapes are considered during matching, which is well described by line similarity. The line similarity is calculated based on the directional co-occurrence matrix whose element P d (i,j) is defined as the relative frequency of two gray values i and j at distance d along the edge direction on the image. For a direction d, the line similarity measure is defined as
其中n是0与255之间的灰度级数。在一个实现中,草绘真实模块112使用四个方向(1,0)、(0,1)、(1,1)、(1,-1)来计算方向同现矩阵Pd并且计算四个方向的平均值Fline作为用户绘制笔画与纹理索引行绘画之间的相似性度量。在计算出匹配的纹理索引之后,系统检索相容的纹理。用户随后可选择这些纹理中的任一纹理。每一纹理具有相对比例的概念,因此一旦已经选择全局比例,所选纹理就被适当地按比例缩放并合成以覆盖表面(不是被拉长来拟合)。在一个实现中,对该规则的例外是窗和门——其中,重新按比例缩放纹理来映射到整个表面。where n is the number of gray levels between 0 and 255. In one implementation, the sketch-
在一个实现中,“其它程序数据”122包括基于纹理符号索引的纹理库。用户在2-D草图118上绘制纹理符号。草绘真实模块112将所绘制的纹理符号与纹理符号索引中的一或多个符号相匹配以标识相应的纹理,从库中检索该纹理来对对象或多边形加纹理。表示不同材质的标准建筑符号是已知的。在一个实现中,草绘真实模块112使用这些符号来索引纹理库。在绘制结果120中图示检索到的纹理时,草绘真实模块112将检索到的纹理映射到2.5D对象116的相应表面。在一个实现中,并且由于不同的纹理样本尺寸,草绘真实模块112在表面上合成纹理。在另一个实现中,当向窗、门等提供纹理时,纹理直接被映射到目标四边形。In one implementation, "Other Program Data" 122 includes a texture library based on a texture symbol index. The user draws textured symbols on the 2-
色化处理Colorization
UI 1400提供颜色选择控件1404,让用户改变关联于2-D草图118的所选对象的颜色。在一个实现中,草绘真实模块112以一组颜色样品、由用户直接进行RGB值输入的文本输入控件等等形式向用户呈现颜色选择控件1404。在一个实现中,在用户选择颜色之后,UI 1400允许用户在2-D草图118上绘制一或多个斑点来修改2.5D模型116的关联表面的颜色。
几何形状更新Geometry update
UI 1400允许用户修改2-D草图118的几何形状,例如通过添加线、删除线、调整尺寸、修改角度等等。执行这些编辑的技术是已知的。响应于用户对2-D草图118的修改,草绘真实模块112更新2.5D几何模型116以对应2-D草图118的修改。The
示例性过程exemplary process
图18示出按照一个实施例的用于草绘真实的示例性过程1800。为了示例说明,参考上述有关图1至17的方面描述过程1800的操作。在一个实现中,过程1800的操作是由草绘真实模块112实现的。框1800的操作是标识来自2-D草图的一组线段。在一个实现中,线段表示来自2-D草图118的向量图元。框1804的操作向量化这些线段以产生笔直线。为了示例说明,向量化的线在下文称为线段或线。对于每一线段,框1806的操作估计相应的消失点并且基于线段的对应消失点分类每一线段的方向。框1808的操作基于线方向和消失点将这些线段分组成多个多边形中对应的一些多边形的对应线段。框1810的操作使用封闭多边形构建2.5D模型的几何形状。在一个实现中,2.5D模型是由2.5D模型116表示的。框1812的操作接收对应于照明、纹理、颜色和几何形状修改中的一或多项的用户输入。框1814的操作响应于对用户输入的接收,基于该用户输入从2.5D模型绘制真实感和非真实感的结果。框1816的操作向用户呈现绘制结果。在一个实现中,绘制结果是基于草图的绘制结果120。FIG. 18 illustrates an exemplary process 1800 for sketching a reality, according to one embodiment. For purposes of illustration, the operations of process 1800 are described with reference to aspects described above with respect to FIGS. 1-17. In one implementation, the operations of process 1800 are implemented by
结论in conclusion
尽管参考图1至18以专用于结构特征和/或方法学操作或动作的语言描述了草绘真实,但要理解的是,在所附权利要求书中定义的实现不必受限于所述的这些特征或动作。相反,上述这些特定特征和操作是作为实现所附权利要求的示例性形式揭示的。Although sketched reality has been described with reference to FIGS. 1 to 18 in language specific to structural features and/or methodological operations or acts, it is to be understood that the implementations defined in the appended claims are not necessarily limited to the described these features or actions. Rather, the specific features and acts described above are disclosed as example forms of implementing the appended claims.
Claims (20)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US73238405P | 2005-11-01 | 2005-11-01 | |
US60/732,384 | 2005-11-01 | ||
US11/554,970 | 2006-10-31 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101300602A true CN101300602A (en) | 2008-11-05 |
Family
ID=40079638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2006800410866A Pending CN101300602A (en) | 2005-11-01 | 2006-11-01 | True sketch |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101300602A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101799937A (en) * | 2010-03-23 | 2010-08-11 | 南京大学 | Method for creating three-dimensional model by using sketch |
CN104183016A (en) * | 2014-09-05 | 2014-12-03 | 山东省国土测绘院 | Method for rapidly constructing 2.5-dimensional building model |
CN104778739A (en) * | 2015-03-27 | 2015-07-15 | 浙江慧谷信息技术有限公司 | Computer-based real-time sketch rendering algorithm |
CN113656882A (en) * | 2021-09-02 | 2021-11-16 | 盐城工业职业技术学院 | 2.5-dimensional graphical building data management system |
-
2006
- 2006-11-01 CN CNA2006800410866A patent/CN101300602A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101799937A (en) * | 2010-03-23 | 2010-08-11 | 南京大学 | Method for creating three-dimensional model by using sketch |
CN104183016A (en) * | 2014-09-05 | 2014-12-03 | 山东省国土测绘院 | Method for rapidly constructing 2.5-dimensional building model |
CN104183016B (en) * | 2014-09-05 | 2017-08-15 | 山东省国土测绘院 | A kind of construction method of quick 2.5 dimension building model |
CN104778739A (en) * | 2015-03-27 | 2015-07-15 | 浙江慧谷信息技术有限公司 | Computer-based real-time sketch rendering algorithm |
CN113656882A (en) * | 2021-09-02 | 2021-11-16 | 盐城工业职业技术学院 | 2.5-dimensional graphical building data management system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7639250B2 (en) | Sketching reality | |
Yang et al. | Sketch-based modeling of parameterized objects. | |
Hughes | Computer graphics: principles and practice | |
Ji et al. | Easy mesh cutting | |
US7129942B2 (en) | System and method for performing domain decomposition for multiresolution surface analysis | |
US8654121B1 (en) | Structured polygonal mesh retesselation | |
US20130127869A1 (en) | Methods and Apparatus for Stroke Grouping for High-Level Sketch Editing | |
Bhattacharjee et al. | A survey on sketch based content creation: from the desktop to virtual and augmented reality | |
JP2002520749A (en) | Method and system for generating a fully textured three-dimensional model | |
Governi et al. | 3D geometry reconstruction from orthographic views: A method based on 3D image processing and data fitting | |
Kazmi et al. | A survey of sketch based modeling systems | |
US8665261B1 (en) | Automatic spatial correspondence disambiguation | |
Tang et al. | Skeleton-guided generation of synthetic noisy point clouds from as-built BIM to improve indoor scene understanding | |
Knott et al. | Towards mesh-based deep learning for semantic segmentation in photogrammetry | |
CN101300602A (en) | True sketch | |
Lengauer et al. | A sketch-aided retrieval approach for incomplete 3D objects | |
JP2023164318A (en) | Scalable approach to converting images to sketches | |
Lin et al. | Scale-aware black-and-white abstraction of 3D shapes | |
Chu et al. | Hole-filling framework by combining structural and textural information for the 3D Terracotta Warriors | |
Kolomenkin et al. | Reconstruction of relief objects from archeological line drawings | |
Udayan | An analysis of reconstruction algorithms applied to 3d building modeling | |
Lin et al. | A feature-adaptive subdivision method for real-time 3D reconstruction of repeated topology surfaces | |
Münster et al. | 3D Modeling | |
Martin et al. | Alhambra: a system for producing 2D animation | |
Bonnici et al. | A constrained genetic algorithm for line labelling of line drawings with shadows and table-lines |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20081105 |