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

2023年7月26日水曜日

平面を貼る

 







import bpy


# Parameters for the square

size = 10

y_pos = 10


# Create the square

vertices = [

    (-size/2, y_pos, -size/2),

    (-size/2, y_pos, size/2),

    (size/2, y_pos, size/2),

    (size/2, y_pos, -size/2)

]

faces = [(0, 1, 2, 3)]


# Create the mesh

mesh = bpy.data.meshes.new(name="SquareMesh")

mesh.from_pydata(vertices, [], faces)


# Create the object and link it to the scene

obj = bpy.data.objects.new("Square", mesh)

bpy.context.scene.collection.objects.link(obj)










import bpy


# Parameters for the square

size = 10

y_pos = 5


# Create the square

vertices = [

    (-size/2, y_pos, -size/2),

    (-size/2, y_pos, size/2),

    (size/2, y_pos, size/2),

    (size/2, y_pos, -size/2)

]

faces = [(0, 1, 2, 3)]


# Create the mesh

mesh = bpy.data.meshes.new(name="SquareMesh")

mesh.from_pydata(vertices, [], faces)


# Create the object and link it to the scene

obj = bpy.data.objects.new("Square", mesh)

bpy.context.scene.collection.objects.link(obj)






[Blender]オブジェクトに画像テクスチャを貼り付ける方法(画像あり)

https://civetta-blog.com/2023/02/10/blender%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AB%E7%94%BB%E5%83%8F%E3%83%86%E3%82%AF%E3%82%B9%E3%83%81%E3%83%A3%E3%82%92%E8%B2%BC%E3%82%8A%E4%BB%98%E3%81%91%E3%82%8B%E6%96%B9/





2 UV to Vector









Vector  to  Vector





【Blender】テクスチャの貼り方をしっかりとマスターしよう!

https://original-game.com/blender-how-to-apply-a-texture/











【blender 初心者】画像テクスチャを貼り付けて葉っぱを作る

https://www.youtube.com/watch?v=5BFo_GtmIGU




ああ



2023年7月25日火曜日

カメラ位置 000へ 移動

 







import bpy


# Get the camera object

camera = bpy.data.objects.get("Camera")


# If the camera exists, set its location to (0, 0, 0)

if camera:

    camera.location = (0, 0, 0)


































This script will find the camera object in the scene (assuming it is named "Camera") and set its location to (0, 0, 0). If there is a camera in the scene, it will be moved to the specified position.











コレクションを作る

 


https://2023na2022.blogspot.com/2023/07/20230724-railcar.html




# コレクションを作る 重複の場合 作らない

import bpy


# List of collection names

collection_names = [

    "単位円 torus",

    "xyz 軸 円柱"

]


# Function to create a new collection if it doesn't exist

def create_collection_if_not_exists(name):

    if name not in bpy.data.collections:

        collection = bpy.data.collections.new(name)

        bpy.context.scene.collection.children.link(collection)


# Create collections

for name in collection_names:

    create_collection_if_not_exists(name)









# Assumed Plane
import bpy

# List of collection names
collection_names = [
    "Assumed Plane",
    "ap Y=0 Assumed Plane",
    "ap Y=1 Assumed Plane",
    "ap Y=root3 Assumed Plane",
    "ap Y=2 Assumed Plane",
    "ap Y=5 Assumed Plane",
    "ap Y=10 Assumed Plane"
]

# Function to create a new collection
def create_collection(name):
    collection = bpy.data.collections.new(name)
    bpy.context.scene.collection.children.link(collection)
    return collection

# Create collections
for name in collection_names:
    create_collection(name)










# My train car

import bpy

# List of collection names
collection_names = [
    "My train car",
    "mtc 0.8 size",
    "mtc 0.1 size"
]

# Function to create a new collection
def create_collection(name):
    collection = bpy.data.collections.new(name)
    bpy.context.scene.collection.children.link(collection)
    return collection

# Create collections
for name in collection_names:
    create_collection(name)





 




# My train car

import bpy

# List of collection names
collection_names = [
    "My train car",
    "mtc 0.1 size",
    "mtc 0.18 size"
]

# Function to create a new collection
def create_collection(name):
    collection = bpy.data.collections.new(name)
    bpy.context.scene.collection.children.link(collection)
    return collection

# Create collections
for name in collection_names:
    create_collection(name)










import bpy

# List of collection names
collection_names = [
   
 "My upper", 
"My upper",
"5", 
"√3", 
"1", 
"球体中心", 
"観察者"

]

# Function to create a new collection
def create_collection(name):
    collection = bpy.data.collections.new(name)
    bpy.context.scene.collection.children.link(collection)
    return collection

# Create collections
for name in collection_names:
    create_collection(name)





配布ファイル 20231005 遠近法モード 表示画面の大きさ

  今日の書き出し設定 項目メモ帳 2023: 20231005   立方体と 光線 https://2023na2022.blogspot.com/2023/10/20231005.html https://mokuji000zionad.hatenablog.com/