Jump to content
  • 0

Rotation of blocks?


CaptainEli

Suggestion

Bear in mind, I don't know how difficult this would be to implement, but I figured I'd suggest it anyway seeing as I didn't find anything of the sort in the forum.

 

Anyway, what I was essentially thinking is that blocks could be placed on non-90-degree angles.  For example, placing a long block on a 45 degree surface and having it stick out perpendicular to the surface.

 

This would give us a truly ridiculous amount of control over ship design, and maybe it'd be too much, but I'd love it anyway.

 

That being said, I'm also aware that the chances of this actually being implemented are nearly, if not completely, nonexistent.  I just figured I would throw in my two cents.

Link to comment
Share on other sites

5 answers to this suggestion

Recommended Posts

  • 0

You can already do simple angles along a plane by using slope blocks. The easiest way to see how this works is to use a cube size like 2x2x2, and then place one, flip it over so it connects at the flat and has the slope upside down. Something like /| |/

Link to comment
Share on other sites

  • 0

I've heard stuff like this can't be done because violates the grid logic ships are built on.  Then again Notch thought moving blocks (pistons) would be impossible for Minecraft.  So we'll have to see what the modders can come up with.

 

This is exactly why I will wait for a talented mod author to prove us all wrong.

Link to comment
Share on other sites

  • 0

Ohohoh!

 

I've been mulling about something closely related to this for a while now.  If this were Space Engineers or Starmade there'd be no chance, but blocks can scale arbitrarily in Avorion...

 

The short version is: It can be done.

 

But first, we're going to talk about all of the missing shapes in Avorion.  Why?  You'll see in a moment.  Bear with me.

 

You can enumerate all of the primitives that you'd find if you poly'd over the various combinations of the corners of a cube.  Many such combos would result in mirrored or rotated versions of things you had already found.  A few of them can be constructed out of other primitives - although sometimes you wouldn't want to...

 

After deduplication and deconstruction you end up with a nice set of primitives.  I've made an imgur album depicting them.  I'm sure the names of the primitives are all wrong.  Someone who's an even bigger geometry nerd than I should correct me.  Also, I think I've got them all, but it's possible that I've missed one.  If so, let me know.

 

There's the set that we all know and love - cube, edge, inner, tetra.  Then there's a couple others that aren't too much of a stretch - the quarter pyramid and its subtraction.  The rest are a bit unusual.  I won't go into details.  Please, just look at the album.

 

I've attached the .scad file (as a .txt - rename before opening) for these primitives.  For the truly curious - and anyone who has trouble figuring out some of the shapes - I recommend grabbing that file and looking at it in OpenSCAD (it's free).

 

OK, so what does this have to do with arbitrary rotation?  Well, given an arbitrary mesh, I believe that it is possible to break the mesh down completely so that it can be expressed in terms of only these primitives (and the various rotations and mirrorings thereof).  Something like slicing the design at each vertex (possibly all three planes each time, but maybe this isn't strictly necessary?), and then identifying the contents of the 'cells' that end up being created by such an operation.  You'd probably want to run some kind of binpacking algorithm or something to try to merge cells that didn't really need to be split (basically, the cubes on the inside should be no smaller than necessary).  If implementing this as an editor feature, then keep the original around, and just re-rotate that if the user decides that their first choice of angle wasn't right.  This is so that you don't end up with an explosion in the number of blocks.  If anyone would actually like to implement this (I don't have time), feel free to ask me for help understanding how to do it.

 

What does this mean?  Let's say you have a part.  It has a mesh.  Now you rotate the mesh by, say, 5 degrees on the z axis.  It's still a mesh.  Since it is still a mesh, it can be rendered by the primitives enumerated above.  Indeed, the property of 'being a mesh' is closed under the operation of rotation, so this means that we should be able to rotate anything to any position, and still be able to describe it in terms of these voxel primitives.  Not only would this be useful for arbitrary rotation, but also for importing designs from external modelling programs.

 

I think this could be a mod, and It's not so fundamentally weird as to be incompatible with the base game in principle.  Overuse of the feature might actually cause performance issues though (due to the general increase in the number of blocks on a vessel built this way).  In any case, I think it would need to go hand in hand with a slight tweak to how blocks are picked.  I don't want to scroll through a list 3 times as long as it is now because it is polluted with weird geometry.  However, I'd be OK with selecting the geometry, material, and block types from 3 separate dropdown menus (eg. cube, xanion, shield generator).  It'd clean up the interface, and allow for this kind of extension without adding a bunch of clutter.

VoxelPrimitives.txt

Link to comment
Share on other sites

  • 0

[...]

The more you post, the more I like you.  :P

 

Although I didn't think you'd prove it possible to have anything rotate by other multiples than 90 degrees, I don't think we even need that.

 

My own solution was just perhaps a couple more basic shapes, given we can scale and all. The most important one which would allow sloping at various angles really easily would be a parallelogram prism block.

 

parallelpiped4.jpg

 

The block is still treated like a cube for placement, like edges and all those, but it looks slanted and has connection points both on the top and bottom. Admittedly, it may have to behave a bit weird with scaling to fit in with the current control scheme and all, but it would add a significant number of options I would think.

 

By a bit weird I mean: you couldn't control the thickness of the slope, only the angle through making the "cube" thinner or wider. Of course, for it to truly do more for us than edges, it would need to be slimmer than edges placed back to back will allow. That means both the top and bottom connections need to be less than 50% of the surface area compared to the "cube" surface area. 25% would probably be a good benchmark?

 

It may seem useless, but it would allow, at the very least, to create armor slopes that waste either a lot less space or don't need to be broken down into such small, weak pieces.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...