投稿

ラベル(tutorial)が付いた投稿を表示しています

Tutorial Swig 2.0.9 and Ubuntu12.10(64bit)

Now, swig tutorial is as follows. ( http://www.swig.org/tutorial.html ) Building a Python module $ sudo apt-get install python3.2-dev-all $ swig -python example.i $ gcc -c example.c example_wrap.c -I/usr/include/python3.2 -fPIC $ ld -shared example.o example_wrap.o -o _example.so $ python3.2 Python 3.2.3 (default, Oct 19 2012, 19:53:16)  [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import example >>> example.fact(5) 120 >>> example.my_mod(7,3) 1 >>> example.get_time() 'Sun Mar 31 11:48:42 2013\n' >>>  If you do not specify the '-fPIC' of options to the compiler, the following error occurs in GNU/Linux(ELF system).  $ ld -shared example.o example_wrap.o -o _example.so  ld: example_wrap.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -...

Cycles render

イメージ
ここ1,2年の NVIDIA  GTXのビデオカードを持っていれば、やってみたくなるのがBlender cycles。わかりやすいTutorialが公開されているのでおすすめである(英語)。 Node Editorを使いMaterialを編集&チェックを繰り返しながら作りこんでいく基礎が説明されている。 ちょと音がうるさいがシンプル http://www.man-i-can.com/category/cycles-videos/ おなじみのCgcook http://cgcookie.com/blender/2011/09/16/introduction-blender-cycles-render-engine/ 若干Ver2.66とはメニューの細かなところが異なるが、ちょと考えればわかると思う。 2万円以下で入手可能になってきたGTX660では問題なく、試すことが可能である。 Ubuntu(Linux)の注意点として、NVIDIAのProprietary driverを使わないとGPU/CUDAを使えるようにならないので注意されたい。ボクはVersion 310.14を使った。現在のNouveau driverではCUDAを使えない。また最新のKernel3.8はNVIDAの3Dアクセラレータがほとんど対応になるだけで、ぱっとみたところCUDAについては一切書かれていない(たぶんw)。 他にはお馴染みの http://www.blendtuts.com がある。 http://www.blendtuts.com/Cycles_intro  なお、レンダリングを美しくみたいときはRender->Sampling tab内 Samples/Render:を200, 500にすればいい。ただし、当然、遅くなる。