star trek logo

Computer Science 3480 - Computer Graphics

Joe Ruiz

INTRODUCTION
I have always been fascinated with Science Fiction. Growing up with Star Trek: The Next Generation and Star Trek: Enterprise, I thought the special effects were fair for the time period. With the latest reboot of the franchise, I was really intrigued with the warp bubble's appearance. Below is a picture of the warp bubble when viewed from the front:

warp bubble

My project would focus on creating the warp trail, that is seen when the ship enters warp. The camera could then pan once the ship enters warp and see inside the warp bubble, the blue and white pattern that surrounds the ship. Check out the video clip below:

TOOLS
My project would use the OpenGL Terrain framework for camera movement and Perlin Noise could prove to be very useful in creating the almost random appearance of the warp trail.

RESEARCH TOPIC
My research topic is using special effects to indicate the increased speed of the spaceship when going to warp speed.

PROGRESS REPORT WEEK 9
I found a few online meshes at trekmeshes.ch. After sorting through all of the models I found three that look very well put together, all different versions of the Enterprise. From left to right is the Enterprise from the 2009 movie, the Enterprise D from Star Trek: The Next Generation, and the Enterprise NX from Star Trek: Enterprise.

enterprise 2009 enterprise d enterprise nx

Now that I have the meshes, I can use them for the ray tracer. Each of these meshes is approximately 500,000 to 1 million triangles. I experimented with Blender's Decimate option which will allow the merging of triangles to reduce the number of triangles. I did max setting and reduced the Enterprise D to 150,000 triangles. I did not render it or check its clarity. For Week 10 I plan on experimenting more with Blender and Decimating and finding the amount of triangles while still keeping clarity.

PROGRESS REPORT WEEK 11
Now that I have some meshes, I focused on performing Ray Marching. I took a sphere and used Ray Marching to estimate the colors based on the number of steps to the sphere object.

ray march example

This demonstrates that the Ray March function I created worked. Now I need to create the streaking effect. To do this, I need to draw the ray point as it strikes the sphere, showing the trail it took to get to the sphere.

PROGRESS REPORT WEEK 13
I accidentally broke my Ray Marching code. I spent the last 2 weeks rebuilding it but it is not quite right. I think I will abandon the technique of Ray Marching and looking elsewhere for creating the lighting effects. So far I have added the Enterprise to my scene. It was taking too long to render the several thousand triangles so I settled for a texture map instead. I placed it on a solid black background and created a light sphere in the distance.

enterprise and sphere

I thought about using OpenGL's glBegin(GL_LINES) function. I changed a bunch of code around and converted the doubles to floats and double arrays to float arrays and created a Line: keyword in the scripting language. I atttemped to make one line in my enterprise.b file but no line came up. I also tried in other .b files, no luck. Going to research this method some more.

PROGRESS REPORT WEEK 15
I verified that the glBegin(GL_LINES) didn't work. I looked at Ray Marching technique again and produced a sphere with colors similar to what would have been in the picture I was trying to replicate. I placed the Enterprise on a texture map. Below on the left is the Enterprise with Ray Marching disabled (default). To the right of it is with Ray Marching enabled.

no raymarch raymarch

Before deciding on this algorithm for Ray Marching, I considered two other algorithms, both included in the atrace.cpp file. Those have been commented out. The first used large steps and was very inaccurate. The next version used two nested for loops which was a little more accurate but took a few extra seconds to render. The final algorithm I chose used an adaptive approach to Ray Marching so it didn't take a long time to render. To make the special effect I was going for I know I am missing something that is critical. This project gave me a large understanding of a technique which can be very helpful in visual effects. However, I could not complete the effect I was going for and time is up.

Alright, I got a few more days to get this figured out. With Gordon's help I got the basic understanding of Ray Marching. I still don't have it 100% but right now it is about 85%. Here is my most recent experiment.

light test

I put a light source inside a cylinder with a hole cut out of the bottom. I will not lie. I cheated by using the bounding box to block the light so it is not complete yet. This is a good experiment but still not quite what I need. The bounding box should not restrict any light. My issue is with shooting the ray back to the light source and verifying if the hazy light is in shadow or not. Still working on it...

I now have to give up. I did some cool shading, and the Enterprise is as a texture which shows up correctly. I wanted to make lines and streaks from the light but that didn't work. I learned a lot about Ray Marching. Below is the final render in atrace.

final enterprise

So concludes yet another project with less results than I had hoped for.

DISCLAIMER: Star Trek was created by Gene Roddenberry and owned by CBS and Paramount Pictures. All information on this website is used for educational purposes.
Live Long and Prosper.