ラベル Parametric の投稿を表示しています。 すべての投稿を表示
ラベル Parametric の投稿を表示しています。 すべての投稿を表示

2016年9月4日日曜日

SketchUp でパラメトリックモデリング [04]

Viz for SketchUp ver.0.6.1 (early beta) がリリースされました。前回のアップデート (ver.0.5.0) では Mac 版が起動できない状況でしたが、SketchUcation のフォーラムで報告したところ、すぐにアップデートされました。

 前回のポストでリストアップしたノード・リストを更新しました。(NEW061)と表記されているのが今回追加されたノードです。

今回、MakeCone, Cylinder, Line, Rect, Sphere, Teaset, Torus など、さまざまな形状をパラメトリックにコントロールできるノードが追加されています。そんな中で面白いのが、MakeTeaset です。プルダウンメニューから、TeaPod, TeaCup, TeaSpoon  を選択できるようになっています。
大昔からCGのレンダリングテストによく使われたオブジェクトの定番です・・
Viz で生成した Teaset を Visualizer でリアルタイムレンダリング


ver.
Name
Category
Description

Add
Math
Add two numbers/vectors/matrices
(030)
AryConst
Array
Create a array of constant values
(NEW061)
AryFileSink
Array, File IO
Write array data to a text fie
(030)
AryFileSource
Array, File IO
Read array data from a text file
(030)
AryGradient
Array
Create a array of values in the range [min, max]
(030)
AryReduce
Array, Math
Reduce all elements of an array to a single element
based on the selected function such as,
Min, Max, Add, And, Or

ArySize
Array
Compute the size of an array
(NEW061)
Bool3d
Geometry
Computes boolean operations on 3d solids
(NEW061)
CapEdge
Geometry
Cap an edge to for a surface
(NEW030)
Clamp
Math
Clamp the value of two numbers/vectors/matrices
(030)
Eq, Ne, Gt, Ge, Lt, Le が統合
Comp
Math, Logics
Compare x and y based on a comparison function such as:
==(Equal), !=(Not Equal)
>(Greater), >=(Greater Equal)
<(Less Than), <=(Less Equal)
(030)
Container
Container
Container for other nodes

CrossProd
Math
Cross product of two vectors

DirAlign
Geometry, Transformation
Rotate geometry so that Dir0 is aligned to Dir1

Div
Math
Divide two numbers/vectors/matrices

DotProd
Math
Dot product of two vectors/matrices
(NEW061)
ExtractEdge
Geometry
Extract the edge profile from a surface
(030)
Extrude
Geometry
Extrude curves or lines along a profile to create a surface

FBM
Noise
Fractional Brownian Motion noise fucntion
(030)
FaceArea
Geometry, Array
Compute the area of faces in the eometry
(NEW061)
FlipFace
Geometry
Flip face direction

Fx
Math
Mathematical function y=F(x) such as abs, sin, cos, etc.
(030)
Fxy
Math
Mathematical function z=F(x, y) such as min, max, and, or

GeometrySink
Geometry
Output geometry to the modeler

GeometrySource
Geometry
Input geometry from the modeler

GetAttr
Array, Geometry, Attributes
Get numeric attributes from geometry
(NEW061)
ImgFileSink
Imaging, File IO
Write an image to file
(030)
ImgFileSource
Imaging, File IO
Read an image file
(030)
ImgSample
Array, Imaging
Sample an image at position x
(030)
ImgSize
Imaging
Compute the dimensions of an image
(030)
Input
Containers
Create an input attribute in the parent graph

Length
Math
Length (Euclidean Norm) of a vector/matrix

LineSmooth
Geometry
Smooth lines by subdivision up to the specified threshold

MakeCircle
Geometry
Make a circle composed of line segments
(NEW061)
MakeCone
Geometry
Make a cone
(NEW061)
MakeCylinder
Geometry
Make a cylinder

MakeGrid
Geometry
Make a grid of quads
(NEW061)
MakeLine
Geometry
Make a line composed of line segments
(NEW061)
MakeRect
Geometry
Make a rectangle composed of line segments
(NEW061)
MakeSphere
Geometry
Make a sphere
(NEW061)
MakeTeaset
Geometry
Make pieces of a teaset
(NEW061)
MakeTorus
Geometry
Make a torus

Mul
Math
Multiply two numbers/vetorsmatrices

Neg
Math
Negate a number/vector/matrix

Normalize
Math
Normarize a vector/matrix
(030)
NumericInput
IO, Containers
Create an numeric input attribute in the parent graph
(030)
Output
Containers
Create an output attribute in the parent graph

PointNormal
Geometry
Compute the normal at points as average of the 
normal of faces sharing
(NEW061)
PointsToLine
Geometry
Make a line strip out of ppoint positions

Prod
Math
Product of a matrix and a vector / Product of two matrices

Random
Math
Random number generator
(030)
Reduce
Math
Reduce all elements of vector/matrix to a single element based on the selected function such as Min, Max, Add, And, Or

