bercoder.blogg.se

Planetbase rotate building
Planetbase rotate building













This has the advantage that the geometry can still be batched by the rendering system and renders in a single draw call. The first solution just requires some processing when the connection is placed. Keep in mind that realtime masking (the second approach) can add quite some overhead if you have a lot of such shaders at the same time. You could add parameters to a shader that define 2 or more spheres which are used to discard fragments based on their placement. Use a shader that does the masking in one go. This one states that runtime support for CSG is coming soon. Also keep an eye open for ready to use solutions. Cutting / trimming a mesh isn't as difficult as it sounds, just a bit of fiddling. You most likely only need a sphere as cut-geometry. I would recommend one of those approaches:Īctually cut out the doorway by performing some simple CSG operations on the geometry procedurally. For a modular system the result will be unpredictable. That usually works if you have one object that should be masked. Using a depth mask isn't a good approach in this case. I can't view my Dome from every direction, if there is another one next to it, without getting display bugs.ĭo any of you guys have some tips for me? How would you approach this? I'm allready having trouble to keep control of the renderlayers. But doing this all with mask objects feels like an enormous fiddly task. Now, to me it sorta looks like I got things right and I just need to follow down this road. The inside of the Mask obstructs the inside of the Dome and the outside of the Mask obstructs the outside of the Dome. The Dome is 2 Objects and also the Mask is 2 Objects, with seperate models for inside and outside. I also created a simple archway to obstruct that I'm just cutting out a part of the dome. This mask would just need to be moved and I could move the entrance/exit. I started off simple and created a dome, copied out a part and created a mask. I was wondering how I would realize this myself in unity. The position of theese connections are not totally fixed. Each building has a connection to another one, so that all theese buildings form one structure. Hey, I'm trying to 'sort of' clone this game called Planetbase, as a learning project, In this game you build a Colony on a foreign planet.















Planetbase rotate building