It is NOT well organized and NO game is made yet.
I just wanna keep a note about my thoughts about a pipeline for creating a multiplayer game. It is not specific to a single game but more a frame work or work flow. I hate reinventing the wheel so I prefer choosing existing tools.
I focus on the pure game itself so far. The external elements, such as log in UI or database, are not discussed here. I wanna describe my demands with keywords. Working along, low budget or no budget, indie, multi-player, real-time, and cross-platforms.
I would like to have these steps: graphic modeling, logic, and network.
I am using blender and 3ds max for modeling. I used blender at the beginning. It is free, and incredible powerful. It is perfect for all my modeling tasks. When I found out I can get 3ds max and all the related Autodesk software for free as a student, I gave it a try as it is a kind of industry standard and a lot of models online are in max format. And, it should be better somewhere and have better compatibility with other software as it is sold thousands of dollars. However I found out, so far, it is a little better. I still need some work to import max models into unity 3d. On current stage, I would stay on blender for a while, because I am more familiar with it now. Probably I will move to 3ds max.
There are also plenty of game engines, such as blender, unity 3d, unreal,cocos-2dx, and panda 3d. I am using all of those above. unity 3d and unreal is the best in terms of performance, cross-platforms and network support.If you just need a offline game, they are the best to go. blender is good for tiny prototypes on pc. It is still powerful and easy to use, at least to myself. However, I have never seen any serious games out of it, except some demos. For cocos-2dx or panda 3d, there is no GUI, generally speaking. You need to implement your world from sketch.
Networking is kind of new to gaming, as I have not find any game engine has network embedded for dummy users. In other words, you need to program anyway if you need online games. I am not sure if unity or unreal handles server-client either. As on the server side, you probably do not need any rendering but just logic.
To conclude so far. Offline games, go unity 3D or unreal. Online games, any one is ok, and implement your own server.
Showing posts with label notes. Show all posts
Showing posts with label notes. Show all posts
Saturday, January 4, 2014
Friday, October 25, 2013
opengl matrix, column major
When I implement lootat function with rotation and translation, I found out the opengl matrix is saved in column major, if you were using 1d array. 2d arrays are with the intuitive representations.
Thursday, October 24, 2013
Simple Makefile to compile and link all the cpp files in the folder
DEFINC := /usr/include/
LIBS := /usr/lib/
INC := $(DEFINC)
CXXFLAGS :=
CXXFLAGS = -I$(INC)
CXXFLAGS += -O2 -march=native
CXXFLAGS += -fPIC
LINK :=
LDFLAGS :=
LDFLAGS += -L$(LIBS) $(LINK)
CXX = g++
LD = g++
SRC := $(wildcard ./*.cpp)
OBJ := $(addprefix ./,$(notdir $(SRC:.cpp=.o)))
TARGET := test
all: $(TARGET)
$(TARGET): $(OBJ)
$(CXX) $(LDFLAGS) -o $@ $^
obj/%.o: src/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
clean :
rm -rf ./*.o $(TARGET)
LIBS := /usr/lib/
INC := $(DEFINC)
CXXFLAGS :=
CXXFLAGS = -I$(INC)
CXXFLAGS += -O2 -march=native
CXXFLAGS += -fPIC
LINK :=
LDFLAGS :=
LDFLAGS += -L$(LIBS) $(LINK)
CXX = g++
LD = g++
SRC := $(wildcard ./*.cpp)
OBJ := $(addprefix ./,$(notdir $(SRC:.cpp=.o)))
TARGET := test
all: $(TARGET)
$(TARGET): $(OBJ)
$(CXX) $(LDFLAGS) -o $@ $^
obj/%.o: src/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
clean :
rm -rf ./*.o $(TARGET)
Friday, January 25, 2013
PhysX linux linking
PhysX offers binary static libs for linux. Linking static libs under linux is tricky. Order matters.
I found -lPhysx3 must be the first one.
I found -lPhysx3 must be the first one.
Saturday, December 22, 2012
kinect openni win8
- Uninstall openni, nite, and the kinect driver.
- Windows key + R to open the run prompt
- shutdown.exe /r /o /f /t 00
- select troubleshoot
- select advanced
- select windows startup and then restart
- enter the option for Disable Driver Signature
- reinstall openni, nite, and the kinect driver
Thursday, December 20, 2012
archlinux 64 bit installation booting problem
I have this problem on my dell xps 630i desktop.
If I boot installation CD/usb to install 64 bit arch, it will crash and reboot. But 32 bit works fine. And 64 bit works on my other PCs.
I googled it and figured out it has something to do with the memory. 4G memory of the xps seems to bother arch 64bit kernel.
To solve this, I added "mem=2048M" to the boot script. Then the installation of 64 bit works.
The installed system works fine with any amount of memory.
If I boot installation CD/usb to install 64 bit arch, it will crash and reboot. But 32 bit works fine. And 64 bit works on my other PCs.
I googled it and figured out it has something to do with the memory. 4G memory of the xps seems to bother arch 64bit kernel.
To solve this, I added "mem=2048M" to the boot script. Then the installation of 64 bit works.
The installed system works fine with any amount of memory.
Wednesday, December 19, 2012
MinGW64, openblas, suitesparse, and numpy under windows 64 bit
First of all, I failed.Numpy works only partially. IO crashed it for sure.I did not test it further. But, at least, compiling was fine.
Numpy depends on openblas and suitesparse(umfpack) for performance, suitesparse depends on intel-tbb and metis. I just use pre-built metis for mingw64 on the sourceforge.
Here is my openblas script
make -j4 BINARY=64 CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran NUM_THREADS=2
I used 2 threads due to my i5 cpu.
Here is the intel-tbb script
mingw32-make.exe compiler=gcc arch=intel64 runtime=mingw
install -d ./pkg/usr/local/lib
install -m755 build/windows_*/*.dll* ./pkg/usr/local/lib
install -d ./pkg/usr/local/include
cp -a include/tbb ./pkg/usr/local/include
cd ./pkg
tar cvf tbb_4.1_msys64.tgz ./usr
tar -tf tbb_4.1_msys64.tgz > tbb_4.1_msys64.list
And my suitesparse script
export CFLAGS=" ${CFLAGS} -DNPARTITION"
mingw32-make CFLAGS="${CFLAGS} -fPIC -I/usr/local/include -L/usr/local/lib" METIS="-lmetis" SPQR_CONFIG="-DTIMING -DHAVE_TBB" TBB="-ltbb" BLAS="-lopenblas" LAPACK="-lopenblas" -C SuiteSparse_config/xerbla
mingw32-make CFLAGS="${CFLAGS} -fPIC -I/usr/local/include -L/usr/local/lib" METIS="-lmetis" SPQR_CONFIG="-DTIMING -DHAVE_TBB" TBB="-ltbb" BLAS="-lopenblas" LAPACK="-lopenblas" -C SuiteSparse_config
for _lib in AMD CAMD COLAMD BTF KLU CCOLAMD UMFPACK CHOLMOD CXSparse SPQR; do
mingw32-make CFLAGS="${CFLAGS} -fPIC -I/usr/local/include -L/usr/local/lib" METIS="-lmetis" SPQR_CONFIG="-DTIMING -DHAVE_TBB" TBB="-ltbb" BLAS="-lopenblas" LAPACK="-lopenblas" -C ${_lib} library
done
mkdir -p shared
gcc -shared -o shared/libsuitesparseconfig.dll -Wl,--out-implib,SuiteSparse_config/libsuitesparseconfig.a
gcc -shared -o shared/libamd.dll -Wl,--out-implib,AMD/Lib/libamd.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libcamd.dll -Wl,--out-implib,CAMD/Lib/libcamd.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libcolamd.dll -Wl,--out-implib,COLAMD/Lib/libcolamd.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libccolamd.dll -Wl,--out-implib,CCOLAMD/Lib/libccolamd.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libbtf.dll -Wl,--out-implib,BTF/Lib/libbtf.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libcholmod.dll -Wl,--out-implib,CHOLMOD/Lib/libcholmod.a -L/usr/local/lib -lopenblas -lmetis -L./shared -lamd -lcamd -lcolamd -lccolamd
gcc -shared -o shared/libspqr.dll -Wl,--out-implib,SPQR/Lib/libspqr.a -L/usr/local/lib -lopenblas -ltbb -L./shared -lcholmod
gcc -shared -o shared/libcxsparse.dll -Wl,--out-implib,CXSparse/Lib/libcxsparse.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libklu.dll -Wl,--out-implib,KLU/Lib/libklu.a -L./shared -lamd -lcolamd -lbtf
gcc -shared -o shared/libumfpack.dll -Wl,--out-implib,UMFPACK/Lib/libumfpack.a -L/usr/local/lib -lopenblas -L./shared -lamd
install -dm755 ${PWD}/pkg/usr/local/{lib,include}
#cp -d shared/*.so* $pkgdir/usr/lib
#install -m755 shared/*.so* $pkgdir/usr/lib
for _lib in SuiteSparse_config AMD CAMD COLAMD BTF KLU LDL CCOLAMD UMFPACK CHOLMOD CXSparse SPQR; do
mingw32-make CFLAGS="${CFLAGS} -fPIC -I/usr/local/include -L/usr/local/lib" METIS="-lmetis" SPQR_CONFIG="-DTIMING -DHAVE_TBB" TBB="-ltbb" BLAS="-lopenblas" LAPACK="-lopenblas" -C ${_lib} INSTALL_LIB=${PWD}/pkg/usr/local/lib INSTALL_INCLUDE=${PWD}/pkg/usr/local/include install
done
chmod 644 ${PWD}/pkg/usr/local/include/*.{h,hpp}
cp -d shared/*.dll* ${PWD}/pkg/usr/local/lib
cd ${PWD}/pkg
tar cvf suitesparse_4.0.2_mingw64.tgz ./usr
tar -tf suitesparse_4.0.2_mingw64.tgz > suitesparse_4.0.2_mingw64.list
Finally, numpy script
p:\\python27_64\\python.exe setup.py config_fc --fcompiler=gnu95 config --compiler="mingw32" config_fc --fcompiler=gnu95 build --compiler=p:\\MinGW\\bin\\g++.exe --compiler="mingw32" bdist_wininst
with this patch
diff -rup numpy-1.7.0b2/numpy/distutils/fcompiler/gnu.py numpy-1.7.0b2_patched/numpy/distutils/fcompiler/gnu.py
--- numpy-1.7.0b2/numpy/distutils/fcompiler/gnu.py 2012-09-19 21:16:52 -0400
+++ numpy-1.7.0b2_patched/numpy/distutils/fcompiler/gnu.py 2012-12-17 01:12:58 -0500
@@ -181,9 +181,9 @@ class GnuFCompiler(FCompiler):
# the following code is not needed (read: breaks) when using MinGW
# in case want to link F77 compiled code with MSVC
opt.append('gcc')
- runtime_lib = msvc_runtime_library()
- if runtime_lib:
- opt.append(runtime_lib)
+ #runtime_lib = msvc_runtime_library()
+ #if runtime_lib:
+ # opt.append(runtime_lib)
if sys.platform == 'darwin':
opt.append('cc_dynamic')
return opt
@@ -323,12 +323,12 @@ class Gnu95FCompiler(GnuFCompiler):
opt.insert(i+1, "mingwex")
opt.insert(i+1, "mingw32")
# XXX: fix this mess, does not work for mingw
- if is_win64():
- c_compiler = self.c_compiler
- if c_compiler and c_compiler.compiler_type == "msvc":
- return []
- else:
- raise NotImplementedError("Only MS compiler supported with gfortran on win64")
+ #if is_win64():
+ # c_compiler = self.c_compiler
+ # if c_compiler and c_compiler.compiler_type == "msvc":
+ # return []
+ # else:
+ # raise NotImplementedError("Only MS compiler supported with gfortran on win64")
return opt
def get_target(self):
diff -rup numpy-1.7.0b2/numpy/distutils/mingw32ccompiler.py numpy-1.7.0b2_patched/numpy/distutils/mingw32ccompiler.py
--- numpy-1.7.0b2/numpy/distutils/mingw32ccompiler.py 2012-09-04 17:31:31 -0400
+++ numpy-1.7.0b2_patched/numpy/distutils/mingw32ccompiler.py 2012-12-17 01:13:10 -0500
@@ -176,7 +176,8 @@ class Mingw32CCompiler(distutils.cygwinc
target_lang=None):
# Include the appropiate MSVC runtime library if Python was built
# with MSVC >= 7.0 (MinGW standard is msvcrt)
- runtime_library = msvc_runtime_library()
+ #runtime_library = msvc_runtime_library()
+ runtime_library = None
if runtime_library:
if not libraries:
libraries = []
diff -rup numpy-1.7.0b2/numpy/distutils/system_info.py numpy-1.7.0b2_patched/numpy/distutils/system_info.py
--- numpy-1.7.0b2/numpy/distutils/system_info.py 2012-09-04 17:31:31 -0400
+++ numpy-1.7.0b2_patched/numpy/distutils/system_info.py 2012-12-17 01:14:12 -0500
@@ -1340,10 +1340,16 @@ Make sure that -lgfortran is used for C+
class lapack_opt_info(system_info):
+ section = 'lapack_opt'
notfounderror = LapackNotFoundError
def calc_info(self):
+ info = self.calc_libraries_info()
+ if info:
+ self.set_info(**info)
+ return
+
if sys.platform == 'darwin' and not os.environ.get('ATLAS', None):
args = []
link_args = []
@@ -1429,10 +1435,16 @@ class lapack_opt_info(system_info):
class blas_opt_info(system_info):
+ section = 'blas_opt'
notfounderror = BlasNotFoundError
def calc_info(self):
+ info = self.calc_libraries_info()
+ if info:
+ self.set_info(**info)
+ return
+
if sys.platform == 'darwin' and not os.environ.get('ATLAS', None):
args = []
link_args = []
And site.cfg
[DEFAULT]
library_dirs = P:\\MinGW64\\msys64\\local\\lib
include_dirs = P:\\MinGW64\\msys64\\local\\include
[blas_opt]
#library_dirs = P:\\MinGW64\\msys64\\local\\lib
libraries = openblas_nehalemp-r0.2.5, gfortran
#libraries = openblas
[lapack_opt]
#library_dirs = P:\\MinGW64\\msys64\\local\\lib
libraries = openblas_nehalemp-r0.2.5, gfortran
#libraries = openblas
#[blas_opt]
#libraries = libopenblas_nehalemp-r0.2.5
#[lapack_opt]
#libraries = libopenblas_nehalemp-r0.2.5
#[blas_opt]
#libraries = f77blas, cblas, atlas
#
#[lapack_opt]
#libraries = lapack, f77blas, cblas, atlas
#
# If your ATLAS was compiled with pthreads, the names of the libraries might be
# different:
#
#[blas_opt]
#libraries = ptf77blas, ptcblas, atlas
#
#[lapack_opt]
#libraries = lapack, ptf77blas, ptcblas, atlas
[amd]
#library_dirs = P:\\MinGW64\\msys64\\local\\lib
amd_libs = amd
[umfpack]
#library_dirs = P:\\MinGW64\\msys64\\local\\lib
umfpack_libs = umfpack
Numpy depends on openblas and suitesparse(umfpack) for performance, suitesparse depends on intel-tbb and metis. I just use pre-built metis for mingw64 on the sourceforge.
Here is my openblas script
make -j4 BINARY=64 CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran NUM_THREADS=2
I used 2 threads due to my i5 cpu.
Here is the intel-tbb script
mingw32-make.exe compiler=gcc arch=intel64 runtime=mingw
install -d ./pkg/usr/local/lib
install -m755 build/windows_*/*.dll* ./pkg/usr/local/lib
install -d ./pkg/usr/local/include
cp -a include/tbb ./pkg/usr/local/include
cd ./pkg
tar cvf tbb_4.1_msys64.tgz ./usr
tar -tf tbb_4.1_msys64.tgz > tbb_4.1_msys64.list
And my suitesparse script
export CFLAGS=" ${CFLAGS} -DNPARTITION"
mingw32-make CFLAGS="${CFLAGS} -fPIC -I/usr/local/include -L/usr/local/lib" METIS="-lmetis" SPQR_CONFIG="-DTIMING -DHAVE_TBB" TBB="-ltbb" BLAS="-lopenblas" LAPACK="-lopenblas" -C SuiteSparse_config/xerbla
mingw32-make CFLAGS="${CFLAGS} -fPIC -I/usr/local/include -L/usr/local/lib" METIS="-lmetis" SPQR_CONFIG="-DTIMING -DHAVE_TBB" TBB="-ltbb" BLAS="-lopenblas" LAPACK="-lopenblas" -C SuiteSparse_config
for _lib in AMD CAMD COLAMD BTF KLU CCOLAMD UMFPACK CHOLMOD CXSparse SPQR; do
mingw32-make CFLAGS="${CFLAGS} -fPIC -I/usr/local/include -L/usr/local/lib" METIS="-lmetis" SPQR_CONFIG="-DTIMING -DHAVE_TBB" TBB="-ltbb" BLAS="-lopenblas" LAPACK="-lopenblas" -C ${_lib} library
done
mkdir -p shared
gcc -shared -o shared/libsuitesparseconfig.dll -Wl,--out-implib,SuiteSparse_config/libsuitesparseconfig.a
gcc -shared -o shared/libamd.dll -Wl,--out-implib,AMD/Lib/libamd.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libcamd.dll -Wl,--out-implib,CAMD/Lib/libcamd.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libcolamd.dll -Wl,--out-implib,COLAMD/Lib/libcolamd.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libccolamd.dll -Wl,--out-implib,CCOLAMD/Lib/libccolamd.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libbtf.dll -Wl,--out-implib,BTF/Lib/libbtf.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libcholmod.dll -Wl,--out-implib,CHOLMOD/Lib/libcholmod.a -L/usr/local/lib -lopenblas -lmetis -L./shared -lamd -lcamd -lcolamd -lccolamd
gcc -shared -o shared/libspqr.dll -Wl,--out-implib,SPQR/Lib/libspqr.a -L/usr/local/lib -lopenblas -ltbb -L./shared -lcholmod
gcc -shared -o shared/libcxsparse.dll -Wl,--out-implib,CXSparse/Lib/libcxsparse.a -L./shared -lsuitesparseconfig
gcc -shared -o shared/libklu.dll -Wl,--out-implib,KLU/Lib/libklu.a -L./shared -lamd -lcolamd -lbtf
gcc -shared -o shared/libumfpack.dll -Wl,--out-implib,UMFPACK/Lib/libumfpack.a -L/usr/local/lib -lopenblas -L./shared -lamd
install -dm755 ${PWD}/pkg/usr/local/{lib,include}
#cp -d shared/*.so* $pkgdir/usr/lib
#install -m755 shared/*.so* $pkgdir/usr/lib
for _lib in SuiteSparse_config AMD CAMD COLAMD BTF KLU LDL CCOLAMD UMFPACK CHOLMOD CXSparse SPQR; do
mingw32-make CFLAGS="${CFLAGS} -fPIC -I/usr/local/include -L/usr/local/lib" METIS="-lmetis" SPQR_CONFIG="-DTIMING -DHAVE_TBB" TBB="-ltbb" BLAS="-lopenblas" LAPACK="-lopenblas" -C ${_lib} INSTALL_LIB=${PWD}/pkg/usr/local/lib INSTALL_INCLUDE=${PWD}/pkg/usr/local/include install
done
chmod 644 ${PWD}/pkg/usr/local/include/*.{h,hpp}
cp -d shared/*.dll* ${PWD}/pkg/usr/local/lib
cd ${PWD}/pkg
tar cvf suitesparse_4.0.2_mingw64.tgz ./usr
tar -tf suitesparse_4.0.2_mingw64.tgz > suitesparse_4.0.2_mingw64.list
Finally, numpy script
p:\\python27_64\\python.exe setup.py config_fc --fcompiler=gnu95 config --compiler="mingw32" config_fc --fcompiler=gnu95 build --compiler=p:\\MinGW\\bin\\g++.exe --compiler="mingw32" bdist_wininst
with this patch
diff -rup numpy-1.7.0b2/numpy/distutils/fcompiler/gnu.py numpy-1.7.0b2_patched/numpy/distutils/fcompiler/gnu.py
--- numpy-1.7.0b2/numpy/distutils/fcompiler/gnu.py 2012-09-19 21:16:52 -0400
+++ numpy-1.7.0b2_patched/numpy/distutils/fcompiler/gnu.py 2012-12-17 01:12:58 -0500
@@ -181,9 +181,9 @@ class GnuFCompiler(FCompiler):
# the following code is not needed (read: breaks) when using MinGW
# in case want to link F77 compiled code with MSVC
opt.append('gcc')
- runtime_lib = msvc_runtime_library()
- if runtime_lib:
- opt.append(runtime_lib)
+ #runtime_lib = msvc_runtime_library()
+ #if runtime_lib:
+ # opt.append(runtime_lib)
if sys.platform == 'darwin':
opt.append('cc_dynamic')
return opt
@@ -323,12 +323,12 @@ class Gnu95FCompiler(GnuFCompiler):
opt.insert(i+1, "mingwex")
opt.insert(i+1, "mingw32")
# XXX: fix this mess, does not work for mingw
- if is_win64():
- c_compiler = self.c_compiler
- if c_compiler and c_compiler.compiler_type == "msvc":
- return []
- else:
- raise NotImplementedError("Only MS compiler supported with gfortran on win64")
+ #if is_win64():
+ # c_compiler = self.c_compiler
+ # if c_compiler and c_compiler.compiler_type == "msvc":
+ # return []
+ # else:
+ # raise NotImplementedError("Only MS compiler supported with gfortran on win64")
return opt
def get_target(self):
diff -rup numpy-1.7.0b2/numpy/distutils/mingw32ccompiler.py numpy-1.7.0b2_patched/numpy/distutils/mingw32ccompiler.py
--- numpy-1.7.0b2/numpy/distutils/mingw32ccompiler.py 2012-09-04 17:31:31 -0400
+++ numpy-1.7.0b2_patched/numpy/distutils/mingw32ccompiler.py 2012-12-17 01:13:10 -0500
@@ -176,7 +176,8 @@ class Mingw32CCompiler(distutils.cygwinc
target_lang=None):
# Include the appropiate MSVC runtime library if Python was built
# with MSVC >= 7.0 (MinGW standard is msvcrt)
- runtime_library = msvc_runtime_library()
+ #runtime_library = msvc_runtime_library()
+ runtime_library = None
if runtime_library:
if not libraries:
libraries = []
diff -rup numpy-1.7.0b2/numpy/distutils/system_info.py numpy-1.7.0b2_patched/numpy/distutils/system_info.py
--- numpy-1.7.0b2/numpy/distutils/system_info.py 2012-09-04 17:31:31 -0400
+++ numpy-1.7.0b2_patched/numpy/distutils/system_info.py 2012-12-17 01:14:12 -0500
@@ -1340,10 +1340,16 @@ Make sure that -lgfortran is used for C+
class lapack_opt_info(system_info):
+ section = 'lapack_opt'
notfounderror = LapackNotFoundError
def calc_info(self):
+ info = self.calc_libraries_info()
+ if info:
+ self.set_info(**info)
+ return
+
if sys.platform == 'darwin' and not os.environ.get('ATLAS', None):
args = []
link_args = []
@@ -1429,10 +1435,16 @@ class lapack_opt_info(system_info):
class blas_opt_info(system_info):
+ section = 'blas_opt'
notfounderror = BlasNotFoundError
def calc_info(self):
+ info = self.calc_libraries_info()
+ if info:
+ self.set_info(**info)
+ return
+
if sys.platform == 'darwin' and not os.environ.get('ATLAS', None):
args = []
link_args = []
And site.cfg
[DEFAULT]
library_dirs = P:\\MinGW64\\msys64\\local\\lib
include_dirs = P:\\MinGW64\\msys64\\local\\include
[blas_opt]
#library_dirs = P:\\MinGW64\\msys64\\local\\lib
libraries = openblas_nehalemp-r0.2.5, gfortran
#libraries = openblas
[lapack_opt]
#library_dirs = P:\\MinGW64\\msys64\\local\\lib
libraries = openblas_nehalemp-r0.2.5, gfortran
#libraries = openblas
#[blas_opt]
#libraries = libopenblas_nehalemp-r0.2.5
#[lapack_opt]
#libraries = libopenblas_nehalemp-r0.2.5
#[blas_opt]
#libraries = f77blas, cblas, atlas
#
#[lapack_opt]
#libraries = lapack, f77blas, cblas, atlas
#
# If your ATLAS was compiled with pthreads, the names of the libraries might be
# different:
#
#[blas_opt]
#libraries = ptf77blas, ptcblas, atlas
#
#[lapack_opt]
#libraries = lapack, ptf77blas, ptcblas, atlas
[amd]
#library_dirs = P:\\MinGW64\\msys64\\local\\lib
amd_libs = amd
[umfpack]
#library_dirs = P:\\MinGW64\\msys64\\local\\lib
umfpack_libs = umfpack
Friday, November 16, 2012
blender linux gpu
"CUDA device supported only with compute capability 1.3 or up, found 1.1"
I got this error, when I tried gpu rendering for cycles render. (I needed to check gpu on in the system setting first.) I was not sure how comes my 9800GT became an "old" device.
There is a way to walk around. In the render settings of cycles render. Choose experimental feature set, and GPU compute device. After a long time compiling, GPU works.
I got this error, when I tried gpu rendering for cycles render. (I needed to check gpu on in the system setting first.) I was not sure how comes my 9800GT became an "old" device.
There is a way to walk around. In the render settings of cycles render. Choose experimental feature set, and GPU compute device. After a long time compiling, GPU works.
Wednesday, November 14, 2012
spyder and mayavi
It is not only about mayavi on spyder.
If u run mayavi via spyder, u might have "ValueError: API 'QString' has already been set to version 1". Spyder uses api 1 by default, while many other modules require api 2. U can can the console setting in spyder. Under the external modules. Change the api to api 2.
So far, it works fine for me.
If u run mayavi via spyder, u might have "ValueError: API 'QString' has already been set to version 1". Spyder uses api 1 by default, while many other modules require api 2. U can can the console setting in spyder. Under the external modules. Change the api to api 2.
So far, it works fine for me.
Thursday, October 18, 2012
batch rename to lower case
for f in `find`; do mv -v $f `echo $f | tr '[A-Z]' '[a-z]'`; done
Monday, July 9, 2012
ios texture from UIImage
CGContextRef spriteContext = CGBitmapContextCreate(spriteData, width, height, 8, width*4, CGImageGetColorSpace(spriteImage), kCGImageAlphaPremultipliedLast);
This function is employed in many tutorials. There is trick with alpha channel. It seems to fill no zero alpha pixels only. spriteData here has to be set to zero first. Otherwise, the background will be random.
This function is employed in many tutorials. There is trick with alpha channel. It seems to fill no zero alpha pixels only. spriteData here has to be set to zero first. Otherwise, the background will be random.
Tuesday, May 15, 2012
ICS is not working perfect on my evo3d so far
Stock kernel is not working, causing boot loop. The only working kernel is AnthraX-htcleak-rls1. However it is buggy. 3D is broken, and it drains battery. I just switch back to mean GB.
4ext touch recovery does work on s-on. It will pend boot section and flash it next reboot.
4ext touch recovery does work on s-on. It will pend boot section and flash it next reboot.
Friday, May 11, 2012
flash any roms with s-on
I have 1.5 hboot s-on on my evo 3d cdma.
(It is said that 4ext can flash with s-on, but I did have it at that time. Will try it later.)
I just flash with recovery-clockwork-touch-5.8.0.2-shooter.img in my boot section.
1. fastboot flash boot recovery-clockwork-touch-5.8.0.2-shooter.img
2. reboot
3. You should in recovery mode now. Flash any rom/patch/kernel from your sdcard, before you reboot.
4. reboot
5. enjoy
Note: It is only one time job. After step 4, your boot section is locked again because s-on.
I tested Mean rom and Newts One S ICS roms with AnthraX-htcleak-rls1 kernel. Now I am on Mean. Everything is fine so far.
(It is said that 4ext can flash with s-on, but I did have it at that time. Will try it later.)
I just flash with recovery-clockwork-touch-5.8.0.2-shooter.img in my boot section.
1. fastboot flash boot recovery-clockwork-touch-5.8.0.2-shooter.img
2. reboot
3. You should in recovery mode now. Flash any rom/patch/kernel from your sdcard, before you reboot.
4. reboot
5. enjoy
Note: It is only one time job. After step 4, your boot section is locked again because s-on.
I tested Mean rom and Newts One S ICS roms with AnthraX-htcleak-rls1 kernel. Now I am on Mean. Everything is fine so far.
Monday, May 7, 2012
gamekit blender windows file path
It seems that blender uses relative path under windows (win7 in my case) for external files such as image texture. Then gamekit engine will fail to find those files. Make those paths absolute will solve the problem.
blender gamekit gcc4.7
OIS in gamekit is not compiling with gcc 4.7. "write" is not declared.
Add #include <unistd.h> where write is called.
Add #include <unistd.h> where write is called.
blender 2.63 stereo game engine
blender stereo works fine under win7 without any problems so far. However, under linux (arch in my case) side-by-side stereo or similar cases will fail with "X11 glXQueryVersion() failes, verify working openGL system! initial window could not find GLX extension, exit!"
I patch intern/ghost/intern/GHOST_WindowX11.cpp anyway. It might cause other problems, but side-by-side stereo works for me so far.
PS: patch file
Only in blender-2.63: build
diff -rup blender-2.63/intern/ghost/intern/GHOST_WindowX11.cpp patched/intern/ghost/intern/GHOST_WindowX11.cpp
--- blender-2.63/intern/ghost/intern/GHOST_WindowX11.cpp 2012-04-26 16:41:12.000000000 -0400
+++ patched/intern/ghost/intern/GHOST_WindowX11.cpp 2012-05-07 16:16:50.000000000 -0400
@@ -209,8 +209,8 @@ GHOST_WindowX11(
for (samples = m_numOfAASamples; samples >= 0; samples--) {
i = 0; /* Reusing attributes array, so reset counter */
- if(m_stereoVisual)
- attributes[i++] = GLX_STEREO;
+ //if(m_stereoVisual)
+ // attributes[i++] = GLX_STEREO;
attributes[i++] = GLX_RGBA;
attributes[i++] = GLX_DOUBLEBUFFER;
I patch intern/ghost/intern/GHOST_WindowX11.cpp anyway. It might cause other problems, but side-by-side stereo works for me so far.
PS: patch file
Only in blender-2.63: build
diff -rup blender-2.63/intern/ghost/intern/GHOST_WindowX11.cpp patched/intern/ghost/intern/GHOST_WindowX11.cpp
--- blender-2.63/intern/ghost/intern/GHOST_WindowX11.cpp 2012-04-26 16:41:12.000000000 -0400
+++ patched/intern/ghost/intern/GHOST_WindowX11.cpp 2012-05-07 16:16:50.000000000 -0400
@@ -209,8 +209,8 @@ GHOST_WindowX11(
for (samples = m_numOfAASamples; samples >= 0; samples--) {
i = 0; /* Reusing attributes array, so reset counter */
- if(m_stereoVisual)
- attributes[i++] = GLX_STEREO;
+ //if(m_stereoVisual)
+ // attributes[i++] = GLX_STEREO;
attributes[i++] = GLX_RGBA;
attributes[i++] = GLX_DOUBLEBUFFER;
Wednesday, May 2, 2012
reverse video clip with ffmpeg
Dump all video frames
$ ffmpeg -i input.mkv -an -qscale 1 %06d.jpg
Dump audio
$ ffmpeg -i input.mkv -vn -ac 2 audio.wav
Reverse audio
$ sox -V audio.wav backwards.wav reverse
Cat video frames in reverse order to FFmpeg as input
$ cat $(ls -rv *jpg) | ffmpeg -f image2pipe -vcodec mjpeg -r 25 -i - -i backwards.wav -vcodec libx264 -vpre slow -crf 20 -threads 0 -acodec flac output.mkv
Use mencoder to deinterlace PAL dv and double the frame rate from 25 to 50, then pipe to FFmpeg.
$ mencoder input.dv -of rawvideo -ofps 50 -ovc raw -vf yadif=3,format=i420 -nosound
If there is no audio, this command works for me.
cat $(ls -rv *jpg) | ffmpeg -f image2pipe -vcodec mjpeg -i - -vcodec mpeg4 -sameq -r 24 output.avi
$ ffmpeg -i input.mkv -an -qscale 1 %06d.jpg
Dump audio
$ ffmpeg -i input.mkv -vn -ac 2 audio.wav
Reverse audio
$ sox -V audio.wav backwards.wav reverse
Cat video frames in reverse order to FFmpeg as input
$ cat $(ls -rv *jpg) | ffmpeg -f image2pipe -vcodec mjpeg -r 25 -i - -i backwards.wav -vcodec libx264 -vpre slow -crf 20 -threads 0 -acodec flac output.mkv
Use mencoder to deinterlace PAL dv and double the frame rate from 25 to 50, then pipe to FFmpeg.
$ mencoder input.dv -of rawvideo -ofps 50 -ovc raw -vf yadif=3,format=i420 -nosound
If there is no audio, this command works for me.
cat $(ls -rv *jpg) | ffmpeg -f image2pipe -vcodec mjpeg -i - -vcodec mpeg4 -sameq -r 24 output.avi
Sunday, April 22, 2012
watch out cuda - gcc compatibility
Here is the doc of cuda 4.2 release node. I tried Fedora14 version with gcc 4.4, and got GLIBCXX linking error. When I switched back to ubuntu 10.04 version, everything is fine so far.
Distro 32 64 Kernel GCC GLIBC ------ -- -- ------ --- ----- Fedora14 X X 2.6.35.6-45 4.5.1 2.12.90 ICC Compiler 11.1 X X OpenSUSE-11.2 X X 2.6.31.5-0.1 4.4.1 2.10.1 RHEL-5.>=5 X X 2.6.18-238.el5 4.1.2 2.5 (5.5, 5.6, 5.7) RHEL-6.X X 2.6.32- 4.4.5 2.12 (6.0, 6.1) 131.0.15.el6 SLES 11.1 X X 2.6.32.12-0.7-pae 4.3-62.198 2.11.1-0.17.4 Ubuntu-10.04 X X 2.6.35-23-generic 4.4.5 2.12.1 Ubuntu-11.04 X X 2.6.38-8-generic 4.5.2 2.13
Monday, April 16, 2012
vtk conflicts with openjdk7 on my archlinux
cmake produced error with openjdk7. After replacing it with openjdk6 everything is fine.
Saturday, April 14, 2012
merge pdf with
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf
Subscribe to:
Posts (Atom)