Revolve
Geometry
Revolve curves or ines around an axis to create a solid
(NEW061)
Rotate
Geometry, Transformation
Rotate geometry around an axis

SVec2
Math
Split a vector of size 2 into its two components x, y

SVec3
Math
Split a vector of size 3 into its three components x, y, z

SVec4
Math
Split a vector of size 4 into its four components x, y, z, w

Select
Math, Logics
Select X if condition C is true, otherwise select Y

SetAttr
Array, Geometry, Attributes
Set Geometry's attributes

Sub
Math
Subtract two numbers/vectors/matrices
(030)
TextureXForm
Geometry, Texture
Apply a transformation to the texture of geometry

Translae
Geometry, Transformation
Translate geometry

Triangulate
Geometry
Turn quas and polygons into triangles

Vec2
Math
Make a vector of size 2 from its two components x, y

Vec3
Math
Make a vector of size 3 from its three components x, y, z

Vec4
Math
Make a vector of size 4 from its four components x, y, z, w

X-Axis
Math
Vector pointing along the positive X axis

Y-Axis
Math
Vector pointing along the positive Y axis

Z-Axis
Math
Vector pointing along the positive Z axis
  

2016年7月27日水曜日

SketchUp でパラメトリックモデリング [03]

Rhinoceros の Grasshopper や Revit の Dynamo にはまだまだ機能的には追いついてはいませんが、今年の2月末に、SketchUp でパラメトリック・モデリングを実現するプラグイン Viz for SketchUp が Early Beta 版 (ver.0.1.0) としてリリースされました。


当初、WIN only でしたが、今回のアップデート (ver.0.3.0) で MAC にも対応するようになりました。前回5月末のアップデート (ver.0.2.1) ではカスタムノードに対応しましたが、今回さらに新たなノードが追加され、Extrude やテクスチャマッピングもできるようになりました。


現状、まだマニュアルやノードの解説などが見当たらないため、とりあえずサポートされているノードをヘルプメッセージを頼りに一覧表にしてみました・・


Name

Category

Description

Add

Math

Add two numbers/vectors/matrices

AryConst

Array

Create a array of constant values

AryFileSource

Array, File IO

Read array data from a text file

AryGradient

Array

Create a array of values in the range [min, max]

AryReduce



Array, Math



Reduce all elements of an array to a single element based on the selected function such as,
Min, Max, Add, And, Or

ArySize

Array

Compute the size of an array

Clamp


Math


Clamp the value of two numbers/vectors/matrices

Comp





Math, Logics





Compare x and y based on a comparison function such as:
==(Equal), !=(Not Equal)
>(Greater), >=(Greater Equal)
<(Less Than), <=(Less Equal)

Container

Container

Container for other nodes

CrossProd

Math

Cross product of two vectors

DirAlign


Geometry, Transformation

Rotate geometry so that Dir0 is aligned to Dir1


Div

Math

Divide two numbers/vectors/matrices

DotProd

Math

Dot product of two vectors/matrices

Extrude


Geometry


Extrude curves or lines along a profile to create a surface

FBM

Noise

Fractional Brownian Motion noise fucntion

FaceArea


Geometry, Array

Compute the area of faces in the eometry


Fx


Math


Mathematical function y=F(x) such as abs, sin, cos, etc.

Fxy


Math


Mathematical function z=F(x, y) such as min, max, and, or

GeometrySink

Geometry

Output geometry to the modeler

GeometrySource

Geometry

Input geometry from the modeler

GetAttr



Array,
Geometry, Attributes

Get numeric attributes from geometry



ImgFileSource

Imaging, File IO

Read an image file

ImgSample

Array, Imaging

Sample an image at position x

ImgSize

Imaging

Compute the dimensions of an image

Input

Containers

Create an input attribute in the parent graph

Length

Math

Length (Euclidean Norm) of a vector/matrix

LineSmooth


Geometry


Smooth lines by subdivision up to the specified threshold

MakeCircle

Geometry

Make a circle composed of line segments

MakeGrid

Geometry

Make a grid of quads

Mul

Math

Multiply two numbers/vetors/matrices

Neg

Math

Negate a number/vector/matrix

Normalize

Math

Normarize a vector/matrix

NumericInput


IO, Containers


Create an numeric input attribute in the parent graph

Output

Containers

Create an output attribute in the parent graph

PointNormal


Geometry


Compute the normal at points as average of the 
normal of faces sharing

Prod


Math


Product of a matrix and a vector / Product of two matrices

Random

Math

Random number generator

Reduce



Math



Reduce all elements of vector/matrix to a single element based on the selected function such as Min, Max, Add, And, Or

Revolve


Geometry


Revolve curves or ines around an axis to create a solid

SVec2


Math


Split a vector of size 2 into its two components x, y

SVec3


Math


Split a vector of size 3 into its three components x, y, z

SVec4


Math


Split a vector of size 4 into its four components x, y, z, w

Select

Math, Logics

Select X if condition C is true, otherwise select Y

SetAttr



Array, Geometry, Attributes

