- Normal backup / connectivity testing in the morning
- Deployed an update to fix mismatching POCs when creating a funding request
- Spoke to Tangie about the update
- Meeting with Mike H. and others about the Vis Tool Status. Results of the meeting:
- Next week we need to do ‘internal’ testing of outside connections
- The following week we need to provide a demo of the capability of PPM, PA, and Visibility
- The next week we will do tests with individuals from site, before that we will test their connectivity and PKI support
Category Archives: VISIBILITY
Phil 2.23.12
8:00 – 4:30 FP
- Step 1 – make a screen-aligned ortho polygon and make sure it’s drawing correctly with a simple shader, and that the text overlay still works – done
- Step 2 – copy texture code over from modified pix_buffs.cpp – done. Other textures seem to mess everything up.
- Added glActiveTexture(GL_TEXTURE0); to SolarSystem, which fixed the missing texture problem, but the screen texture still gets messed up. GOing to try putting in pieces of SolarSystem to find where it breaks, since everything works fine with just the Grid
- Filling out matrix
- Back to shaders. For some reason, I have to make sure that the screenwidth is evenly divisible by 4. Not sure why, but it’s easily fixed. So now we have this!

- Committed everything to svn
Phil 2.22.12
Phil 2.21.12
8:30 – FP
- Reworking Gl_ShaderWindow so that it renders to a texture. Slow, slow progress.
- Downloaded the code that goes with the OpenGL 4.0 Shading Cookbook. They seem to be using screen-aligned quads, which is more in line with the blur example. Going to work with that for a while.
- Made a copy of the pix_buffs demo, and am now trying to simplify
Phil 2.20.12
9:30 – 3:00 FP
- Biting the bullet and installing R on fgmdev. Installed, and working on getting all the packages in.
- Installed the folllowing
- install.packages(“Rserve”)
- apt-get install r-cran-car then library(car)
- install.packages(“vcd”)
- apt-get install r-cran-gplots then library(gplots)
- install.packages(“pwr”)
- had to re-run library(gplots) so that plotmeans was visible correctly
- After installing all the packages, I bounced Rserve, and then remembered that I had to bounce tomcat. Which took a *while* to restart.
- everything appears to be running correctly 🙂
Here’s the current list:
Packages in library '/usr/local/lib/R/site-library':
colorspace Color Space Manipulation
mvtnorm Multivariate Normal and t Distributions
pwr Basic functions for power analysis
Rserve Binary R server
vcd Visualizing Categorical Data
Packages in library '/usr/lib/R/site-library':
car Companion to Applied Regression
gdata Various R programming tools for data
manipulation
gplots Various R programming tools for plotting data
gtools Various R programming tools
multcomp Simultaneous Inference in General Parametric
Models
mvtnorm Multivariate Normal and t Distributions
Packages in library '/usr/lib/R/library':
base The R Base Package
boot Bootstrap R (S-Plus) Functions (Canty)
class Functions for Classification
cluster Cluster Analysis Extended Rousseeuw et al.
codetools Code Analysis Tools for R
datasets The R Datasets Package
foreign Read Data Stored by Minitab, S, SAS, SPSS,
Stata, Systat, dBase, ...
graphics The R Graphics Package
grDevices The R Graphics Devices and Support for Colours
and Fonts
grid The Grid Graphics Package
KernSmooth Functions for kernel smoothing for Wand & Jones
(1995)
lattice Lattice Graphics
MASS Main Package of Venables and Ripley's MASS
methods Formal Methods and Classes
mgcv GAMs with GCV smoothness estimation and GAMMs
by REML/PQL
nlme Linear and Nonlinear Mixed Effects Models
nnet Feed-forward Neural Networks and Multinomial
Log-Linear Models
rpart Recursive Partitioning
spatial Functions for Kriging and Point Pattern
Analysis
splines Regression Spline Functions and Classes
stats The R Stats Package
stats4 Statistical Functions using S4 Classes
survival Survival analysis, including penalised
likelihood.
tcltk Tcl/Tk Interface
tools Tools for Package Development
utils The R Utils Package
- Came upon an interesting thing: http://rapache.net/ it’s a pretty slick VISIBILITY-ish looking thing. Need to spend some time figuring out how it works. Not all that clear yet.
- OK, back to shaders and such.
- And I just got why rendering the entire scene to a framebuffer that you then process is important. It’s because you can post process the texture (i.e. the entire scene) to get blur, bloom, and other effects. Cool. Well, I know what I’m doing tomorrow.
Phil 2.17.12
8:30 – FP
- Started off the day with sprites. Here’s a starfield:

