Thursday, January 6, 2011

Segment 3D model in blender to get a separate OBJ goup



Procedure:

1) Laso select desired faces in edit mode - CTL+LMS drag (use vertex/edge/face selection as needed - buttons at the right end). First select roughly and unlselect (CTR+Shift+LMS drag) to refine the selection. Edge mode helps here.

2) Split by pressing 'p' (split P mesh/vertex/split)

3) Select the part in object mode (tab) and give object and data block name in Link and Materials window.

4) Select all and export as obj (Say export blender objects as OBJ groups using the buttons at the bottom)


Refs:

http://wiki.blender.org/index.php/Doc:Manual/Modeling/Objects/Groups_and_Parenting
http://wiki.blender.org/index.php/Doc:Manual/Modeling/Meshes/Selection

Tuesday, November 30, 2010

Emacs as an IDE

http://deep.syminet.com/emacside.html

Wednesday, April 7, 2010

Fast rendering 2D projections of 3D model data

The renderer performs a high speed rendering of a Autodesk 3DS model, using OpenGL offscreen rendering. The rendered image could be pixel intensities, surface normal values or other attributes.

Given a 3DS model like this:



For a given rotation, shift and scale, a 2D projection like this is rendered. Intensity values are returned/stored in memory for further processing.




Alternatively, other attributes like surface normal components could also be rendered instead of the color intensities.

For example x, y, z components of the model surface normals have been rendered in the 3 images below.






Tuesday, March 16, 2010

shell script to rename all UPPERCASE files to lowercase

for f in *; do
g=`expr "xxx$f" : 'xxx\(.*\)' | tr '[A-Z]' '[a-z]'`
mv "$f" "$g"
done

Tuesday, March 9, 2010

Notes on compiling mex file without gcc version warning

http://www.mathworks.com/access/helpdesk_r13/help/techdoc/matlab_prog/ch7_pe30.html#784594


Changed mexopts.sh as (Matlab2009b/bim/mexopts.sh is changed use mex -setup to select that conf as the default after the changes)

glnx86)
#----------------------------------------------------------------------------
RPATH="-Wl,-rpath-link,$TMW_ROOT/bin/$Arch"
# StorageVersion: 1.0
# CkeyName: GNU C
# CkeyManufacturer: GNU
# CkeyLanguage: C
# CkeyVersion:

#CC='gcc'
CC='gcc-4.1'

#CFLAGS='-ansi -D_GNU_SOURCE'
#Srimal: we allow // style comments due to opencv .h files
CFLAGS='-D_GNU_SOURCE'

Friday, March 5, 2010

Run mex functions using opencv 2.0 code with MATLAB R2009b

We get this error:

??? Invalid MEX-file '/home/srimal/svnworking/renderer/mexLossC/mexLossC.mexglx':
/home/srimal/MatlabR2009b/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by
/usr/local/lib/libcvaux.so.4).

Solution:

~/MatlabR2009b/sys/os/glnx86
ln -s /usr/lib/libstdc++.so.6.0.13 ~/MatlabR2009b/sys/os/glnx86/libstdc++.so.6