Synopsis概况

XYZ Split (Cartesian Space)

split(splitAxis) { size1 : operations1 | size2 : operations2 | ... | sizen-1 : operationsn-1 }

split(splitAxis) { size1 : operations1 | size2 : operations2 | ... | sizen-1 : operationsn-1 }*

split(splitAxis, adjustSelector) { size1 : operations1 | ... | sizen-1 : operationsn-1 }

split(splitAxis, adjustSelector) { size1 : operations1 | ... | sizen-1 : operationsn-1 }*

UV Split (Texture Space)

split(splitDirection, surfaceParameterization, uvSet) { size1 : operations1 | ... | sizen-1 :operationsn-1 }*

Parameters

XYZ Split (Cartesian Space)

  • splitAxis (selstring)
    (x | y | z) - Name of axis to split along. This is relative to the local coordinate system (i.e. the scope).
  • adjustSelector
    (adjust | noAdjust ) - optional selector to control scope calculation of the calculated shapes: the default is to adjust the scope to the geometry's bounding box; noAdjust avoids this, therefore the scopes of the resulting shapes fill the parent's scope without gaps.

UV Split (Texture Space)

  • splitDirection (selstring)
    (u | v ) - Name of axis to split along.
  • surfaceParameterization (selstring)
    (uvSpace | unitSpace) - uvSpace is the planar texture space, defined by the uv coordinates; unitSpace is the 2d space on the 3d geometry surface, measured in units (e.g. meters).
  • uvSet (float)
    Number of texture a set/layer (integer number in [0,5]). The numbering corresponds to the texture layers of the material attribute.

See Texturing for information about the texture layer IDs.

General

  • size (float)
    Split width. Depending on the prefix, the widths along axis are interpreted in the following way:

    no prefix (absolute)

    the new shape will have exactly size size.

    ' (relative)

    the new shape's size will be size * current scope size.

    ~ (floating)

    with the ~ prefix, the remaining spaces between the split parts with absolute dimensions are automatically adapted. If multiple floating parts are defined within a split, the dimensions are weighed proportionally.

  • operations
    A sequence of shape operations to execute on the newly created shape.
  • *
    Repeat switch: the repeat switch triggers the repetition of the defined split into the current shape'sscope, as many times as possible. The number of repetitions and floating dimensions are adapted to the best solution (best number of repetitions and least stretching).

XYZ Split (Cartesian Space)

The split operation subdivides the current shape along the specified scope axis into a set of smaller shapes. For each size-operation block inside the curly brackets, a new shape is pushed onto the shape stack, a number of shape operations is executed and the shape on top of the shape stack is popped again.

If the optional repeat switch * is appended to the split operation, the content of {...} is repeated as often as it fully fits into the scope's dimension along the selected axis.

The geometry of the current shape is cut with a plane perpendicular to the split axis at every intersection between two blocks (i.e. at size1, size2, ... sizen-1). Hollow meshes are closed after the cut, i.e. cutting planes introduce new surfaces to preserve the volume.

Splits can be nested, i.e. a size : operation block can be replaced by a {...} block. In theory, the nested level is unlimited.

UV Split (Texture Space)

