Hello everybody, i’m hoping kind people will give some ideas how to tackle this problem. What i am wanting to do is add details to a custom mesh. for instance you can add grass etc to a unity terrain, but how do i go about making all that foliage rocks etc to a custom mesh and generate it only when they are in view. I’m needing to somehow figure out how to add all the details to the normals of the main mesh ( a planet )
I’m not even sure if i’m thinking in the right direction to create the effect i’m looking for. So any ideas just to get me going down the right path would be really helpful.
What it sounds like you’re looking for is levels of detail or LOD.
From far away, a planet can merely be a billboard
Then when you get closer, have a simple mesh and up close turn on all the details.
There are a few LOD system available if you don’t want to write that yourself but I’m guessing you’re going to have very few planets visible at a time so it will not be a problem having a script on each that makes the correct prefab visible based on distance to camera.
Hi Jason, it’s not entirely what i mean, i understand what LOD is and agree that will need to be used, but i’m wanting to know if and how i can generate planet details dynamically to the surface of the terrain, rather than just paint the planet surface with details and use some LOD system.
I assume i need to somehow do this in code and find the normals of the terrain and then add the meshes etc. It can be randomly filled with several meshes and will not matter what it instantiates on the surface. I’m just looking to create a cosmetic effect that gives me the feel of detail, I also would like to do something similar with the big space vessels applying a greeble using the same method if it can be done. Is this the right way to go, any ideas are appreciated
There is a very good blog on Gamedev called “Journal of Ysaneya” that has a lot of gems on procedural terrain generation. The guy who wrote them is currently trying to finish his space based MMO called “Infinity: The Quest for Earth” (http://www.infinity-universe.com) - ALL ON HIS OWN! (who said MMO is impossible for 1 guy!)
The engine he is developing is fairly amazing - completely procedural universe - the engine allows for the creation of billions of worlds and millions of star systems much like the old “Elite” (if you remember that game you are probably an old fart like me) - but with “seamless planetary engine: The Infinity engine features a completely seamless experience. You can fly in space and land on planets, traveling directly from deepest ranges of space to the rolling hills and sharp mountainous peaks of a distant planet fluidly, without any loading screens, timer bars, or unnatural transitions. If you can see it, you can fly to it !”
just fkin wow … that is some really amazing stuff going on there. however my game looks so crap, i feel like giving up after seeing this lol . And yea i must be getting old, cuz i remember ELITE and loved that game hehe. Thanks for taking the time to reply and the source of information is most welcome.
I will dig through this afternoon and hopefully find some good nuggets of info to take advantage of,
While Infinity really is an incredible game engine, don’t let it stop you… its been in development for the better part of a decade and who knows when it will be released or usurped by a commercial studio. Your game looks very good, finish it! Too many people don’t finish. Oh, and if you do decide to not finish then give us your source code!
Thanks for the encouraging friendly advice, that’s what matters to me, giving me strength to keep pushing on. Most of the time i feel well out my depth. Learning to model, animate,rig,texture etc is just 1 small part of it as i’m sure you know, then there’s coding… And that’s just the beginning.
As a 36 year old student in all this and coming from a music background is daunting, but i feel compelled to keep pushing forward because like many of you i’m sure its because of the love of creating, doing things that have never been attempted before, that is the ultimate game in itself, having no boundaries on what our minds can achieve.
It’s a balancing act though, keeping realistic to what 1 person can achieve with the time given and the competency of our skills. or lack of for my part.
I think i would do better with some like minded 30 somethings. any takers?
anyway thanks again for the kind words, appreciated
I couldn’t have said it any better, volatile. I’m a bit of a loner when it comes to development, but I would be more than happy to trade scripts with you or anyone else. I’m working on a project a lot like yours, called Delta Velocity. If I can help you along in anyway, just let me know. I’m just becoming comfortable with scripting in Unity, it takes awhile if you aren’t an experienced coder, and having practical problems to solve really helps to speed up the learning process. I’ve been hacking together scripts like Frankenstein monsters for the past 9 months, and its only been in the past couple of months that I’ve been able to write a script from scratch without borrowing code. Maybe you should take apart a LOD script!
hey m8, that is really cool and yea i agree very similar to my project. It appears we are both loners then and probably picked up more bad habits than good ones . Ultimately i think for me to progress any further would be to learn from guys like you. I find things easier to learn when i can relate to similar situations, i’m very much a visual learner, I’m not a maths guy really, Didn’t get the best education or drive to excel when i was younger. I’m trying to make up for lost time now though
I would be happy to share code , ideas, techniques etc. It is what i need to fill the gaps in my head atm. Here is a messy demo of what i got going on so far. You will find poor texturing, models etc. But if there is anything in there you want to know about, then let me know, I will be more than happy to help, ( that’s if i have anything of interest to you)
cheers
Volatile
ps i just watched you video all the way through and i’m sure you will not learn a thing from me, but i certainly would learn a thing or two from you
Thanks Legend, looks really useful , even in it’s infancy. I just tried the demo project, but got a few errors though. I will spend some time this evening and see if i can make some progress. Thanks again for the info.
Hey Volatile, sorry, I don’t mean to discourage you in anyway. In fact I thought the blog will encourage you, and help you in many ways.
I too am a loner, (aren’t we all! We the indie!) so I know exactly how much struggles we have to overcome - and anyone who succeed as an indie is a real win for all of us. And Ysaneya certainly demonstrated to all of us that one guy, with determination, can achieve anything. There are countless examples, the Minecraft guy Markus “Notch” Persson is one famous example, there is another guy I have keep track of from time to time is the Radioactive Software coder and his blog - http://www.gamedev.net/blog/289/entry-930582-gang-war-progress/
He is also a one man team from the look of it.
BTW, you game looks pretty good! I personally think you just need to put on a seamless normal map on the terrain and it should make the terrain “pop”.
This guy nikkoid is also making a space game and in this video he applied a normal shader and it looks fantastic :
Hi m8, you haven’t discouraged me, i really do appreciate you posting this info and gives me some material i would not have found blindly stumbling the net myself. So more i say You mention about using a seamless bump map to make my terrain " pop " as you put it. I’m using the diffuse detail shader that ships with unity because of wanting to add detail close up, but not look too repetitive from far away.
That is why i didn’t use the bumped spec or diffuse shaders. I have very little knowledge about this stuff, ( because i know theres code to be done ) Are there any shaders similar to diffuse detail with bump out there ?
how on earth did you make the target tracking system? Thats exactly what I need, the way it indicates which way the target is off screen. I’ll trade you any element you want from Delta Velocity for that script!
Infinity look amazing technically, but really boring gameplay-wise… screenshots of the planets look cool, but they don’t look like fun, playable environments at all, and are scarcely populated with anything.
I have yet to see a game with procedurally-generated heightmap terrain that had a good, playable, populated and interesting world. (I’m not counting static procedurally generated terrain that was initially procedural and then tweaked and polished by hand; nor am I counting procedurally generated environments based on large seamless tiles, like Diablo). All my favorite open world’s were created largely by hand.
I would love to see somebody do something like GPU gems 3 in Unity, though…
I’m not very technically experienced with game development generally, but what you say about open world environments is something i agree with you about, that the lack of populated details etc make it look pretty from a distance but shitty close up. The very essence of this post is creating something procedurally by code, an array of meshes that are determined by the y axis height of the planet mesh and then gets generated accordingly is what i’m trying to achieve, or methods on doing something like this.
To create worlds and being 1 person is just out of the question. So its going to need something i mentioned above. I’m sure Unity can handle this as we all know it’s amazing tech. Only what is in view ever needs to be generated and some kind of reference to the overall map to load data from. I’m guessing it is possible, albeit way over my competency. Am i talking rubbish or does that sound like the right direction to go in?
Edit , just noticed your link, reading up now.
Edit 2 reading that was way over my head. maybe in a year or 2 from now, i may understand what the hell is being said lol This is actual terrain generation i guess and not about generating layers of details on top of an existing simplified mesh.