User Tag List

Page 1 of 2 12 LastLast
Results 1 to 40 of 67

Thread: Simple Procedural Planets - BP only.

  1. #1
    2

    Simple Procedural Planets - NOT BP only anymore.

    UPDATE - not BP only - includes Custom C++ Blueprint Function Library

    Allright. As I can see there's a different project doing exactly the same with BP. No reason to continue working on this kind of thing I guess. You can get a BP procedural planets free there, so I'm out with this one.

    ...

    I mean, I done with BP only approach. Started to work with C++ this week so I can use different noise functions, and run generation process on different CPU thread.

    What I have done so far:
    Full C++ grid generation and Noise implementation for Fractal Value, Gradient, Cellular, Simplex.
    Custom made (still WIP) normal calculation which is much faster than the one from Procedural Mesh.

    Next step is moving all the functions to different CPU thread so there is absolutely no FPS drop during planet generation.

    Basically, a segment of 256x256 poly is generated in about 800 ms.

    Screenies:

    Name:  Planet0.jpg
Views: 1657
Size:  120.1 KB

    Name:  Planet1.jpg
Views: 1589
Size:  87.9 KB

    Name:  Planet2.jpg
Views: 1602
Size:  114.8 KB

    Yep.

    ===========================================================================
    Old version.
    ===========================================================================

    Well, not really BP only as I'm using a plugin, but about that - later.

    So many people and games are using procedural generation now, specially space games, Dual Universe, Star Citizen, No Man's Sky, so on, so forth.

    And I though, if they can do it, so can I! (ofc "do it" not that complicated as the titles above "do it").



    So, started from a grid of points, and then moved it, copied it per side (6 sides, as a cube) and normalized it. Then added Simplex Noise combinations (HUGE thanks to DevDad for that plugin Simplex Noise

    Every noise layer also creates a vertex color, 3 layers for 3 colors so far. It takes more less 3 seconds to create a 128x128 quad, there are like 96 quads per planet (values can be changed) biggest I did was 256x256 polys per quad and 8x8 quads per planet's side.
    So, that's roughly... 256x256x64x6 = 25 165 824 polygons. Performence was, well, not bad. But it took ages to generate. So, I decided I'd SAVE that planet to a game save. Worked. Now after a first run the planet is saved and I can load it inside the editor or on the beginning of a game. Works pretty nice. Problem is a saved planet that size is 720 MB. The one you see in the video is 320 MB. No LOD yet, but the performance is amazingly good here.

    Still, it would be AWESOME to have that load or generate on a different thread. Or something.

    Anyways, This is how I'm killing time waiting for No Man's Sky here. Might even consider putting that Blueprint to Marketplace later, when I finish the atmosphere shader and some other things, like rocks placement, forests and water... And such... And LOD... And gotta ask DevDad for a permission to include his plugin... Or something.

    God, how I love Unreal!

    What do you think?
    Last edited by Z-enzyme; 08-21-2016 at 05:50 PM. Reason: The project's type is evolving. Also, an update.

  2. #2
    0
    Wow, looks awesome! Great results! I cant wait to see what else you do with it.

  3. #3
    0
    Well done, looks real nice

  4. #4
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,675
    This looks really nice.

    I have some questions though.

    1. How big is this planet?
    2. Would it be possible to show a Wireframe of the Quads? I am curious to how dense the meshes are.
    3. Look into using the Run time Mesh Component It should load your Quads Faster.
    4. What are your plans for this? Do you plan on open sourcing it or selling it?
    5. Is this compatible with the BP to C++ toolset? If so you should get a performance boost from that.

  5. #5
    0
    Quote Originally Posted by HeadClot View Post
    This looks really nice.

    I have some questions though.

    1. How big is this planet?
    2. Would it be possible to show a Wireframe of the Quads? I am curious to how dense the meshes are.
    3. Look into using the Run time Mesh Component It should load your Quads Faster.
    4. What are your plans for this? Do you plan on open sourcing it or selling it?
    5. Is this compatible with the BP to C++ toolset? If so you should get a performance boost from that.
    1: You can scale it freely any way you want, there's also a radius variable which defines the... Radius.
    2: Sure. The density is actually a matter of setup, you can make it as dense as you want really. For safety measures (as first generation process is quite heavy and slow) I set the MAX amount of quads to 8x8 per side (6 sides total) and max quad squares to 256x256. But that's a limit that can be easily changed.

    Name:  Planet01.jpg
Views: 2512
Size:  971.5 KB
    - simple mesh, on the right you can see how many quads (squared) it generates and how many faces (squared) per quad.

    Name:  planet004.jpg
Views: 2510
Size:  953.8 KB
    - the planet from the video - 4x4 quads per side, 128x128 polys per quad. (6 sides x 4x4 x 128x128 = amount of faces * 2 = amount of triangles)

    Name:  Planet02.jpg
Views: 2498
Size:  814.7 KB
    - biggest I saved so far - 8x8 quads and each 96x96 faces. 720 MB save.

    Name:  Planet03.jpg
Views: 2496
Size:  965.9 KB
    - this is a single quad I made it possible to build - 8x8 quads, 256x256 faces. Tried to generate once a planet like that, well, can't remember the save size but was way too big.

    3: Sure will do! Thanks a bunch mate!

    4: Well, probably will try creating a simple game for Android with this, like, a space exploration, mining and trading game, maybe something bigger for PC as well but that - meh, dreams XD
    Sourcing / selling. That depends how this goes. If the script ends up really good I might consider just giving it free. Or through the Marketplace. Bit gotta speed things up and optimize it a lot.

    5: If I'm able to do the basic math (vector grid generation) through C++ (which I can't for now) then this might be something worthwhile.
    It IS BP wise only. But uses a plugin made by DevDad, I have no idea how C++ conversion from BP to C++ with that toolset works.
    Heaviest here is calculating Tangents and Normals for quads in the Generation pass...

    Okay, how that works: First you gotta generate a planet - that is amount of quads and faces, set up everything in the noise, and such.
    Then you checkbox SaveToFile box.
    When you hit PlayInEditor the game generates quads. It's about 3 seconds for a 128x128 polygon quad to 20 seconds for 256x256 quad. So, if you have 64 quads 256 size, it's 21 minutes per planet's side. And there are 6 planet sides. 2 hours straight for full res planet.
    But!
    When the first generation pass is over it saves the result to a file. A simple SaveGame file. The load process is fast and easy, but the files are big. You can also load the planet in the editor through Construct Script.

    Anyways, gonna check this Run Time Mesh Component, see how that goes. Thanks a bunch!

  6. #6
    0
    This looks promising, very cool.

  7. #7
    1
    Luminary
    Join Date
    Mar 2014
    Posts
    1,675
    Hey @Z-enzyme,

    This may also be of interest to you - It was posted in the runtime mesh component thread. The Runtime Mesh Component is also free if I recall correctly.

    Quote Originally Posted by Koderz View Post
    As a heads up to everyone currently using the RMC or thinking about using it!

    First, the RMC is now on the Marketplace, and is now also downloading correctly for those of you who attempted to download it when it first went up and were unable to. The marketplace version is the same as the current released version on github (not the master branch source).

    Version 2 should be out in about 2-3 weeks if all goes to plan, with some of the following either already in github, or showing up incrementally over the next couple weeks. Version 2 will, hopefully, bring the remaining tools from the PMC over including normal/tangent calculation, RMC <-> StaticMeshComponent conversions, and hopefully tessellation support. There's also a decent chance that it will have the initial round of improvements for collision cooking. Unfortunately though as those have taken multiple engine changes, it will require a source build of the engine at least until Epic hopefully merges part/all of it back into mainline UE. So far the collision cooker can be operated in its current game thread only mode but allow for some control over the quality of the cook cycle. There's a trade off between quality and speed of cooking, with lower quality cooked meshes being a little slower in the actual collision detection but this alone allows it to run up to ~6x faster. It should also support nearly full multithreaded cooking to move most of the work off the game thread.
    That should help you out allot

    More Questions -

    1. Are there any Plans for a Solar System Generator with this included?
    2. Are you doing collisions at all with BP procedural planets?
    Last edited by HeadClot; 07-22-2016 at 08:58 PM.

  8. #8
    0
    Already downloaded the RMC, tried it, the mesh generation speed isn't noticeably faster. Most time takes the calculation of tangents and normals (and that RMC will have in it's next release) so I will wait patiently for that.

    Also, tessellation? That should help a lot! Thanks @HeadClot.

    As for questions:

    1: Nope, the generation is way too slow, well, maybe, for not very detailed planets that can work. Actually, not a bad idea. Yea. I think that at some point I'll try...

    2: Yep. Each quad is separate procedural mesh with collision. No idea how that really works but never flew "inside" the planet. So, guess it works.
    Last edited by Z-enzyme; 07-22-2016 at 09:07 PM.

  9. #9
    1
    This looks excellent, @Z-enzyme! I hope you do decide to put it on the Marketplace; I for one would be interested in tinkering with it. I attempted a similar thing in Unity aeons ago with my rudimentary C# skills. Needless to say, the performance was abysmal but this already looks considerably more efficient, and with better results than my own experiments.

  10. #10
    1
    A little update.

    Created a crater system, it's slow but works, seed driven. Here's a screenie of 2 planets with a single crater, but big.

    Name:  Craters.jpg
