Jonathan Konieczny

CS 5950

Independent Study with Amy Gooch

 

 

The project:

My project is to add 3d/2d billboarded rocks to the VR treadport project. These rocks should dynamically “grow” as the user gets closer to them, and shrink into the background at longer distances in order to save processor time.

Additionally, assuming I can finish that in a reasonable amount of time, I also plan to play around with adding shadows, trees, more realistic terrain processing (probably using a variation on my advanced graphics class final project), and possibly more realistic atmospheric effects.

 

The Plan:

I plan to begin by getting OpenSceneGraph (OSG) working with a windows programming environment on my home computer.  Failing this, I will move to a linux programming environment at the computer lab. Next, I’ll play around with OSG and get some simple programs running in it.  After I’ve set up an OSG framework, I’ll program in a simple array based terrain with given height map data sets.  Then, I’ll add cubes to represent the rocks, and work with it until they grow/fade satisfactorily.  Then I’ll add actual rock models and work with billboarding and texture mapping effects to make it all look good.

After this, I’ll either integrate with the rest of the code, or continue on to some of the other ideas I can add (dependent on how much time is left, and what Amy Gooch thinks).

 

Since I’m planning on finishing the rock project as soon as I can, and continue on to further tweaking/more advanced effects, my current timeline is going to be very flexible.  Here’s a very tentative timeline, which only covers finishing the rock project by the end of the semester:

 

January 2003

  S  M Tu  W Th  F  S

           1  2  3  4

  5  6  7  8  9 10 11                  Download/play with OSG

12 13 14 15 16 17 18              Get MS VS.net and get it working with OSG

                                                Get this web page up

19 20 21 22 23 24 25              Get a basic program written by me with OSG compiled and running

26 27 28 29 30 31                   Get framework/simple terrain working for the project

 

    February 2003

  S  M Tu  W Th  F  S             

                    1

  2  3  4  5  6  7  8                    Get cubes on screen growing/fading

                                                Look at first-person games to see how they do it

  9 10 11 12 13 14 15              finish up work with cubes

16 17 18 19 20 21 22              swap cubes for models

23 24 25 26 27 28                   get billboarding/textures working, if appropriate

 

March 2003

  S  M Tu  W Th  F  S

                    1

  2  3  4  5  6  7  8                    add finishing touches

  9 10 11 12 13 14 15              add finishing touches

16 17 18 19 20 21 22              integrate/move on to other projects?

23 24 25 26 27 28 29              ?

30 31

 

    April 2003

  S  M Tu  W Th  F  S

        1  2  3  4  5                      ?

  6  7  8  9 10 11 12                 ?

13 14 15 16 17 18 19              ?

20 21 22 23 24 25 26              Final week of class; Presention due

 

 

This schedule is likely to change drastically, and I suspect getting OSG working and getting my first OSG program running may take a longer than expected, while the rest may take less time (I have the greatest difficulty with any project getting myself set up and started: once I’m into it, I frequently can’t keep myself away from it until its done).

 

Here’s my weekly report, which I plan on updating each weekend.  There will be a total of  16 weeks (this web page will be up by the end of week 2):

 

Week 1:

Planned:

Download/Play with OSG

Accomplished:

Downloaded the cvs version of OSG, but didn’t get anything running.  MS VS 6.0 appears to not work well with it.

Comments/plans for next week:

Need to get a copy of MS VS.net and try to get OSG working with it

 

Week 2:

Planned:

Meet with Amy Gooch about the project.  Get this web page up.  Get the OSG demos working on my computer/play with OSG on linux.

Accomplished:

Got this web page up.  Met with Amy Gooch.  I did get MS VS.net, and did get the demos running on my computer.  However, I’m still having some linking errors every once in a while when trying to compile the demos.

Comments/plans for next week:

