본문 바로가기

모델링7

[그래픽스] 그래픽 프로그래밍 설계 기말고사 1. Barycentric coordinates 설명하시오. 1) 정의 : 삼각형과 상대적으로 계산된 좌표를 말한다. 예를들어, 삼각형 ABC가 있다면, 세 정점 A, B, C를 각각 (1, 0, 0), (0, 1, 0), (0, 0, 1)의 좌표를 갖도록 축을 설정하여 상대적으로 좌표 공간을 생성하고, 삼각형 안 또는 밖에 있는 정점들의 위치값을 계산할 수 있는 좌표이다. 2) 특징 : 정점이 삼각형 내부에 있을 때만 모두 양수로 계산된다. 삼각형의 각도에 의존하 지 않는 성질이 있다. 3) 활용 : 삼각형에 대한 위치 결정에 사용된다. 내부의 점 또는 외부의 점을 설명하는 데에 해당 좌표를 활용할 수 있다. 또한, 삼각형을 interpolation 할 때 사용된다. 2. 변환은 모델링과 애니메이션에 .. 2022. 2. 9.
[Maya] 파이썬으로 모델링하기 (애니메이션 : 키프레임 설정, 숨 쉬는 트리) Modeling with Python (Animation : Setting Keyframe and Giving Breath) 2019. 3. 13. 10:39 일단 pymel 코드를 cmds로 변환시켰다. (애니메이션을 설정하기 편리하기 때문이었던 것 같다.) First, I converted pymel code to cmds. import maya.cmds as cmds import random myPyramids = [] #make pyramids for n in range (2872): myPyramids.append(cmds.polyPyramid()) count = 0 for x in range (20): yran = 20 - x for y in range (yran): zran = 20 - y for z in range (zran): cmds.select(myPyramids[count]) cmds.move(0.05*x.. 2020. 11. 7.
[Maya] 파이썬으로 모델링하기 (미러링된 트리) Modeling with Python (Mirrored Tree) 2019. 3. 13. 10:39 드디어, 어떻게 미러링하는지를 알게 되었다. I finally got how to mirror. 잎의 수를 늘리고, 더 큰 별을 달아주었다. more and tinier leaves, a big star import pymel.core as pm import random myPyramids = [] #make pyramids for n in range (2872): myPyramids.append(pm.polyPyramid()) count = 0 for x in range (20): yran = 20 - x for y in range (yran): zran = 20 - y for z in range (zran): pm.select(myPyramids[count]) pm... 2020. 11. 7.
[Maya] 파이썬으로 모델링하기 (크리스마스 트리 1/4) Modeling with Python (Quarter of a Christmas Tree) 2019. 3. 11. 22:08 지금까지 배운 것을 복습하기 위해 크리스마스 트리를 만들어보기로 했다. 빨강-초록 계열의 랜덤한 값을 가진 색상의 잎과, 맨 위에 노란 별을 가진 트리를 만들어보았다. I decided to make a Christmas tree which has green-red randomized-colored leaves and a yellow star on it. import pymel.core as pm import random myPyramids = [] #make pyramids for n in range (386): myPyramids.append(pm.polyPyramid()) count = 0 for x in range (10): yran = 10 - x for y i.. 2020. 11. 7.
[Maya] 파이썬으로 모델링하기 (크기, 회전, 색) Modeling with Python (Scale, Rotate, Color) 2019. 3. 11. 21:56 import pymel.core as pm myCubes = [] for n in range (1000): myCubes.append(pm.polyCube()) count = 0 for x in range (10): for y in range (10): for z in range (10): pm.select(myCubes[count]) pm.move(x, y, z) pm.scale(x/10.0, y/10.0, z/10.0) pm.rotate(x*10.0, y*10.0, z*10.0) pm.polyColorPerVertex(colorRGB=[1-x/10.0, 1-y/10.0, 1-z/10.0], colorDisplayOption=True) count = count +1 이.. 2020. 11. 7.
[Maya] 파이썬으로 모델링하기 (랜덤하게 위치하는 구) Modeling with Python (Random-moved Spheres) 2019. 3. 11. 21:49 import maya.cmds as cmds import random myspheres=[] for i in range(100): myspheres.append(cmds.polySphere()) for j in myspheres: cmds.move(random.randint(1,10), random.randint(1,10), random.randint(1,10), j) maya.cmds를 활용한 첫번째 모델이다. my first model made with maya.cmds 2020. 11. 7.
[Maya] 오토데스크 마야 Autodesk Maya 2019. 3. 11. 21:44 오토데스크 | 3D 설계, 엔지니어링 및 엔터테인먼트 소프트웨어 오토데스크는 보다 좋은 세상을 상상하고, 디자인하고, 만들기 위한 소프트웨어를 개발합니다. www.autodesk.co.kr 위 사이트에서 Maya라는 프로그램을 다운받았다. 3D 모델들을 만들기 위해 파이썬을 사용했다. I downloaded the program named Maya from 'autodesk.co.kr'. I'm going to use Python codes to create various 3D models. 파이썬이 기억이 안나서 도큐먼트를 보고 간단한 문법을 익혔다. So, I reviewed the basic Python syntax with the document of it. 마야.. 2020. 11. 7.