Views: 2519
Size:  492.4 KB

  11. #11
    1
    Looks great! keep it up, I'm always interested seeing what people can do with procedural geometry.

    Have you looked into quad trees? that could work pretty well for this.


    I have a quad tree implementation in the works, meant for an infinite ocean plane but the same logic can be applied for dynamic terrain and pretty much everything of that nature, it's pretty cool.

  12. #12
    0
    @TK-Master Wow, oh my. I'd totally would love to use that. Problem is I'm using procedural mesh component. I'm making my own grid of vectors, spherify them and offset them though simplex noise. No idea how to implement this kind of thing there. I'd have to take the high res grid I've got made with vectors and make lower res quads with that info to keep the noise persistent.

    I'm doing everything in Blueprints so it's kind'a slow.

  13. #13
    0
    It might not be that fast if implemented via blueprints but I can't think of a reason why it would not be possible.

    You can find multiple articles and guides about quadtrees in google if you want to research this further.

    I would start by creating 6 quadtree grids, spherify them, offset them via noise etc. It's the same thing as you are currently doing really, it's just how you generate the initial grids that's the tricky part.
    The nice thing with quadtrees is that you can skip generating any grids outside the camera frustum and "subdivide" the grids based on pixel coverage so the vertex wastage is pretty much as little as possible, it's very efficient.

  14. #14
    0
    A little update.
    Got the proper atmosphere working! Material is pretty hard to set up right with different planet sizes but I guess it works. I need to do some testing.


  15. #15
    0
    Big demand for this....

  16. #16
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,675
    Ok, that atmosphere material is really cool

  17. #17
    0
    Luminary

    Join Date
    Mar 2014
    Posts
    1,977
    Heh, moment of transition from outer space into atmosphere is fantastic!

  18. #18

  19. #19
    0
    Quote Originally Posted by franktech View Post
    WTF??? .... The talent level on the UE4 forums is mind blowing!
    O ****! I totally forgot about it! I am a game designer already, quit teaching half a year ago :P

    Quote Originally Posted by zeOrb View Post
    Heh, moment of transition from outer space into atmosphere is fantastic!
    You won't believe but it's a single lerp from distance to the planet that just changes power and multiply of the shader :P

  20. #20
    0
    Quote Originally Posted by Z-enzyme View Post
    O ****! I totally forgot about it! I am a game designer already, quit teaching half a year ago :P
    Well kudos, it looks great so far. Feel like saying any more?
    Are you at a Triple-A studio or starting your own shop etc???

  21. #21

  22. #22
    2
    Quote Originally Posted by franktech View Post
    Well kudos, it looks great so far. Feel like saying any more?
    Are you at a Triple-A studio or starting your own shop etc???
    Long story xD and no, I'm not in a triple A studio, just starting in an small indie studio with a little sponsoring.

    Long story short.

    Started coding with the first Unreal script back in 2000. But I do graphics mostly, animations and shades for Unreal. Been teaching English for 10 years cause that was the only thing I could do pretty well. Failed my maths and physics maturity test lol so couldn't study computer technology or programming.

    Well, yeah.

  23. #23
    0
    Quote Originally Posted by Z-enzyme View Post
    Long story xD and no, I'm not in a triple A studio, just starting in an small indie studio with a little sponsoring. Long story short. Started coding with the first Unreal script back in 2000. But I do graphics mostly, animations and shades for Unreal. Been teaching English for 10 years cause that was the only thing I could do pretty well. Failed my maths and physics maturity test lol so couldn't study computer technology or programming.
    Well if it makes you feel any better, I have that sort of background...
    Yet no idea where to begin on something like this, so kudos again!

  24. #24
    2
    Ha, a little update. Now, after a planet is generated you can save it in your map in PlanetData variables, it's not a mesh but only mesh data which is regenerated in just few seconds after the game starts. So, I can stream it now! No need for savegames to store planet data!

  25. #25
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,675
    Quote Originally Posted by Z-enzyme View Post
    Ha, a little update. Now, after a planet is generated you can save it in your map in PlanetData variables, it's not a mesh but only mesh data which is regenerated in just few seconds after the game starts. So, I can stream it now! No need for savegames to store planet data!
    Got to admit this is a super cool update

  26. #26
    0
    Right now checking how vehicle physics work with planets.

    Name:  Rover.jpg
