godot-port icon indicating copy to clipboard operation
godot-port copied to clipboard

Object animation/rotation.

Open Beliar83 opened this issue 5 years ago • 17 comments

The current gfx of UH were made for a purely 2D engine. The animations are splitted into 4 (buildings) and 8 (units) directions respectively. The engine would take care of using the correct direction path for the given rotation of an object.

We need to find a way to either use the current prerendered images with godot or, since we have the original blender files available, reexport the graphics in a way that they are better usable with godot.

For the first we need to either find or make a class/script that can calculate the image to be used for any given angle.

For the second we would need to evaluate what we can actually do with the current blender files.

Beliar83 avatar Jan 15 '19 14:01 Beliar83

I'm personally a fan of 3D, but that's up to @LinuxDonald

aaronfranke avatar Jan 15 '19 20:01 aaronfranke

The game is made in 2.5D i think we should do it again in 2.5D because of the look and feel.

LinuxDonald avatar Jan 16 '19 14:01 LinuxDonald

Well, the game logic can still be 2.5D. But it does not matter for me.

Beliar83 avatar Jan 16 '19 14:01 Beliar83

Would it make an visible difference when we would do the graphics in 3D?

LinuxDonald avatar Jan 16 '19 15:01 LinuxDonald

Well, if we use the same assets it should not. It makes it easier to have things rotated in our case, for example, though.

There are advantages to both 2D and 3D, but it's not really something that I know in enough detail to explain.

The main thing is that we need to decide what to use, and how.

Beliar83 avatar Jan 16 '19 15:01 Beliar83

3D would be easier because of graphics. On 2D we would need a lot of files or Atlas for each animation/building and so on.

LinuxDonald avatar Jan 16 '19 15:01 LinuxDonald

@SubSage what do you think about this?

LinuxDonald avatar Jan 16 '19 15:01 LinuxDonald

There's also https://github.com/unknown-horizons/unknown-horizons/issues/2814

Using 3d models could solve this, though very fancy 2d could do that too.

Do we have 3d models of all assets? I thought there were a few that we only had in 2d.

jmdejong avatar Jan 16 '19 16:01 jmdejong

I think all the ground tiles are handmade sprites iirc.

nihathrael avatar Jan 16 '19 16:01 nihathrael

Yes, using 3D models would completely solve that problem. We can use 3D even if some things are just "billboards" i.e. 2D objects always facing the camera. Buildings and ships should probably be full 3D objects but it should be fine if characters or terrain have no depth.

aaronfranke avatar Jan 16 '19 16:01 aaronfranke

@nihathrael have you maybe discord? I could need for help about code questions and UH.

LinuxDonald avatar Jan 16 '19 16:01 LinuxDonald

Yeah, tiles would not be the problem.

Beliar83 avatar Jan 16 '19 16:01 Beliar83

Hey, I made a quick test for usage of 3D models.

bildschirmfoto von 2019-02-03 18-27-29

Models are quiet good in resolution, but the material needs much more effort to prepare as you can see in the image. Godot works well with Collada files. It is recommended to use a special exporter in Blender. See that link below. https://godotengine.org/article/importing-3d-assets-blender-gamedevtv

To get shadows in the model I set an extra sun light object to the world scene.

nitramr avatar Feb 03 '19 17:02 nitramr

I think a pixelation shader plus 3d models would make it feel like the original, but make rotation easier.

Jummit avatar Mar 03 '19 20:03 Jummit

I am available to help with 3D models, where they are lacking. Is there a tracker task for porting all 2.5D models to 3D?

I would really like to see this game in 3D, with free rotating camera controlled by mouse :-)

brylie avatar Apr 18 '19 21:04 brylie

@brylie We can make a tracker if we have progress to put on it.

aaronfranke avatar Apr 29 '19 01:04 aaronfranke

Sure. A list of items to be ported to 3D would be a good start, or at least a pointer to an assets folder containing the items. Then we can divide the work.

brylie avatar Apr 29 '19 10:04 brylie