- The neat thing about this is that the stars are handled as sprites, which means that it’s possible to handle text overlay with a shader now. I think that the way it could be done would be to create a single grid with all the characters and pass that to the vertex shader with the XY index and size of the letter. The vertex shader moves the texture so that the letter is centered and then passes off the texture and size to the fragment shader, which clips the output so only the particular letter is shown. Not going to do that yet, but it’s probably the first tool after I finish the book.
- Here’s a tutorial on how to make the text texture: http://nehe.gamedev.net/tutorial/2d_texture_font/18002/
- Worked my way through the pixBuffer/motion blur section, but I don’t think it’s worth incorporating into the framework.
Phil 2.16.12
8:30 – 4:30 FP
- Reflection cube maps today
- And they are working! The trick to handling rotating reflections is the following (note that the camera matrix is determined before the model roation, and the surface normal is calculated after the rotation.):
M3DMatrix44f mCameraRotOnly; M3DMatrix44f mInverseCamera; M3DMatrix33f mNormalMat; const M3DMatrix44f &mCamera = modelViewStack.GetMatrix(); modelViewStack.PushMatrix(); modelViewStack.Rotate(angle, 0.0f, 1.0f, 0.0f); orient44fromMat44(mCameraRotOnly, mCamera); orient33fromMat44(mNormalMat, modelViewStack.GetMatrix()); m3dInvertMatrix44(mInverseCamera, mCameraRotOnly); projectionStack.PushMatrix(); projectionStack.MultMatrix(modelViewStack.GetMatrix()); glUseProgram(reflectionShader); glUniformMatrix4fv(locMVPReflect, 1, GL_FALSE, projectionStack.GetMatrix()); glUniformMatrix4fv(locMVReflect, 1, GL_FALSE, modelViewStack.GetMatrix()); glUniformMatrix3fv(locNormalReflect, 1, GL_FALSE, mNormalMat); glUniformMatrix4fv(locInvertedCamera, 1, GL_FALSE, mInverseCamera); triangleBatch.Draw(); glUseProgram(NULL); projectionStack.PopMatrix(); modelViewStack.PopMatrix();
Phil 2.15.12
8:30 – 4:30 FP
- Making good, albiet slow progress on shaders. It’s kind of like programming in pre IDE-days; edit in vim then submit to the GPU compiler for a cryptic message. On the list of things to do is a framework that allows for the more sophisticated editing of shaders in the context of a running program. Will probably do this is Java for eclipse. Looks like there’s a starting point here: http://glshaders.sourceforge.net/
- Nice progress so far. Let’s see if this video uploads…
- solarSystem
- Useful post on how to make a skybox with photoshop: http://www.interlopers.net/forum/viewtopic.php?f=44&t=31549
- Going to set up a new project – ShaderLearning2
- Use frame this time in Gl_ShaderWindow. Nope, I need Euler Angles for this.
- Need to install R on the new server.
Dong Shin 02.10.2011
- Spring Roo doesn’t parse complex tables (and relations) correctly. Somehow it throws exceptions when try to access some tables. Looking at other things.
- Sidetracked to Spring, Hibernate, Struts2 training
- very good video tutorial at http://javabrains.koushik.org/ (long, really long)
- Hibernate Tools has capability to reverse engineer database
- sample Hibernate project using MySQL
- svn://fgmdev.com/trunk/Sandbox_folders/DONG_SANDBOX/HibernateProj
- putting Maven, GWT, Spring, Hibernate together
- http://www.javacodegeeks.com/2010/07/gwt-2-spring-3-jpa-2-hibernate-35.html
- modifying projects to use the latest artifacts
Phil 2.10.12
8:00 – 6:00 FP
- Cleaning up the texture allocation scheme by going to a singleton class like Dprint. Nope, after looking into it, the glGenTextures is guaranteed to return unique handles to textures each time it’s called.
- Pretty picture:

- Oh, boy, I get to redo my security form! I guess that’s what I’m spending the rest of the day on.
- But then the Internet broke, and I had my graphics book cached locally. Can’t work on forms. Darn.
Phil 2.9.12
Phil 2.8.12
8:30 – 5:30 FP
- Getting DrawableObject and subclasses to work
- No, working on formatting my resume for Jesse. This literally took 3 1/2 hours. I guess I’ll start after lunch
- More reasons not to use Flash any more.
- Stacking matrices are working just fine 🙂