Views: 2107
Size:  192.5 KB

    Not that bad. This planet has 204800 cm radius but mu pawn and my rover are half the real size. So it gives like 21.100.000 km^2 in game if my calculations are right, but I'm really bad at maths. :P
    Gonna post video later when other things are finished.

    Or maybe a playable build?

  27. #27
    0
    Wow dude, this is awesome. Fantastic work so far, looking really impressive especially with the included atmosphere effects now. You could easily make this into a sweet procedurally generated game. Also should say reminds me a bit of Astroneer. Good work and good luck!!

  28. #28
    0
    Quote Originally Posted by Higuy8000 View Post
    You could easily make this into a sweet procedurally generated game. Also should say reminds me a bit of Astroneer.
    Astroneer is a cute looking game.. Low poly Space Engineers meets Kerbal SP...???

    @Z-enzyme
    Entirely unselfishly I say, why not give away this procedural tool to the community for free (PR)
    More seriously, why not team up with a procedural foliage project to help populate the planets?

  29. #29
    0
    Quote Originally Posted by franktech View Post
    Entirely unselfishly I say, why not give away this procedural tool to the community for free (PR)
    More seriously, why not team up with a procedural foliage project to help populate the planets?
    Problem is - the generation time. These planets are not generated in real time, and the generation takes ages. So, for now it'll stay like this.
    To team up, well, will think about it. Thanks.

  30. #30
    0
    A little update. Been working on other systems now, for a real time map grid generation (turned lame imo) with POI signatures, and vehicle physics on a planet. Well, the last one works just fine. Also tried to make some decent model, still early WIP.


  31. #31
    0
    Looks super cool Z

    (p.s. you drive like me)

  32. #32
    0
    Very nice man. Keep it up!!!

  33. #33
    0
    Quick update.
    Using Runtime Mesh Component now, got 3 more shaders done for planets - moons and flat shading.

    Here's a screenie.

    Name:  PlanetGaia.jpg
