Natural Detail Engine

Posted by Font on Dec. 5, 2011, 7:32 p.m.

So I'm completely new to this community, but my roommate (Flashback) suggested I join and show off what I'm working on.

Ever since I saw Unlimited Detail (now Euclideon) on YouTube, I have been enthralled by the concept of pretty graphics in massive quantity and detail. Though I tried, I could never quite understand how Unlimited Detail worked. During hiking trip in later half of this summer I reached a lookout on a mountain and saw the millions of trees below and thought "Wow… I want to render that scene".

That's a lot of trees…

Since I failed to understand how Unlimited Detail worked, I decided to come up with the next best thing. My idea was to take highly detailed models, such as trees and shrubs and render them onto sprites before displaying them on screen. Not very revolutionary or original I know, but this way the engine can render a few trees a frame and leave the rest of the trees to recycle their old images. If the trees are far enough away, the user won't be able to tell anyway (the closest trees are swapped for real polygon models instead of sprites). I deemed the project Natural Detail and started turning my idea into reality in late August. It's been off and on ever since.

I've ran into a variety of problems since I started. I'm relatively new to hardware accelerated graphics and didn't know how difficult it would be to manage hardware memory. You see, every tree had to be associated with an image, and these images had to be stored somewhere. To solve this I made a massive texture for every entity type and gridded it up so that it could hold 64 images or so. There's a bit of a problem, cause I want to render millions of trees, and there's less than a hundred spots for images. The solution was that every entity of that type had to search through the grid and either render themselves to a place on the texture, or find another image that was most similar to them and associate itself with that one. I also wanted to fade the images together, but I had to double my memory usage in order to do that, so I still haven't figured that out quite yet. I also got anti-aliasing working, but since my sprites aren't z-ordered, it makes the sprites look super weird when it's on.

The trees must choose!

So far, all this effort and discovery has led me to my latest iteration, which showcases grass, flowers and trees, swaying in the breeze.

I was really excited when I got the grass and tree sway working. It really made the scene come alive, even though there's still some popping and jittering when the scene shifts around (working on it). I'm pretty satisfied with the result, and I'm hoping to implement my engine in a multiplayer shooter I'm concocting in my head.

Anyways, I hope someone enjoys this sort of stuff. I'm pretty new to this stuff, so if anybody has any suggestions or revelations (or you demand a tech demo), feel free to get a hold of me! ^_^

Comments

JuurianChi 12 years, 5 months ago

Welcome, Hope you stick around!

That engine looks Awesome BTW, I love tech Demos!

colseed 12 years, 5 months ago

That's…rather neat actually. Looks efficient too.

What are you using to program this?

DesertFox 12 years, 5 months ago

That is pretty awesome! I've always been interested in stuff like that, its good stuff.

Ferret 12 years, 5 months ago

I'm pretty sure a lot of people here will enjoy this.

Great read and I hope to see more of this, the tech demo looks great as well. When ever I go hiking I always think about how difficult things would be to render, but I usually remind myself that far distances can't look detailed because of the limited resolutions of monitors. Glad to see you didn't just do trees though, because the grass looks fantastic.

Oh and here is the usual speech thing:

Welcome to 64Digits! Please leave your sanity in the red box by the door, don't feed ChIkEn, submit to the mind altering code, and all hail the mighty potfrog! :D

Must be very temperamental living with flashback, does he ban you from the kitchen if you leave dishes out? :P

JID 12 years, 5 months ago

Great blog and welcome. I was always interested in how these things work, also a good solution to the pop in grass would be to have them fade in when switching between models.

Ferret 12 years, 5 months ago

That'd be noticeable, better off just sorting the array of grasses and making grass that is still on screen hold consistent models while indexes containing grass off screen would be replaced with grass newly presented to the screen.

JID 12 years, 5 months ago

i know it'd still be noticeable, but it's better than grass just instantly popping up. :p

panzercretin 12 years, 5 months ago

Looks well done, I love when people describe their process in these sorts of things.

Alert Games 12 years, 5 months ago

@JID: Yeah like in some games where the more detail objects fade in based on distance. Same principle.

Pretty impressive so far. I think your models of trees and grass look pretty awesome though which helps a lot.

Castypher 12 years, 5 months ago

Looks very nice. I'm eager to see what it'll be like in the future. And I support the question, what language did you make this in? Up until I bought Skyrim, I didn't care much for graphics. And now I think an immersive world makes a game that much better.

Also, welcome, friend of Flashback. I assume he's already given you the formalities, including but not limited to, the red box, feeding ChIkEn, melee-master's weight, and anything else.