Phil 2.7.12
8:30 – 5:00 FP
- Working on how to chain matrices.
- Old-school:
-
glRotatef(eyeOrient[0], 1, 0, 0); glRotatef(eyeOrient[2], 0, 1, 0); glTranslatef(eyePos[0], eyePos[1], eyePos[2]); // global world transformations glTranslatef(worldPos[0], worldPos[1], worldPos[2]); glRotatef(worldOrient[0], 1, 0, 0); glRotatef(worldOrient[1], 0, 1, 0);
- And How it’s done now:
-
m3dLoadIdentity44(workingMatrix); m3dLoadIdentity44(worldMat); m3dLoadIdentity44(eyeMat); m3dLoadIdentity44(tmat); m3dLoadIdentity44(rmat1); m3dLoadIdentity44(rmat2); // handle eyepoint transformations m3dRotationMatrix44(rmat1, eyeOrient[0], 1, 0, 0); m3dRotationMatrix44(rmat2, eyeOrient[2], 0, 1, 0); m3dTranslationMatrix44(tmat, eyePos[0], eyePos[1], eyePos[2]); m3dMatrixMultiply44(eyeMat, rmat2, eyeMat); m3dMatrixMultiply44(eyeMat, rmat1, eyeMat); m3dMatrixMultiply44(eyeMat, tmat, eyeMat); // handle global world transformations m3dTranslationMatrix44(tmat, worldPos[0], worldPos[1], worldPos[2]); m3dRotationMatrix44(rmat1, worldOrient[0], 1, 0, 0); m3dRotationMatrix44(rmat2, worldOrient[1], 0, 1, 0); m3dMatrixMultiply44(worldMat, rmat1, rmat2); m3dMatrixMultiply44(worldMat, tmat, worldMat); // combine the eye and eorld xforms m3dMatrixMultiply44(workingMatrix, eyeMat, worldMat);
- Isn’t that better?
- Ok, cleaned things up a bit, and now I’ve got something I can live with:
-
// global eye transformations modelViewMatrix.Rotate(eyeOrient[0], 1, 0, 0); modelViewMatrix.Rotate(eyeOrient[2], 0, 1, 0); modelViewMatrix.Translate(eyePos[0], eyePos[1], eyePos[2]); // global world transformations modelViewMatrix.Translate(worldPos[0], worldPos[1], worldPos[2]); modelViewMatrix.Rotate(worldOrient[0], 1, 0, 0); modelViewMatrix.Rotate(worldOrient[1], 0, 1, 0);
- Putting the stage and other bits in
Phil 2.6.12
8:30 – 5:30 FP
- Hey, it’s my 2 month anniversary of my broken leg. On the whole, progress has been pretty good.
- Working out how to put all the matrix pieces of a shader system together.
- After flailing for pretty much most of the day, I discovered that I had set up the view frustum incorrectly, due to a typo. Most things work, but the viewframe isn’t reset ti identity each time through. I need to revisit how to set that up.
- This was the hint that clued me in, BTW. Yuck.

Dong Shin 02.03.2012
- Reading Spring Roo documentation and Tutorials
- Successfully reverse engineered Project Portfolio DB!!!
- http://static.springsource.org/spring-roo/reference/html/index.html
- somehow my settings.xml causing tests to fail…. had to rename to something and put it back
- installed STS as plugin (use the PDF doc in the link page) – http://blog.springsource.org/2009/06/24/installing-sts-into-eclipse-35/
- finally finished reading OpenGL SuperBible (4th Edition)
- sample code download: http://www.starstonesoftware.com/OpenGL/fourthEdition.htm
- got Text working and added LineGraphApplet sample project to SVN
- svn://fgmdev.com/trunk/Sandbox_folders/DONG_SANDBOX/LineGraphApplet
- code snippets for adding text for LWJGL
import org.newdawn.slick.TrueTypeFont;
private TrueTypeFont font;
private TrueTypeFont font2;
public void init() {
// load a default java font
Font awtFont = new Font(“Times New Roman”, Font.BOLD, 24);
font = new TrueTypeFont(awtFont, antiAlias);
// load font from file
try {
InputStream inputStream = ResourceLoader.getResourceAsStream(“AnnabelScript.ttf”);
Font awtFont2 = Font.createFont(Font.TRUETYPE_FONT, inputStream);
awtFont2 = awtFont2.deriveFont(24f); // set font size
font2 = new TrueTypeFont(awtFont2, antiAlias);
} catch (Exception e) {
font2 = new TrueTypeFont(awtFont, antiAlias);
e.printStackTrace();
}
matStage.init();
}
public void render() {
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GL11.glOrtho(0, width, height, 0, 1, -1);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
Color.white.bind();
font.drawString(100, 50, “THE LIGHTWEIGHT JAVA GAMES LIBRARY”, Color.yellow);
font2.drawString(100, 100, “NICE LOOKING FONTS!”, Color.green);
GL11.glDisable(GL11.GL_BLEND);
}





You must be logged in to post a comment.