Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

TOZ Planet Renderer - Gamekit for generating procedural LOD Planet and Solar Systems

Discussion in 'Assets and Asset Store' started by aubergine, Jul 5, 2018.

?

What tier machines are you targeting?

  1. Low end (Mobile, VR, old computers)

    0 vote(s)
    0.0%
  2. High end (Fast, many processor gaming pcs)

    100.0%
  3. Both

    0 vote(s)
    0.0%
  1. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    This would be the support forum for TOZ Planet Renderer and modified TOZ Noise to go with it.

    Buy From:
    ASSETSTORE

    VIDEOS





    Documentation for TOZ Planet Renderer

    WHAT IT DOES :
    This pack is able to help you render whole planet bodies in space with the help of quadtree planes shaped to look like a planetoid with high and optimal frame rates acceptable for a computer game or a real-time simulation.

    Can continuously render a dozen planets at the same time without losing much speed thanks to the multi-threaded architecture, smart coding and optimal shaders.

    There are various options in the package that helps you shape the planets and there are various helpers to control collisions, oceans and atmospherics.

    NOTES :
    Source code is fully included in this release, you should check the script files to see various variables and how things are done.


    Documentation for TOZ Noise

    WHAT IT DOES :
    This package is an enhanced copy of LibNoise for C++ adapted for Unity Game Engine. Used for generating heightmaps for Unity Terrain, TOZ Planet Renderer and mesh objects. Also used for generating procedural textures and bumpmaps and lightmaps. This package also can generate 3d volume textures.

    This package is provided on my website www.tozmar.com and a slightly modified version is provided for free and as a support tool with TOZ Planet Renderer

    NOTES :
    Source code is fully included in this release, you should check the script files to see various variables and how things are done.

    Modules & Helper Assets:
    TOZ State Machines = This asset was on the Assetstore around Unity 2.5x - 3x versions, and recently i upgraded it to be compatible with Unity 2017.3 and up. It is also compatible with TOZ Planet Renderer and gives you ability to kickstart AI vessels, also can be used as individual product.


    TOZ WayPoints = This asset was on the Assetstore around Unity 2.5x - 3x versions, and recently i upgraded it to be compatible with Unity 2017.3 and up. It is also compatible with TOZ Planet Renderer and gives you ability to find shortest paths between a start and end point, also can be used as individual product.
     

    Attached Files:

    Last edited: Apr 16, 2020
    ZJP, no00ob, Neviah and 1 other person like this.
  2. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Images_0001_Layer-10.png Images_0002_Layer-9.png Images_0003_Layer-8.png Images_0004_Layer-7.png Images_0005_Layer-6.png
     
    Last edited: Oct 25, 2018
    Razmot and Mark_01 like this.
  3. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    This is wonderful. How much will the asset be?
    Got any future plans to have a biome-maker? Or something that can create interesting, wonderful worlds? Just curious haha
     
  4. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    291
    Is there a floating origin system ? What is the maximum radius of a planet ?

    Your "competitor" (more of a complementary package IMHO as its main focus is not the terrain but all the rest) Space Graphics Toolkit has been rewritten to handle floating origin, and the floating origin source code is included in the free basic version there so maybe you can make Toz planet gamekit compatible, or at least use the same approach ?
     
  5. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Initial release price is 50USD, i assume it will gradually increase as i add more features. Current release is the barebones of the system, just rendering planets with correct lighting and atmosphere. But the codebase for future features is also already in it, so you can write your own improvements as you wish.

    Creating biomes is easy as writing a code logic such as:
     
    Neviah likes this.
  6. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    I dont know what is a floating origin system, never heard such a term. But if you mean to keep camera at pos(0,0,0) at all times and move everything else relatively, it is easy for you to do as my planets are treated like normal transforms, nothing else.

    Radius of a planet is irreleveant, but should be kept within limits of unity lighting systems. If you make a big terrain like 10.000 units the shadow maps will be distorted and blurred, if you make a terrain like 100 units, shadows will look nice and smooth. In the demo video, sun radius is 50, big planet radius is 512 and small one is 256 and the distance between the 2 is 1000 units. What matters is how you traverse the distance between and on the surface. The point is, you can scale the whole solar system into 100m3 or you can scale it up to 100.000m3 which doesnt matter at all.

    The competitor you mentioned is not really a competitor and it does something completely different. Some aspects can be used to support my asset i guess but i really didnt take a look.

    My roadmap is in the document written in the first post. If you have any suggestions, i will obviously consider.
     
    Neviah likes this.
  7. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    190
    Asset looks really cool. Just wondering, how easy is it to use? I'm not much of a coder myself thats why.
     
  8. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    190
    Just wondering is it easy to use, if I am not a coder?
     
  9. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Hi, it is not easy to use especially when you dont know the basics of c# language and intense maths and geometry.
    Even though i do add planetary walking, vehicles and space flight code(next update), you will have to extend it to get your project running.

    On the other hand, the good thing is; this is a very math/geometry heavy package with well written code and you get all the source. It might be a good learning material.
     
  10. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Space flight, atmospheric flight and planet surface/underwater walking/swimming demo can be seen in the following video.
    Package will provide the basic motions but can be easily extended and it is the customers job to do so, although i provide customization as well.
    The flight modes and character motor is full physics driven, all natural forces at work.
    EDIT: Physics motion currently is like stop motion, can be easily edited to be newtonian motion.

     
    Last edited: Aug 5, 2019
    Razmot likes this.
  11. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    291
    Now that you have a walking / swimming character using physics, the size limitations are relevant again :

    - What is the max planet radius for a standard character of 2 meters height ?
    ( having non standard character height is a major pain)
    - Max Mountains Height ?
    - Max Underwater deepness ?

    Other solutions (and games) use the floating origin system, please think about it !
    - having double3 vectors for keeping track of the absolute positions
    - multiples cameras with fine tuned culling planes (at least a far camera and a near camera, sometimes more cameras).
    - when the player reaches a distance of 2000, move the player back to 0 and move all transforms relatively.

    Everything that is near the player (near camera, near layer) is in the floats OK range, everything that is very far is in crazy big ranges but as it's very far it doesn't cause too much problems.
    You can have a look here for a clean implementation https://github.com/josephhd/Planetary-Terrain
     
  12. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    This is a generic package, for every kind of usage. No need to limit it with "floating point origin" thing.

    First of all, in such computer graphics even though unity says its units are in meters, it is a matter of arbitrary unit and what matters is the ratio you use.
    Earth has approximately 6300km Radius and the things around you are proportional to this size including the standard 2m character.

    So, if you make your earth 630km and to make it sensible you make it 630units in unity, then you can make your character 2m / ratio = lets say 0.1m
    Then the force you apply for motion becomes 0.1m walking force instead of 1m

    With using such a sensible ratio, you can squeze the whole solar system inside 100.000m3 unity World.

    But the most important part relating my package is, i offer you the barebones of a planet rendering, it is your job to do the rest.

    As for the floating origin thing, planets and suns in my package are just ordinary transforms. You can move them around as you wish.
    But resetting motion every 2000m doesnt make sense, instead you can calculate the necessary forces for your player like you normally do and apply the inverse movement forces to your solar system parent, thus your player always stays at 0,0,0 and your planets will move instead. This will have problems later on with your game logic though.

    That is why the egosoft x series games always have Gates to visit other solar systems/sectors.

    Anyways to be clear about my package again, this is not a ready game package, it is a planet rendering kit. You will need to do the rest of your games logic yourself. The extra walking/swimming/flying scripts are examples only to guide you on how things can be done and how you can get some necessary variables from planet related scripts.
     
  13. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Natural environment tests, trees are created per lod patch (adjustable to lod level) in the below video, there are 4 lod levels and trees are created for the last 2 levels. As it is just a test, trees are created as a rectangular grid, and straight rotation to gravity. It could have some randomization on position, tree height, tree rotation...etc

    Visibility of trees is adjusted per terrain patch and they are automatically culled if they are behind fog distance or the terrain is culled.

    Most importantly, they have working shadows and uses standard unity shaders.


     
    no00ob and Neviah like this.
  14. no00ob

    no00ob

    Joined:
    Dec 13, 2017
    Posts:
    55
    This is so good asset I would buy it immediately but I don't have any money :( and will probably never have enough money to spend on this due to the fact that this would really only be usable to one or two games it's not something you use for every game. But to be honest if you added a random planet generation system which uses the distance from the sun to determine some things like is water liquid, that would make me buy this no matter the prize. ;)
     
  15. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    You dont build a game every week i hope, ive been doing this since 20 years now and havent released one full game yet.
    The thing about my package is, you can use it for many different type of games with some imagination. Its an infinite terrain, its a full scale planet, its a top down view solar system….etc But the most important thing is, you get the whole source code, well written and very modular which also includes the enhanced version of TOZ Noise, with unity terrain and planet terrain editing capabilities also with source code.

    Random planet generation is what this package is all about anyhow, you get many planet properties such as "if has water, if has atmosphere, if has clouds, distance to nearest sun", so you write a simple if statement to customize your planet.

    The only thing to keep in mind before buying the package is; you need to know how to code, this is not a one click of a button solution. You need to work.
     
    Neviah likes this.
  16. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    707
    Hey @aubergine - I have a few suggestions for this tool.

    1. Would it be possible to get a top down spline based tool similar to the Solar System editor from Planetary Annihilation? Link
    2. Would it be possible to get some form of integration with Space Combat Kit by VSXGames?
     
  17. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    This package already has an Interpolation utility and a spline class defined in it, currently is undocumented. And i already have a spline editor tool which you create splines visually on the editor screen, i should add it to this pack as well.

    I checked the space combat kit, and there is no need for any integration as the 2 packs do not collide anyhow. You can just use both. If you inform the owner of that package, he might be interested in my custom development version to use in his mentioned radar feature and probably will need to use my packs planet object coordinate system to target those as well. But you can do it too you know, you already have my source code and hopefully you have the source code to his pack as well.

    EDIT: Planet surface/atmosphere combat thing is different though, it has different mechanics. Anyone trying to incorporate their package to mine will have to get my development version.
     
    HeadClot88 likes this.
  18. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    New update;

    * Celestial objects (planets, suns, asteroids..etc) now automatically generate waypoints to traverse planet surface
    * Celestial objects generate waypoints between each other
    * Pathfinding (planet surface and between planets) is now calculated through a fast node based Astar function
    * There is also a 3d grid based AStar pathfinding incase needed
    * There is also a spline generator between the shortest found path between waypoints that also calculates collisions inbetween (autopilot)
    * There is also a spline editor for pre-calculated paths, saves the paths to disc so you can load them during runtime if needed

    Still not submitted the new updates, it will be a big update with many features mentioned above posts. After submission price will rise to 150usd
     
    Neviah likes this.
  19. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Slowly improving the water shaders, now it has prototype foam breakers on the shores.

    water.jpg
     
    HeadClot88 and Neviah like this.
  20. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Photos that Show the current state and progress.

    Images_0000_Layer 11.jpg Images_0001_Layer 10.jpg Images_0002_Layer 9.jpg Images_0003_Layer 8.jpg Images_0004_Layer 7.jpg


     
    HeadClot88 and AthrunVLokiz like this.
  21. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    More photos

    Images_0005_Layer 6.jpg Images_0006_Layer 5.jpg Images_0007_Layer 4.jpg Images_0008_Layer 3.jpg Images_0009_Layer 2.jpg
     
    Neviah and AthrunVLokiz like this.
  22. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Images_0010_Layer 1.jpg
     
    HeadClot88 and Neviah like this.
  23. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Finally out of beta, no bugs left in the main planet rendering and alot of features are in this release. Will update 1st post with details after package is aproved.
    Submitting the v1.1 to the store today.

    Below video shows the current state and capabilities of v1.1, there are nearly 20million triangles rendered in it.

     
    Neviah and AthrunVLokiz like this.
  24. Hellgeist

    Hellgeist

    Joined:
    Feb 13, 2017
    Posts:
    10
    This is looking really good, thank you for the updates and videos. Have you tested the physics on-surface movement with a 3rd person controller? I'm curious if camera control can run separately from the body/vehicle in this environment. My experience with variable physics with a character controller has required some rather torturious calculations where axes or rotational methods need to change fairly constantly, and you're managing many state changes and their related variables.
    I know that sounds like a bunch of buzzwords, but I'm just trying to compress a huge bucket of problems that arise when you actually make a 1st/3rd person game in this kind of setting - on foot, in vehicles/craft, with their relative movement constraints. Using a flying camera makes things look really simple to implement, but it really isn't.
     
  25. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Hi

    Obviously i do test physics on surface movement and i have a prototype physics character controller with basics working.
    Basics means, up vector to be aligned to current planet if inside atmosphere and gravity changes according to the mass of the planet. There is also an isGrounded variable to determine if we are touching the surface of the planet.
    So, you have an up vector and a forward vector. The rest is easy, you rotate your main body to the upvector and the camera as a child of this main body will rotate accordingly, then a seperate rotation on camera on local x axis gives you the fps look as in unity examples.

    Now if it comes to the body to be a child of a space ship or a car on the planet surface, it will rotate with it accordingly and the camera will still rotate in its own local x axis, so it is all too simple actually.

    Even this package is all about planet rendering, there would be no games if i didnt supply some helper classes. And i want people to make nice playable games with it.

    So, i provide base classes that do most of the hard work for you.
    Not mentioned in the current documentation though but there are the GameObjectBase, RigidBodyBase, DynamicObjectBase, CelestialBase and PlayerBase classes that do celestial calculations for you and expose needed variables.
    You will mostly use DynamicBase and PlayerBase as the first will be used for vehicles/space stations and the latter for humanoids.
    But if you know your ways around coding, you are not bound to those, you can always write your own and copy the necessary ones from the base classes.

    Briefly, doing character movement is just like how you do it with regular unity games, the only difference is you can not use the standard character controller and you have to write a custom rigidbody fps controller which i provide a simple sample.

    If someday unity decides to add the upvector to character controller, it will be usable with my package. And they should because physics engine already supports it but unity decided not to add it.

    Another problem which you need to overcome is the tree billboards (actually unity billboards) also have y axis as up vector as standard but the solution is simple as writing your own billboard rotation which i will provide again.

    This means, using the package is simple but standard assets wont work as is and need alittle bit tweaking all around. That is why i also have a developer version for those WHO want to sell compatible packages on the assetstore.

    In the end, this is not a one button solution to make the next elite dangerous game, but if you have the coding skills for regular unity games, there is no stopping you to make one. And i am always here to help, because if you succeed, i succeed.
     
  26. Hellgeist

    Hellgeist

    Joined:
    Feb 13, 2017
    Posts:
    10
    Thank you for the insight, its music to my ears. Signing up, and looking forward to digging into this asset.
     
  27. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Started polishing the v1.2 version, and already finished the below features:
    • 3d Shape tool (to be used with loft creation)
    • 3d Spline tool (to be used with loft creation and general spline usage)
    • Mesh builder tool to create segmented primitive shapes
    • Loft meshes are now available, you can create roads, railways..etc Main usage will be to create asteroid belts.
    • You can now create procedural asteroids with lod stages including billboards
     
    Razmot likes this.
  28. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Video tutorial for 1.2 Splines and asteroid field generation.
    1.2 now has additional billboard creator for asteroid lods, and asteroid mesh creator. Spline tool is very generic and can be used for purposes other than asteroid creation. Code is easy to understand and very clean as always.

     
    Lagunajam likes this.
  29. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Finished the 1.2 update.
    Will submit it on monday with following additions:

    • 3d Shape asset and editor (to be used with loft creation)
    • 3d Spline asset and editor (to be used with loft creation and general spline usage)
    • Mesh builder tool to create segmented primitive shapes (mostly asteroid creation)
    • Loft meshes are now available with proper normals and uvs, you can create roads, railways..etc Main usage will be to create asteroid belts.
    • Asteroid belts are now a thing.
    • You can now create procedural asteroids with lod stages including billboards
    • Billboard creator (for lod stages of asteroids)
    • Space fog and distance is now user defined
    • Premature version of volumetric shader (it can render volumetric nebulas and other smokey fields)
    • Tiny improvements on the overall solar system
    • Dynamic object base class is complete, you can now have space stations properly acting in the environment if you derieve from it.
    • Tiny improvements and fixes on the TOZ Noise with an additional sphere module (it is used to smooth 3d texture generation)
     
  30. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Video shows the volumetric nebula effect.

     
    Lagunajam likes this.
  31. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Here is a video of the new features, and asteroid field fly by.
    Correct realtime shadows for asteroids, planets and everything else.

     
    Lagunajam and Neviah like this.
  32. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Example scripts working for seamless space/atmospheric flight and walking/jumping on the planet.
    The scripts are full physics driven and can be applied to your own scripts easily, most hard work is done already for you.

    Video has few hickups, it is caused by the screen capture. Application maintains a constant 150fps on my ancient computer.

    Also, sorry for the box spaceship, i cant do nice models.

     
    Neviah and Lagunajam like this.
  33. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Guess I will have to wait when you got it on sale Lovely package
     
  34. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    While submitting, i decreased the price to 99usd and further more this package will be on mega sale and singles day sale with additional 50% discount. So, i think it will be around 48usd during the sales.

    However, if you dont know how to code or if you basically dont want to, you shouldnt buy this package (or any other package) because you cant make a game without coding.
     
  35. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Oh I want to code though got to admit I am still learning, so I am no expert
     
  36. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    How many Solar Systems can you have?
     
  37. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    There can be one sun(directional light) per scene.
    You can have interstellar travel somehow through Gates or something and load a new scene with a new system.
     
  38. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Oh I see
     
  39. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    And how many planets per Solar System
     
  40. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    There is no hard coded limit, it is all up to you, you can have as many planets as your computer can handle.
    But please dont buy it unless you know how to code things.
     
  41. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    This is a short video of the upcoming lightspeed travel effect,

     
    Neviah likes this.
  42. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    COOOOOOOOOOOOOOOOOOOOOOLLLLLLLLLLLLLLLLLLLLLLLLL So can that be with ships? And you have in and out of vehicles which will include hovercraft or more specifically Hovertanks??
     
  43. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    It is for the ships to simulate that they are travelling very long distances when actually they are not.
    In and out of ships is there as an example, no hovercrafts provided by me but the base code is there so you can write your own.

    After all, except the planet renderer, all other stuff are examples and you will have to write your own code.
     
  44. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK Thanks
     
  45. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Here is a progress video for the upcoming update.

    A 3rd person controller complete with animations (extendible via layers) and physics interaction. Camera also checks for collisions.

    EDIT: Jumping is Half-Life style, you can jump higher and further while crouching+jumping.

     
  46. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Oh yes I bought your Asset and its great but its a pity there are no ground vehicles in it I have scripts for ground vehicles but not sure they will work with Planet Renderer I will try it them out with it though
     
  47. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    If you inherit your vehicle class from "TOZ.PlayerBase", you will have the Gravity variable which adjusts itself according to the nearest celestial object (or zero gravity in the middle of space) and that gives you an up vector.

    If you also check the example "SpaceCraft.cs" file, you will see how i Orient the up vector according to the gravity (if there is any), and the rest is simple, just apply the torques and forces to your vehicle. Custom gravity is applied automatically through the PlayerBase class.

    EDIT: You can change the "SpaceCraft.cs" file slightly to have a hovercraft. If you remove the horizontal rotation and if you clamp the altitude to a certain height, its an hovercraft!
     
  48. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Great Would like to have it so you can have 1st and 3rd person views and be able to look around using the joystick hat when your in the vehicles the next thing now would be making A.I get into and out of vehicles and a factory that spawns vehicles with A.I pilots/Drivers in it so an F.P.S/R.T.S game can be made, still been experimenting with it and its excellent I haven't done much but did change the Space Stations collidier from Box to a Mesh collidier and I could fly straight through the middle of the Space Station so look forward to doing more with this excellent product
     
  49. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,708
    Space station and all others are just simple place holders and just showing how things work.

    The 3rd person controller is work in progess.


    The controller has 3rd person camera which also checks for collisions with the environment and adjusts its position accordingly.
     
    Last edited: Aug 5, 2019
  50. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Great, look forward to the next update
     
unityunity