Set Geometry's attributes



Sub

Math

Subtract two numbers/vectors/matrices

TextureXForm


Geometry, Texture

Apply a transformation to the texture of geometry

Translate


Geometry, Transformation

Translate geometry


Triangulate

Geometry

Turn quas and polygons into triangles

Vec2


Math


Make a vector of size 2 from its two components x, y

Vec3


Math


Make a vector of size 3 from its three components x, y, z

Vec4


Math


Make a vector of size 4 from its four components x, y, z, w

X-Axis

Math

Vector pointing along the positive X axis

Y-Axis

Math

Vector pointing along the positive Y axis

Z-Axis

Math

Vector pointing along the positive Z axis


ver.0.2.1 にあったいくつかのノードは、ver.0.3.0 で統合されたりしているものもあるようなので、古いソースとは互換性がなっくなっている様です。というか、絶賛開発中ということですね・・・

公開されているサンプルファイルを開いて、いろいろ試してみようと思います・・





2014年7月6日日曜日

SketchUp でパラメトリックモデリング? [02]

今回は数学的なアルゴリズムによるパラメトリックなモデリングについて・・

利用したアプリケーションは 3D-XplorMath (Mac版) と MeshLab (Mac版) です・・
3D-XplorMath
3D-XplorMath の公式サイトはコチラ

サイトの説明にもあるとおり、 3DXM Consortium という 数学者の国際ボランティアグループが The National Science Foundation (DUE Award #0514781) の支援を受けて開発しているもので、Mac版実行アプリケーションの他に、Java環境版Javaアプレット版(WEB)などもあり、Java版の一部は日本語化されています。

このアプリケーションで扱う事ができる数学的なオブジェクトは多肢にわたり、以下の通り、[Category]メニューで分類されています。
平面曲線
空間曲線
曲面
共形写像
多面体
常微分方程式
波形
音波
フラクタル&カオス

これらのオブジェクトのうち、3次元系のオブジェクト(Surfaces, Polyhedra) は *.obj 形式データでエクスポートできます。まずは試しに [Category] メニューから [Surfaces] を選び、その右横に表示された [Surface]メニューからさらに [Monkey Saddle] を選んでみました。

ウィンドウに3次元曲面が描画され、マウスで回転、左下の [+] [-] で拡大縮小可能です。またここでは [Settings] メニューの [Set Parameters, Modify Object] でパラメトリックに曲面の形状をセッティング可能です。

各パラメータの初期値が記述されているので、変更して[OK]ボタンを押すと3次曲面がパラメトリックに更新されます。形状がきまったら、[File] メニューから [Save Surfaces As Single .obj File... ] を選ぶと ファイル名を指定して *.obj 形式で保存できます。

次に SketchUpでは *.obj 形式のデータは直接インポートできないので (エクスポートは可) コンバーターとして、*.obj を読み込んで *.stl を書き出せる MeshLab.app を利用します。
MeshLab.app

MeshLab はさまざまな3次元系データの Viewer/Converter として利用できるので、オススメです。

MeshLab の [File] メニュー [Import Mesh...] から *.obj ファイルをインポートすると形状はそのまま取り込まれましたことを確認できます。[File] メニュー [Export Mesh As...] でファイル形式として *.slt を指定して書き出し、 SketchUp に取込みできることが確認できました。

ところで、数学的なオブジェクトの可視化といえば、古くから ”究極の科学技術計算アプリケーション” として Mathematica が有名です。(最新版は Mathematica9)
Mathematica
さまざまなデータ形式でインポート・エクスポート出来る様なので、SketchUp に限らずいろいろな利用ができそうです。 (サポートされているデータ形式はコチラ)
ただし、それなりに数学的知識やプログラミングの知識が必要で、まあ、そもそもその知識があれば SketchUp 内蔵の Ruby でコーデングすれば良い訳で、少し試してみた範囲では気軽にパラメトリックなモデリングという訳にはいきませんでした・・;


2014年7月3日木曜日

SketchUp でパラメトリックモデリング? [01]

SketchUp には RhinocerosGrashopper の様な Graphical な Programming 環境はありませんが、STL データを読み込めるのでいくつか試してみました。


Autodesk123DファミリサンドボックスにあるWEBアプリで、パラメトリックなモデリングが可能です。
現状、基本的な Shape Type は Prism と Revolve の2種類ですが、それぞれのテンプレートおよびパラメータとモデルの構成要素である1つのセグメントに当てはめる基本形状の組み合わせはほぼ無限大(?) また、これらの要素・パラメータをランダムに生成するメニュー [Randomise] も用意されています。(正式リリース時には Shape Type もさらに増えるのかもしれません・・)

それぞれのパラメータになにか意味を持たせなくても、とりあえず生成された3D形状は、メニューの [Download Model] からダウンロードできます。

ファイル名・H×W×D寸法(mm)・垂直軸を決めて、ファイル形式は *.OBJ と *.STL が選べます。  *.STL を SketchUp に取り込んでモデリングに利用できるという訳です・・