I had planned on working with it more this week, unfortunately, I got sick near the end of the week, and haven’t done as much as I planned.  For next week I need to get a program I wrote myself compiled and running in OSG.  If I can’t, I’ll need to seek assistance to get a basic program running.  Also, I’ve thought of two games which I believe have impressive outdoors scenes: Giant Citizen Kabuto and Elder Scrolls III: Morrowind.  I plan on making a trip to Ogden and pick them up from my brother and checking out what graphics tricks they use in those games (and if they’re worth copying for the project).

 

Week 3:

Planned:

Get a Basic OSG program running

Accomplished:

Nothing, I’ve pretty much been sick all week, and have only recovered this weekend.  As a result, I’ve decided to move all of my own deadlines back a week.  Hopefully I’ll be able to make up the time somewhere, but if I don’t, I did have 3 weeks of leeway planned anyway.

Comments/plans for next week:

Start actual work as planned a week ago.

 

Week 4:

Planned:

Get basic OSG program running under either MS studio or linux

Accomplished:

Still had some problems getting stuff running for most of the week, but I finally got all the demos working (I think) under MS Studio.net.  I also downloaded and got everything compiled under linux, too (it was a lot easier than windows).  I altered a few of the demos to make sure that everything was compiling ok and started to mess with some of the actual OSG functions.

Comments/plans for next week:

As per the schedule, I need to get the basic terrain working.  I might spend a little more time than planned to get that up if I have more problems with OSG or decide to go with something more complicated than just random  bumps in the terrain.  From where I’m looking now, though, I’m hoping there won’t be any more serious holdups.

 

Week 5:

Planned:

Start my actual project and get basic terrain up and running

Accomplished:

Pretty much as above.  I got basic terrain with random bumps working, and I also got a basic catmull-rom terrain generator working under OSG.

Comments/plans for next week:

Have another meeting to plan out what to do next.  Go ahead and modify my terrain generator as per that meeting.  Also get starting on the cubes growing and fading.  I’m thinking of testing out making them into texture maps at a certain distance, actually shrinking them, and also using model simplification (can OSG do that?).  Hopefully, the meeting will give me a bit more focused objective as to what to do with the terrain generator.

 

Here’s a picture of the catmull-rom terrain.  The texture doesn’t fit with itself at the corners, making the polygons pretty obvious (this disappears with a texture that meshes with itself).

 

Week 6:

Planned:

Get cubes up on the screen growing/fading.  Modify terrain generator as per meeting.

Accomplished:

I got a little sidetracked this week.  After the meeting and finding out that the terrain data was in 1 meter intervals, I pretty much scrapped the catmull-rom generator. With data points being so close together, it didn’t really need interpolation.  Instead, I used the actual height map data with the OSG grid to create the terrain.  This worked, but unfortunately, a single grid can’t have different intervals inside it, so I would have to use a number of grids at least equal to the number of accuracies my map is using.  This being the case, I decided it might be easier to just create my own height map function, which I did.  It currently works exactly as a grid does, and I’m planning on making it dynamically changeable by using a dynamically allocated array of quad structs with a linked neighbor list.  This way, I will hopefully be able to seamlessly (just altering the quad size arbitrarily creates holes in the terrain where they don’t quite match up with their neighbors) alter the terrain accuracy dynamically.  I also started the rock code, but I’m having difficulty figuring out how to make OSG change what’s being drawn to the screen after its already been initialized.  Hopefully I’ll get an answer on that soon and be able to continue.  This also a problem with finishing my dynamic terrain idea.

Other stuff I did this week:

Integrated the keyboard motion code with the project

 

Created a terrain class for the height map terrain

 

Created a height map class that just loads the height map data and puts it into a

Dynamically allocated array. It also has width and length variables.  My other classes all currently expect to be given a heightmap variable in order to work (this could be easily changed to something else later, though)

 

Created a rock class for the rocks

 

Comments/plans for next week:

My calendar says that I should be finishing up work with cubes next week, but I don’t think I’ll get that far.  Assuming I can get OSG to actually change what its drawing onto the screen easily (some sort of timer function or something), I want to get the terrain generator working with different size polygons and multiple texture maps working (maybe not entirely streamlined, but working).  I also want to get the cubes populating onto the terrain in a nice way, have texture maps on them, and allowing them to grown/fade (which was this weeks goal).  Hopefully the week after that, I’ll be able to both add the finishing touches on the cubes and change them to models (which I don’t think will be difficult).

 

Although my project isn’t technically to do the terrain itself, I’m pretty much doing it as I go along, so unless someone objects, I’ll try to get it as nice as possible so hopefully the treadport project can use it, too.

 

Here’s a picture of the heightmap terrain with some cubes spread around (this shot only has them randomized, not populated or optimized)

 

Week 7:

Planned:

Swap cubes for models/get dynamic stuff working/get rocks populating as opposed to random

Accomplished:

I got the rocks populating, and got the dynamic functions working at the end of the week, but haven’t played around with them yet.

Comments/plans for next week:

I’m falling a little behind schedule, and need to speed up a bit.  If all goes well, though, I could catch up by the end of next week.

 

Week 8:

Planned:

Swap cubes for models/get dynamic stuff working/do any tweaks I need to the system

Accomplished:

I got some of the dynamic terrain working, as well as erasing/drawing rocks on the screen based on distance.

Comments/plans for next week:

Besides the fact that I don’t yet have the rocks shrinking/growing/fading/whatever else looks good, some serious issues have been brought up by this weeks work.  With the code I have right now, any dynamic re-drawing of cubes/terrain is simply too slow to be of use.  I can draw so many more objects that are not dynamically altered than are dynamically altered that the trade off is simply not worth it at this point.  Unless Amy or Pete know of a really good dynamic algorithm, the way to go might be to make the terrain look rocky by using a combination of models for the “big” rocks, and multitexturing/bump mapping to make the ground look like it has pebbles on it, and leave these up permanently (culling can probably be used, of course).  Unfortunately, Amy is out this week, and I’m leaving on Spring vacation/college visiting next week, so my schedule is not working out very well. I don’t honestly expect a whole lot of work to get done in the next two weeks, which only really leaves 5 weeks to decide on/implement what comes from my next meeting/e-mails.

Until I can get hold of Amy/Pete, I’ll start trying out other various things to improve the terrain, such as models, sky texturing, etc.

 

Week 9:

Planned:

Vacation

Accomplished:

Yep, went on vacation

Comments/plans for next week:

 

Week 10:

Planned:

Meet with Amy and get new details on what to do.

Accomplished:

Met with Amy and got some new ideas.  We’ll be trying to implement a “rock tiling” system.  Each rock tile with be a 1m sq. model.  I will then attempt to use dynamic growing/fading techniques on that.  I also implemented billboarded tree code, but haven’t gotten the correct transformation for file input yet.  I also got a sky box working.  It could use a nicer texture map, but looks pretty good otherwise.

Comments/plans for next week:

Work with rock tiles on a flat terrain.  Make timings and see about getting it to work quickly.

 

Week 11:

Planned:

Work with rock tiles on flat terrain.

Accomplished:

Worked with 1m non-dynamic terrain on flat surface.  Initial results are promising as far as look and timings.

Comments/plans for next week:

Get the tiles working dynamically.

 

Week 12:

Planned:

Get tiles moving along with the user.

Accomplished:

Did that, but the timings are a little slow.  I’m currently randomly re-creating new tiles as the user moves in a radius around him.  It might be slightly quicker to make a box around him, but may not look as good…

 

TIMING:

31x31 (1m each, 2000 polys/tile) – 60 fps static

                            - 10 fps when user is moving

51x51 (1m each, 2000 polys/tile)

-         12fps static

-         2fps user moving

Comments/plans for next week:

Meet with Amy again, attempt to speed up the code.

 