Views: 1835
Size:  119.6 KB

  34. #34
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,675
    This looks really cool keep up the awesome work

  35. #35
    0
    This is awesome. I'd probably buy this if it was on the marketplace in some form

  36. #36
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,675
    Quote Originally Posted by Pinworm View Post
    This is awesome. I'd probably buy this if it was on the marketplace in some form
    Yep same here.
    @Z-enzyme - Since you switched over to the Run time mesh component how has performance been?
    Last edited by HeadClot; 08-09-2016 at 12:01 AM.

  37. #37
    0
    @HeadClot To be honest - no idea. Still hitting over 80 FPS on each of my planets (IF they are not moving). I'm waiting for LOD, LOD dithering and other stuff, then this might give me a big performance boost. Or I need to learn how to actually use it properly :P

    Most performance eats up grid creation, where I have to create an array of vectors for vertices, and the noise offsets, craters, gotta figure out how to do that on different thread, probably will hit C++ next week to see if I can manage.

    The BIG problem I have now is, as you see the screen above, the mesh striping between water and terrain. It's caused by the scene depth optimization. No idea how to get rid of it without heavy material ingeration and pixel offset changing.
    Last edited by Z-enzyme; 08-09-2016 at 07:18 AM.

  38. #38
    0
    Patron
    Join Date
    Jun 2014
    Posts
    32
    This looks awesome! I cant wait to see how far you go with this. Hopefully with the release of no mans sky, that that doesnt slow you down on this haha

  39. #39
    0
    Quote Originally Posted by zz View Post
    This looks awesome! I cant wait to see how far you go with this. Hopefully with the release of no mans sky, that that doesnt slow you down on this haha
    Hah, naah, not really, I'm not a release buyer, I'm probably going to wait like a week or two for some user reviews. Then my existence will turned to three activities. Sleep, Eat, Play NMS.

  40. #40
    0
    Quote Originally Posted by Z-enzyme View Post
    Hah, naah, not really, I'm not a release buyer, I'm probably going to wait like a week or two for some user reviews. Then my existence will turned to three activities. Sleep, Eat, Play NMS.
    In that case...

    I was the one who paid $1300 for NMS <cough> and can confirm its really bad.
    So I guess that leaves more time for developing your own project instead then

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •