PDA

View Full Version : Art of programming



Khendon Sevon
Oct 25th, 2006, 04:35:29 PM
Okay, maybe some people won't see it as art. Never the less, I thought I'd throw up the current spiffy report from the horrible, boring assignment I'm working on.

Why?

Because it gives me something to do :)

Of course, after posting this I see the error.

I've been spending too many hour coding.

I had "==" instead of "="...

I should take a break.

Loklorien s'Ilancy
Oct 25th, 2006, 05:36:24 PM
I've gone cross-eyed >_< :p

Dasquian Belargic
Oct 26th, 2006, 06:16:20 AM
Looks like someone has run out of magic.

:huh

Khendon Sevon
Oct 26th, 2006, 06:25:52 AM
Magic! 0
:)

Yeah, silly me for making that silly mistake. Happens to the best of us. Trick is catching it ;) Which I did.

Now I just have to deal with getting my AVL rotations to work :( Maybe there'll be more "art" (errors).

Khendon Sevon
Dec 6th, 2006, 01:25:01 PM
Another minor issue.

This is an assignment for my 3D programming class (OpenGL). I'm working on getting lighting to work on this scene I coded (coding houses, trees, etc is just silly).

It's programmer art. Be afraid.

Anyway, there's a little issue that causes everything to be in one color (that issue is simple: I haven't defined the material properties yet so the color information actually isn't being retained).

Oh, lighting.

Next comes texture mapping.

Khendon Sevon
Dec 6th, 2006, 02:06:51 PM
I fixed it :)

Those mountains, though, don't look like they're being colored properly. Hmm...

Khendon Sevon
Dec 14th, 2006, 01:56:55 PM
So, this is a final project.

The requirements for a good grade are:

- Travel element: ability to move on a path around the environment in some sort of vehicle. The user should be able to switch between several cameras.
- Exploration element: buildings with doors that can be opened and items that can be selected, rotated, looked at

In terms of engine requirements:
- Must support texture mapping
- Must have lighting
- Must have one higher level element (reflections, shadows, etc)

So far I have lighting and texture mapping done.

Morgan Evanar
Dec 19th, 2006, 06:45:02 PM
That's impressive, 3d math gives me a fierce headache.

Khendon Sevon
Dec 19th, 2006, 07:01:20 PM
Thanks :)

The only good thing about 3D math is that it's pretty well documented. I have 3 books on OpenGL and 1 on realtime rendering. Of course, I find online tutorials the best way of actually learning how the code works on a project scale.

I still have to rewrite my camera (needs to be limited), import a few 3D models, add a second light source, and get blending to function properly.

I don't know why the blending is acting up. I can't blend two textures together, it's kinda' annoying.

Anyway, I'll post a more interesting screenshot once I have... well, more interesting elements.

Next semester I take the 2nd in series of 3 graphics programming courses the school offers. Supposedly it's insane.

Khendon Sevon
Dec 20th, 2006, 04:03:06 PM
W00t!

Final exams are over.

I spent a couple hours adding happy code to my final project. The result is attached.