Week 13:

Planned:

Speed up the code, try different algorithms for rock tiles, meet with Amy

Accomplished:

Met with Amy early in the week, and decided to use a statically created display list to store all the rock tiles at the start, then choose from this list based on user position.  We have also agreed that I will attempt to dynamically grow/fade the rock tiles, and I will try multitexturing on them.  I will not have time to try bump mapping or more advanced techniques on it this semester.  I tried the display lists, and it makes it much faster…but my card can (geforce 4, 128mpegs mem, computer has 512 megs memory) only support about 100million polys display listed at once…far less than the 2000poly tiles over the whole terrain.  I scaled the tiles to 10x10m each, and made timing from that (which are quite promising):

 

TIMING:

31x31 – 30fps (no slowdown for user moving)

 

As for the display list memory problem, there are some things we can try to help with the problem:

  1. load times: Every so often, load the next portion of terrain around the user
  2. Larger tiles: As I have already done, make larger tiles to user rather than 1x1m
  3. Smaller poly count tiles

 

Comments/plans for next week:

Attempt different techniques to increase graphical realism and speed.

 

Week 14:

Planned:

Attempt different techniques to increase graphical realism and speed.

Accomplished:

I tried two different techniques: translation/scaling in order to sink the tile into the texture mapped terrain underneath, and blending to make it fade into the underlying terrain.

 

Translation/scaling had some success, but had significant speed problems.

Fading didn’t look nearly as good as I thought it would (the technique was largely too noticeable to be worth it) and was even slower than translation.  As a result, I think translation/scaling could work with more testing and design work, but fading probably won’t.

 

TIMINGS:

trial: testing "dropoff" method - making tiles drop into the distance

all tiles are 10x10m with 3x scale in height

18x18, translation alter

norm - 12hz

full speed - 3hz

 

18x18, no translation

norm - 26hz

full speed - 26hz

 

10x10, translation alter

norm - 65hz

full speed - 15-20hz (at low speed, drop in hz is difficult to tell)

slightly noticable alteration in terrain with movement

 

10x10, no translation

norm - 65hz

very noticably alteration in terrain with movement

 

5x5, translation

norm - 65hz

full speed - 65hz

noticable alteration in terrain with movement

 

5x5 - no translation

norm - 65hz

very noticable alteration in terrain with movement

 

PICTURES:

Here are the resulting pictures that went along with the timings:

 

 

11x11 (5 behind and 5 in front of user), with translation

 

 

11x11 without translation:

 

 

21x21 with translation:

 

21x21 without translation:

 

37x37 with translation:

 

37x37 without translation:

 

Note that a primary difference between the translation and non-translation can’t be shown by the pictures: when the user moves, the tiles obviously appear when there are less tiles without translation.  With the translation/scaling effect, this is much less noticeable.  However, as long distances (as with the 37x37 tiles), it was nearly impossible to tell the difference anyway, as the changes took place so far out.

Comments/plans for next week:

There are a few things I need to take care of before the end of the semester:

Try out multitexturing

Clean up the code and comment it

Add keyboard controls

Get the tiling working on the actual mountainous terrain, not just on flat terrain (I’ve already started this, but my code has errors in it).

 

Week 15:

Planned:

Work on the above mentioned things

Accomplished:

Cleaned up the code and commented what I have.  I didn’t get a whole lot done due to trips I had to make to Minnesota and work for graduate school decisions/admission.

Comments/plans for next week:

Get everything mentioned above done.  Also, Amy gave me some smaller poly count, triangular tiles to work with, I need to get those working too.

 

Week 16:

Planned:

Get everything above finished up, get my presentation ready for next Monday (April 28).

Get this website finished and up.

Accomplished:

Comments/plans for next week:

 

 

Final Presentation section:

 

What I planned (both at the beginning, and after changes):

 

What I accomplished:

 

What I learned:

 

Conclusions/Further work:

 

The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.