Splits can also be applied in the 2d uv texture domain. Texture coordinates define a 2d parameter space on a 3d surface. Examples of such parameterizations are streets (u along thew street direction, v along the width) and facades (generated with setupProjection() and projectUV(), u along the width and v along the height). This permits to operate directly on the surface. In general, uv coordinates are in the [0,1] range and not connected to a unit like meters or yards on the surface (defined by the underlying mesh). Setting the splitDirectionparameter to unitSpace permits to operate directly on the surface, i.e. work in units (e.g. meters or yards). Depending on the geometry and type of parameterization there is some inherent distortion in this conversion.
Borders (start, end) of the uv split are defined by the minimal and maximal values found in the selected uv coordinates. The genral syntax of the split is the same as in the cartesian case described above, i.e. relative and floating operators (' and ~) can be used as well as the repeat operator (*). Please check out the examples below.

Shape attributes

Each generated shape will have a number of attributes set:

  • split.index: The zero-based index of the selected component.
  • split.total: The total number of components selected by the selector.

Index and total are global; for instance

     ...primitiveCube()split(x) { '0.1 : A | '0.1 : B }*

will create 5 shapes with rule A interleaved with 5 shapes with rule B where split.index goes from 0 to 9 with all even numbers on rule A and all odd numbers on rule B while split.total will be 10.

For more information see split attribute.

Related

  • scope attribute
  • pivot attribute
  • split attribute
  • splitArea operation

Examples

Setup


This is the initial shape before the split. We will present a number of split examples along the x axis, the current shape's scope.sx is 10.

Below are the rules used to color and size the shapes created in the split:

X(h)-->s('1,'h,'1)color("#0000ff")Y(h)-->s('1,'h,'1)color("#ffff00")Z(h)-->s('1,'h,'1)color("#00ff00")

Relative Sizes


A-->split(x){ '0.5 : Z |'0.1 : Y(2) | '0.2 : X(1) }

This example shows the usage of the relative prefix. The green Z shape takes half of the initial shape's size (5 units) and so on. The total sum of all shape sizes in x-direction is 8, therefore the gap at the end.

Floating Sizes only: Ratios


A-->split(x){ ~0.5 : Z |~0.1 : Y(2) | ~0.2 : X(1) }

The same example as above, but all sizes with the floating prefix. Note how the whole initial scope is filled (no gap at the end), and the ratios are kept.

Absolute and Floating Sizes


A-->split(x){ 3.3 : Z(1) |~3   : Y(2) | 5   : X(1) }

Here, a floating sized shape is framed between two absolute sized shapes. Its size is adjusted from 3 to 1.7 to fulfill the absolute constraints.

Oversized


A-->split(x){ '0.5 : Z(1) |'0.6 : Y(2) | 3 : X(1) }

The first shape Z (green) fits in, but the second one Y (yellow) is cut at size 5. The X never gets created because there is no space left.

Repeat Split with Absolute Sizes


A--> split(x){ 2 : X(2) | 1 : Y(1) }*

A repeat split example. All sizes are absolute. The XY pattern is repeated 3 times, and the remaining unit is filled with half a X, i.e. the geometry of the last X is cut off.

Repeat Split with Floating Sizes


A--> split(x){ ~2 : X(2) | ~1 : Y(1) }*

If floating sizes are used in the repeat split, no shape is cut but the sizes are adjusted such that the ratio between the elements is kept and the whole scope can be filled.

Interleaved Repeat Split


A-->split(x){ 1 : X(3) | {  ~1 : Y(2) | 0.2 : Z(1) | ~1 : Y(2) }* | 1 : X(3) }

A interleaved split consisting of two absolute-sized shapes at both ends and a repeat split in-between. Note: the green shapes Z have absolute sizes, while the yellow Y shapes have floating sizes which turn out to be 0.9.

Rhythm


A-->split(x){ {  1   : X(3) | ~2.7 : Y(1) }* |1   : X(3) }

Here it is demonstrated how a pattern ABABABA etc. can be achieved. Note the floating size of the yellow Y shapes.

Cutting Geometry


A-->i("cylinder.hor.obj")t(0,'0.5,0)

Here it is demonstrated how a the geometry of the current shape is cut into a number of smaller shapes. A cylinder model is inserted into the current shape.


A-->i("cylinder.hor.obj")t(0,'0.5,0)split(x) { { ~0.75 : XX | ~1 : NIL }*  | ~0.5 : XX }

Splitting the shape and using NIL in the split rule results in holes. Note how the cut surfaces are closed.

UV Split Basics


Init-->extrude(scope.sx * 0.5)comp(f) { front : Facade }Facade-->setupProjection(0, scope.xy, '1, '1)projectUV(0)texture("builtin:uvtest.png")split(u, uvSpace, 0) { 0.5 : X }*

u split in uvSpace - the split happens at u = 0.5, independent of facade size.


Init-->extrude(scope.sx * 0.5)comp(f) { front : Facade }Facade-->setupProjection(0, scope.xy, '1, '1)projectUV(0)texture("builtin:uvtest.png")split(u, unitSpace, 0) { 5 : X }*

u split in unitSpace - the splits happen at u = 5, dependent of facade size.

UV Split on Streets


Street-->texture("builtin:uvtest.png")

The test texture on a street with two segments. The street's texture coordinates are automatically generated; note that the two street segments have different lenghts but are both covered by a [0,1] uv space, the u axis following the street direction and the v axis, perpendicular to u, along the width.


Street-->split(u, unitSpace, 0) { ~10 : NIL | ~3 : color("#ff0000") X  |  ~10 : NIL}*

The same street after a u-split in unitSpace. Every 20 meters a 3 meter wide band is drawn accross the street.

CityEngine学习资料——split分割相关推荐

  1. CityEngine学习资料——

    Synopsis 概要 setupProjection(uvSet, axesSelector, texWidth, texHeight) setupProjection(uvSet, axesSel ...

  2. Python自动生成手绘、证件照、九宫格...太炫酷了(附零基础学习资料)

    前言 python像是叮当猫的口袋,几乎什么都能做,适合外行小白们去摸索学习,能极大的增加对编程的兴趣.(文末送福利) 有些工具用python来实现不一定是技术上的最优选择,但可能是最简洁.最面向大众 ...

  3. 史上最全DSO学习资料

    点击上方"3D视觉工坊",选择"星标" 干货第一时间送达 DSO(Direct Sparse Odometry)是一种视觉里程计方法.在SLAM领域,DSO属于 ...

  4. 限时删!一套目标检测、卷积神经网络和OpenCV学习资料(教程/PPT/代码)

    AI 显然是最近几年非常火的一个新技术方向,从几年前大家认识到 AI 的能力,到现在产业里已经在普遍的探讨 AI 如何落地了. 计算机视觉目前在很多领域都已经实现了商业应用,从现实市场规模角度,目前人 ...

  5. python自学书籍顺序-【经验分享】自学Python的学习顺序!附学习资料

    自学Python要按照什么样的学习顺序?首先要有一个详尽的学习大纲,对于学习Python的各种知识点要安排的详略得当,做到由易到难,循序渐进,才能长久的坚持学下去.除了基础的理论知识,项目实战也是自学 ...

  6. 无意间发现BAT大佬总结的一份目标检测、卷积神经网络和OpenCV学习资料(教程/PPT/代码)...

    AI 显然是最近几年非常火的一个新技术方向,从几年前大家认识到 AI 的能力,到现在产业里已经在普遍的探讨 AI 如何落地了. 计算机视觉目前在很多领域都已经实现了商业应用,从现实市场规模角度,目前人 ...

  7. 史上最全 | 基于深度学习的3D分割综述(RGB-D/点云/体素/多目)

    点击下方卡片,关注"自动驾驶之心"公众号 ADAS巨卷干货,即可获取 点击进入→自动驾驶之心[分割]术交流群 后台回复[分割综述]获取语义分割.实例分割.全景分割.弱监督分割等超全 ...

  8. 重磅!国内最全的3D视觉学习资料已开源

    点击上方"3D视觉工坊",选择"星标" 干货第一时间送达 前言 加入工坊快一年了,这一年里结识了很多优秀的童鞋,他们是一群对技术充满着好奇心的探索者.不知道为什 ...

  9. 当当网 R 语言学习资料统计分析

    当当网 R 语言学习资料统计分析 一.网络数据的抓取 二.数据清洗与保存 (一)工作目录的修改 (二)导入数据并修改列名 1. 交互式编辑器 2. names()函数 3. rename()函数 (三 ...

  10. swift 学习资料大全

    版本:Swift github排名 https://github.com/trending,github搜索:https://github.com/search 主要工作说明:  1. 将Swift从 ...

最新文章

  1. eyoucms range 范围判断标签
  2. MFC中的字符串转换
  3. python装饰器作用-Python装饰器的通俗理解
  4. 8086汇编_除法指令
  5. hive命令出现问题Failed with exception Java.io.IOException:java.lang.IllegalArgumentException: java.NET.URI
  6. Java笔记-JPA保存数据时指定列不插入提交(CURRENT_TIMESTAMP)
  7. SAP License:SAP顾问是如何炼成的——你适合做SAP顾问吗?
  8. 【UVA11795】 Mega Man's Mission
  9. python在化学中的应用_用Python配平化学方程式的方法
  10. 软件工程 CI持续集成实例 Zanata+github+Jenkins
  11. 程序员入门必备经典书单
  12. Matlab机器学习之SVM工具箱
  13. matlab 均匀设计编程,均匀设计均匀设计表--方开泰.doc
  14. ftl 页面使用java代码_在FTL文件中使用自定义的Java方法
  15. linux命令 复制文件,linux复制文件的命令是什么?
  16. Cyclical Learning Rates
  17. Win11修改Hosts文件无法保存怎么解决?
  18. 郁闷的sendto失败
  19. [生存志] 第53节 晏子春秋录纯臣
  20. 无人机动力测试台-自动化测试系统拉力、扭矩、电压、电流、转速和效率

热门文章

  1. vue使用markdown
  2. JVM报错GC overhead limit exceeded
  3. C++ 控制字符串移动程序
  4. java 周几_java实现根据日期判断周几
  5. BRD、MRD、PRD
  6. between oracle的用法,关于 oracle between and的用法! | 学步园
  7. Java中涉及到金钱计算方法
  8. 18 个 JavaScript 入门技巧
  9. 入选全球灯塔工厂 西部数据践行可持续发展承诺
  10. 程序员必备的 58 个学习网站