The camera is now limited (I might raise its y value a bit more so you don't feel like a dwarf). I've also added "selection." What's that? Simply, if you click on a door, it will open :) Isn't that cool? I think so.

I also added a door texture, tweaked the lighting a bit, added in a GOD command to enable more advanced camera modes, made it so lighting can be disabled, and fixed an error that was happening with rotation around the y axis (along the x-z plane).

To do:
- Texture the mountains
- Get blending to work!
- Add a second light source
- Add a bounding fence and make it so the user can't escape
- Enable a 3rd person view (which means I'll need a simple model for the player, it'll probably be a cube that changes colors moderately randomly or maybe has cycling textures or something cool along with random blending)
- Add in a 3Dsmax model or two (tables, chairs?)

I think that about covers it. I have 'till Friday night to code it all. Shouldn't be too bad.

Khendon Sevon
Dec 22nd, 2006, 12:08:43 PM
I got texture repeating to work, yay. Also added in a couple little extras.

The project is due at midnight tonight. I think I have plenty of time to finish cleaning up everything that needs it and adding the last few features.

Khendon Sevon
Jan 31st, 2007, 06:12:17 PM
Interactive Graphics II
Assignment: Short animation in Blender showing rotation, sizing, and techniques discussed in lecture
Result: http://www.roxxu.com/gallery/mech.avi

Okay, it's not that cool. Still, it was fun/painful to make. I really don't like Blender. I wanted to do it in Maya.

Khendon Sevon
Feb 20th, 2007, 09:15:19 PM
Boom!

http://www.mythosstudio.com/cs638/

The proposal/site for my final project. It's going to be pimp :)

Khendon Sevon
Apr 18th, 2007, 09:33:36 PM
So, I've been working more and more on my final project.

Today I spent a couple hours getting Binary Space Partitioning working (I haven't been working off any source material, so I just kinda' figured it out myself).

I'm certain there are optimizations I haven't made.

Never the less, you'll find a screenshot attached. It's the current state.

These are two AI units (meshes/textures are default Ogre3D) in Idle state.

So much to program, so little time.

Khendon Sevon
Apr 19th, 2007, 12:28:53 PM
Presenting a BSP (Bin Space Partitioning) grid!

It can slice, dice, and even keep track of entities, collisions, and more!

Each square is its own object that can do tons of spiffy stuff. The primary purpose is for pathfinding. This is a 1024 resolution grid with each individual square having a resolution of 64 units. As you can tell, the algorithm doing the rendering of the lines isn't optimal (that would be why it drops it by 70+ frames). I have to include occlusion and whatnot.

Another day of hard coding and it'll be running smoothly.

Loklorien s'Ilancy
Apr 19th, 2007, 04:31:14 PM
Boom!

http://www.mythosstudio.com/cs638/

The proposal/site for my final project. It's going to be pimp :)



yessssss >D

Lilaena De'Ville
Apr 19th, 2007, 06:30:09 PM
Good luck! :D

Khendon Sevon
Apr 20th, 2007, 01:15:55 PM
Today's goal:

A bit of pathfinding ;)

The start: making blocked squares, having them show up as blocked.

Then: A* algorithm.

Rawr.

Khendon Sevon
Apr 24th, 2007, 08:26:10 PM
So, I had to write a class to handle drawing circles out of a series of triangles. Not fun. In fact, it was overly difficult. You'd think a high level 3D engine would have primitive shapes, wouldn't you? I mean, even in OpenGL I can easily generate a 2D circle or 3D sphere with minimal effort. What's up with that?

So, my entities can now follow a series of paths(stored in a vector array). The current path is in green while future paths are blue. This is the first step to getting my pathfinding and obstacle avoidance working. They play a walk animation while on they still have a place to go then switch to an idle state (I have a great state machine I coded) when they've reached the end. Additionally, they orient themselves properly to travel to the point.

It's starting to look like a real simulation :)

http://www.roxxu.com/gallery/shot4.jpg

Dimitri Vojslav
May 10th, 2007, 11:09:11 AM
Thats really impressive. I'd love to do something like this but I wouldn't know where to start.

Khendon Sevon
May 12th, 2007, 10:58:54 AM
Helps that I'm taking classes on real-time simulations programming :) Gives you a bit of a foundation.

If you know how to program, there are great books on artificial intelligence and graphics out there.

If not, then there are great books on programming out there :) Hah.

Just have to start small and work your way up. A year ago all I really knew was Java and I could just barely make an asteroids style game.

So, new screenshot. I have A* working and somewhat optimized (I spread the actual algorithm runs out so that the engine will run relatively smooth even when there are a lot of units requesting pathfinding solutions).

What you see here are 3 ninja units successfully navigating the blocked squares. It's simple, really. There are still a few bugs; but, for my presentation I don't think I'm really going to try and work them out.

This is really the meat of the project. Now I just have candy--like being able to select units and selecting a place for them to go to. But, I might just write about how you'd do that instead of actually doing it for the presentation.

http://www.roxxu.com/gallery/shot5.jpg

Low frame count is due to using my laptop instead of PC. I'm working from home instead of at my school apartment. The presentation will be on my laptop, 'nyway.