slapin Posted September 9, 2017 Share Posted September 9, 2017 Hi, all!I want to implement what I did for Urho3D and Godot i.e. procedural roadmap + buildings (but on different level, i.e. not 90 degrees angles and different building styles will beimplemented. Where should I start?I do have all the algorithms implemented already, I just need to have engine-specific hooking.1. How can I implement procedural geometry for buildings with LODs. The buildings should be enterable and withinteriors.2. How such code is best integrated into engine, i.e. where to look for hooking that in?3. Later I will want to have procedural terrain generation, where to look how this is done?4. How can I store generated geometry in save file so it generates everything on New game and then everything persists throughout playthrough?Thanks! Quote Link to comment Share on other sites More sharing options...
Duion Posted September 9, 2017 Share Posted September 9, 2017 Anything that is like a road can use the road tool, you just add nodes and it will generate a road to there.Simple geometry can use the sketch tool maybe.Terrain can also be modified realtime, but the size cannot change.But a whole building that can be entered is very complicated, you would need some code that generates a regular 3D model.The LOD part I would leave out since that is too complicated for now. Quote Link to comment Share on other sites More sharing options...
slapin Posted September 10, 2017 Author Share Posted September 10, 2017 That is my actual question - how can I generate 3D model at runtime? Quote Link to comment Share on other sites More sharing options...
Duion Posted September 10, 2017 Share Posted September 10, 2017 I would search the old garagegames forum, especially the resources, since often people have already done it and I think to remember mutiple people doing this already.Or look up the sourcecode in classes that already generate geometry, like terrain, ground plane, clouds, sketch tool, mesh road tool, collision mesh generator in shape editor etc etc there are already a lot of places where that happens. Quote Link to comment Share on other sites More sharing options...
LukasPJ Posted September 10, 2017 Share Posted September 10, 2017 You can find examples of different rendering methods here:https://github.com/GarageGames/Torque3D/tree/development/Engine/source/T3D/examplesThis file in particular:https://github.com/GarageGames/Torque3D/blob/development/Engine/source/T3D/examples/renderObjectExample.cppshows how to render a hard-coded cube. In order to do it procedurally, you would feed it your procedurally generated vertices.This is only for rendering, you would have to add to that in order to get collision working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.