Page 1 of 2

Trying out new 3D features?

Posted: Fri May 22, 2015 1:00 am
by marcOSX
Hello,

I post here because I did not find the issue addressed elswhere. Looking the plans for present version I noticed the idea of having 3D combat. Then I looked the sources and saw some cool folders with textures and meshes...

Is there a way to try that? Or to help? I am not so bad at Blender, btw.

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 1:43 am
by MatGB
The devs who were working on that left the project before I got involved, it's my understanding that most of it was stripped out when the graphics rendering engine was changed relatively recently, beyond that I don't really know.

To be honest, I quite like the game without it, in the mid to late game there are so many combats per turn I fear it'd get bogged down so much you'd never finish (plus, teaching the AI to colonise effectively is hard enough, tactical combat? Ouch).

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 7:13 am
by adrian_broher
MatGB is right, even though I don't agree with the second half of his post. The user input component of the OGRE rendering engine was causing trouble for us in various ways so we removed it and the whole OGRE engine and replaced it with SDL2 library, which only provides means to generate a window, fetch user input and create a drawing context to allow OpenGL usage. Currently no one works on said combat mechanism, so for now it's just inaccessible and unmaintained code.

But now that you mention the meshes and textures: Those should be put into the freeorion-assets repository, after they are converted into an editable format (I would prefer a blend file) and in case they are not pure place holders. They are just bloating the installer unnecessary.

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 8:12 am
by Vezzra
adrian_broher wrote:But now that you mention the meshes and textures: Those should be put into the freeorion-assets repository, after they are converted into an editable format (I would prefer a blend file) and in case they are not pure place holders. They are just bloating the installer unnecessary.
I assume you're talking about the default/data/art/combat directory? In that case - oh yes, very much agreed. Just checked, this folder and its subfolders are about 63MB of (currently useless) data. Storing that stuff somewhere else to reduce the size of the installers sounds like a very good idea.

So, I'm all for moving that stuff into the assets repo. Geoff, Dilvish?

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 8:13 am
by marcOSX
OK I understand now. It was worth asking :D

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 8:13 am
by Geoff the Medio
Fine with me.

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 8:36 am
by Vezzra
adrian_broher wrote:after they are converted into an editable format (I would prefer a blend file)
As much as I'd also prefer blend files - as far as I can see, the meshes are already in an editable format. ".mesh" files are editable, aren't they? You just need the right software. The ".material", ".frag", ".vert" files are all plain text, so editable too, and the PNGs are, well, PNGs. Nothing we can do about them.
and in case they are not pure place holders
What do you mean by that?

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 9:17 am
by adrian_broher
Vezzra wrote:As much as I'd also prefer blend files - as far as I can see, the meshes are already in an editable format. ".mesh" files are editable, aren't they?
They are not. The mesh files are a binary, undocumented, runtime format optimized for OGRE ( http://www.ogre3d.org/forums/viewtopic.php?t=29378 ). There is nothing editable about them.
Vezzra wrote:What do you mean by that?
I haven't seen the content of the mesh files yet. Maybe those are only geometric primitives of no artistic value, placeholders for some planned real models. In this case there is no need to archive/store them.

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 9:50 am
by marcOSX
I have seen some textures that should be related to some mesh, so there is likely more than placeholders in those meshes.

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 2:13 pm
by Vezzra
adrian_broher wrote:The mesh files are a binary, undocumented, runtime format optimized for OGRE ( http://www.ogre3d.org/forums/viewtopic.php?t=29378 ). There is nothing editable about them.
Ah, I see, right, I remember. IIRC there is (or has been?) a tool that can convert OGRE mesh files into a .mesh.xml file which can then be imported into blender. Sounds like a tedious task though.

I wouldn't want to postpone moving that stuff to the asset repo just because no one has the time/motivation to convert the mesh files. 60MB of useless data is really significant, I never knew we have that much dead ballast in our installer packages.
Maybe those are only geometric primitives of no artistic value, placeholders for some planned real models. In this case there is no need to archive/store them.
AFAIK these are full blown, real models pd already created for the 3D combat tech demo (which has been ripped out when we switched to SDL). So worth keeping.

Re: Trying out new 3D features?

Posted: Fri May 22, 2015 2:30 pm
by adrian_broher
Vezzra wrote:Sounds like a tedious task though.
It's not that tedious. The problem is that the various import scripts are outdated/incomplete/do not work properly. The best bet so far is the torchlight-to-blender project. I'm currently working on the importer to read the complete file.

Re: Trying out new 3D features?

Posted: Sun May 24, 2015 11:29 am
by Vezzra
adrian_broher wrote:The problem is that the various import scripts are outdated/incomplete/do not work properly. The best bet so far is the torchlight-to-blender project. I'm currently working on the importer to read the complete file.
Hm... AFAIK pd did those models, maybe it's worth a shot asking him if he still has the original model source files (of whichever application he used to make them). I'm not at all sure that converting those .mesh files will produce 100% accurate blend files. Converting stuff rarely works 100%...

I guess I'll try to pm pd.

Re: Trying out new 3D features?

Posted: Mon Jun 22, 2015 3:28 pm
by Geoff the Medio
Vezzra wrote:So, I'm all for moving that stuff into the assets repo.
I note that the default/data/art/combat directory still exists in the repository. Any reason not to delete it?

Re: Trying out new 3D features?

Posted: Mon Jun 22, 2015 3:52 pm
by adrian_broher
Geoff the Medio wrote:I note that the default/data/art/combat directory still exists in the repository. Any reason not to delete it?
I'm not done moving stuff.

Re: Trying out new 3D features?

Posted: Mon Jun 22, 2015 5:09 pm
by Geoff the Medio
adrian_broher wrote:I'm not done moving stuff.
Just removing it from the latest reversion wouldn't remove the history, though... so you could continue moving stuff.