Free asset proof of concept

Moderator: Example suite forum moderator

User avatar
psi29a
Posts: 3593
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Free asset proof of concept

Post by psi29a » 29 Jan 2015, 14:21

https://github.com/jefftrull/ColladaOgreImporter

seems to have been updated just last month.

User avatar
sjek
Posts: 407
Joined: 22 Nov 2014, 10:51

Re: Free asset proof of concept

Post by sjek » 29 Jan 2015, 20:33

at first as of showcase importer showcase ogitor could get it done before we get the code up.
http://www.ogitor.org/
If you actually get it to work, that is show up in Blender export list, you get to choose what nif version you are exporting to, so you can choose Morrowind, but they have not written the animation export yet so you just get a static model and material.
?

http://www.ogre3d.org/tikiwiki/tiki-ind ... lConverter
https://bitbucket.org/MindCalamity/blender2ogre for 2.6 version

http://www.blender.org/api/blender_pyth ... ctice.html
http://www.blender.org/api/blender_pyth ... y.ops.html -- operators
http://www.blender.org/api/blender_pyth ... scene.html

getting the morrowind nif specific exporter for blender seems like getting the knots from different libraries to meet as blender's api is kinda clean from first look.
bpy.ops.export_scene.autodesk_3ds(filepath="", check_existing=True, filter_glob="*.3ds", use_selection=False, axis_forward='Y', axis_up='Z')

Export to 3DS file format (.3ds)
Out of curiosity, if we were to go the route of making a custom exporter for the sake of Openmw, how possible would it be to store animations as an external xml file or the likes, and load it together with ogre models?
as of that cris gave some groundwork viewtopic.php?f=2&t=1989&start=70#p30071
Animation data, mostly. With NIF files, animations are one long animation track (per node), and they have accompanying timestamped textkeys that specify where a given animation starts, stops, and loops. There's also engine-specific keys, which can be used to play a sound (e.g. a footstep on the frame the foot touches the ground) or specify when an attack triggers, and so on.

Non-animated static meshes could be handled simply enough, they just need to be wrapped into a NifOgre::ObjectScene object and loaded into a MWRender::Animation object (both "NifOgre" and "Animation" in these cases are kind of a misnomer, since an ObjectScene does not have to come from a NIF, and an Animation is any basic visual object regardless if it's actually animated). Once you add a loader to load the model type into an ObjectScene, it should just need minor changes to MWRender::Animation::setObjectRoot to call the correct loader.
https://wiki.openmw.org/index.php?title ... t#Textures
new slots for animations
sit down
sit a horse (or guar)
emotes or something approximating them (wave, bow, smile, etc.)
lie down
wobble bone(s) as used in Oblivion for the jiggle effect in the female's chest, etc...
Ability to play Animation on the PC
Smoothed animation transitions
Alternative melle/ranged attack animations, ex: X swing.
i think those might be possible with only xml support added. it spoils down how openmw is reading the nif files basically.
https://github.com/OpenMW/openmw/tree/m ... onents/nif
reading stuff.

found this handy tutorial a while back for ogre
http://paginas.fe.up.pt/~ruirodrig/wiki ... 4animation
writen to older version but seem to give good mainframe.

http://www.ogre3d.org/tikiwiki/tiki-ind ... Tutorial+1 thinking to go trought with this one first thought.

the way that ogre itself handless animation the textkeys might be possible to convert to ogre and take those engine specific keys. it depends does binary conversion support custom lists as then it would be rather easy to change the reference guess.

http://www.ogre3d.org/docs/api/1.9/grou ... 987e9d158e vertexanimationtype. don't know how directly the vertex reading goes to openmw
So, by partitioning the vertex animation approaches into 2, we keep the simple morph technique easy to use, whilst still allowing all the powerful techniques to be used. Note that morph animation cannot be blended with other types of vertex animation (pose animation or other morph animation); pose animation can be blended with other pose animation though, and both types can be combined with skeletal animation. Also note that all morph animation can be expressed as pose animation, but not vice versa.
http://www.ogre3d.org/docs/api/1.9/_ogr ... ource.html
Spoiler: Show
the textkeys data could be easy to add to keyframe data. the problem seem to be how to make them text based and read them without the specific keyframedata at engine level.
http://www.ogre3d.org/docs/api/1.9/clas ... track.html

for main nif support supporting custom textkeys would be kinda easy as they are a list. question is can the animationtracks of kf to nifs be customised to allow different vertex manipulations.

https://bugs.openmw.org/issues/2149 i think will bump in that said undocumentation problem. dunno how niftest could be expanded to reverse engineer. in ess case we have vanilla morrowind to modify them.

i'm gonna read first that openmw/components/nif and posting here as figuring that out. otherwise head gonna fill rather quickly. needs some kind of book or is there any architecture api other than that 0.28 reference in wiki althought what remember the documentation program broke?
new topic for code solving ?

there's dotscene loader and tinyxml loader for ogre but idk how to use those althought i think as openmw has been written for nifs the mechanics need that custom loader anyway.
http://www.ogre3d.org/tikiwiki/tiki-ind ... page=-mesh

on the topic more would the opengex be also modfriendly.... ? their share-a-like licence looks kinda creepy.
http://creativecommons.org/licenses/by- ... deed.en_US
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
as is the licence modification in what extend permitted.

http://opengex.org/ otherwise they got those importers althought in development stage. their template could be usable ogre as i think the ogre devs are waiting for 2.0 to be published for that official plugin.

assimp would also need it's developing so the collada is the best bet right now would say. anything what can be translated to ogre or/and nif assets will go as the openmw engine needs some specific for optimisation reasons. long text.....
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

User avatar
psi29a
Posts: 3593
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Free asset proof of concept

Post by psi29a » 29 Jan 2015, 23:34

sjek wrote:on the topic more would the opengex be also modfriendly.... ? their share-a-like licence looks kinda creepy.
http://creativecommons.org/licenses/by- ... deed.en_US
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
as is the licence modification in what extend permitted.
Not creepy, it is good. It ensures that anything derived from the work also has the same license. Same as by 0AD.

SquireNed
Posts: 397
Joined: 21 Dec 2013, 22:18

Re: Free asset proof of concept

Post by SquireNed » 30 Jan 2015, 03:20

psi29a wrote:
sjek wrote:on the topic more would the opengex be also modfriendly.... ? their share-a-like licence looks kinda creepy.
http://creativecommons.org/licenses/by- ... deed.en_US
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
as is the licence modification in what extend permitted.
Not creepy, it is good. It ensures that anything derived from the work also has the same license. Same as by 0AD.
Though copyleft has its own issues. It's no worse than the GPL.

Tinker
Posts: 229
Joined: 06 Mar 2013, 17:35

Re: Free asset proof of concept

Post by Tinker » 31 Jan 2015, 10:10

I have been looking further into this problem of getting assets into OpenMW.

Given that Ogre only deals with it's own format of model, material and animation then any format, including nif, needs to be converted to Ogre format so, at least in theory, adding assets as Ogre formats should be preferred. I had concluded, incorrectly, that the Blender to Ogre export tool did not export animations, rereading the help file shows that it can export animations.

The exporter creates NLA strips which become Ogre tracks and you can create with constraints, baked animation or motion capture. It also allows segmenting and animation blending, it seems ideal but I have not had time to check the process or results. OpenMW would also need to support the use of Ogre assets direct as well as nif format.
Arch Linux - rolling release, always up to date, often partly broken.

User avatar
sjek
Posts: 407
Joined: 22 Nov 2014, 10:51

Re: Free asset proof of concept

Post by sjek » 31 Jan 2015, 16:18

So if opengex is used in the pipeline the models itdelf aren't under same terms automatically .?

The nif export is looking in good state depending how much have been converted tp 2.7 api
http://niftools.sourceforge.net/forum/v ... =13&t=3568 roadmap
https://github.com/niftools/blender_nif ... _export.py

Taken by exporting ipo curves and binding alpha properties?, bones and others with them.
The ipo curves has to be all set that it goes without error messages.
If that works then its converting to morrowind animation form what's left. He's aiming currently for oblivion thought.

For ogre frames this is a good start. Framelisteners are reading the frames.
Void for those in the code with frame---- depending does it render before, in queu or after.
https://jira.ai2.upv.es/confluence/down ... Ogre3D.pdf

The nifs seem to be in animation converted to ogre bones with createbones and matching the handles to nodes got from nif files. The placement is somewhere.
http://www.ogre3d.org/docs/api/1.9/clas ... 873fbf5650
https://github.com/OpenMW/openmw/blob/m ... f/node.hpp
https://github.com/OpenMW/openmw/blob/m ... eleton.cpp

It could be possible to use ogre native loaders little bit modified to add that frame:animation:action data. Otherway would be to use collisiondetection but can be kinda harder and fps. Custom physics class is done.

For mesh values somehow that vector3 (x, y, z) and quarternions (rotation) are used
http://www.ogre3d.org/docs/api/1.9/clas ... ctor3.html
http://www.ogre3d.org/docs/api/1.9/clas ... rnion.html

https://github.com/OpenMW/openmw/blob/m ... loader.cpp

Code: Select all

static void setVisible(Ogre::Node *node, int vis)
{
// Skinned meshes are attached to the scene node, not the bone.
// We use the Node's user data to connect it with the mesh.
Ogre::Any customData = node->getUserObjectBindings().getUserAny();
Nif folder is used to read and define and nifogre containts loading kinda way.
https://github.com/OpenMW/openmw/blob/m ... e/mesh.cpp

345 morphing is enabled to all if ninode_controllerflag doesn't deny it.
vector4 (x, y, z, w) is used for vertix data partly...... something about submesh and maketransform +somewhere getworldtransform .....

Nifs are separated and buffered to ogre .?
For every property there is its own converter to get the right data out. Having it uploaded from nifs as hex flag key. If ogre format would be right loaded to buffer could it be called directly with ogre functions?

Then it would be with blender to find the right settings to write and rest would be engine side to read.
Some kind of ogre example built could be good for this

Wonder where's the reading happens.
Edit:... homeworks to do
viewtopic.php?f=6&t=655
Animationtrack is in some way in physics section. Also convex (vertex) hull colliding but don't remember if that was implemented to game any way.. was tried and massive fps hit.

What can think the biggest benefit of nif format besides buggy and flunky animation data is droad moddability and having nifskope as a frontend for editing. Downside is that format itself is hard to calibrate so import / export with different programs can take a major hit over time and nifskope record editing interface isn't the most user friendly althought comprehensive.

Battery died... if animation data would be baked out of nifs to skeleton and used such then there would be not so much gueswork in data and raw mesh data could be used from nifs or mesh with fewer engine conflicts. Both to animationtrack or separately and pose + morph benefits from ogre. Bone id surviving would be one biggie. In current way modifying the vertex data ingame kinda fps hit as it is better to have pure data rather than to conveet it via math to good form althought those can be same thing losely. Then its go to texturing data which goes to same point when need to calculate lighning and such althought lne way could be to paint the textures in the engine what still would anyway leave placement problem... mesh and skeleton are standardised so need to look for differences... keeping nifs with no full documentation would lwave 4 lines kinda.
Animation ( move data with bones as ogre tells, possibly just data with extra gimmicks)
Mesh vertixes taken to more usable form
Texture data (would this be really needed or it is alongside point 2)
Nif files itself......

Same conversion process might go to natives with less quesswork. Yeah.... only thing which one works better and vanilla nif support isn't so droad that it would be harder to keep thinking. And how much ogre's has that outside moddability or would this go with material scripting ingame as combaraple?
All from the non programers head....... , p
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

User avatar
sjek
Posts: 407
Joined: 22 Nov 2014, 10:51

Re: Free asset proof of concept

Post by sjek » 01 Feb 2015, 13:16

http://www.moddb.com/games/torchlight-i ... esh-viewer this looks good. Exe for windows thought.

For implementing same kind of flexebility it would have to be continued from nif reading. As ogre takes the data and modifies it so some kind of callers and possibly ingame modeling.
http://www.ogre3d.org/tikiwiki/tiki-ind ... e=Cookbook code mods
http://www.ogre3d.org/tikiwiki/tiki-ind ... ry+Library procedural geometry
http://www.ogre3d.org/tikiwiki/tiki-ind ... eshxml+DTD mesh xml format

One in the bitbucket is bit more extensive but if extra handless for shadow casting, particles, explosions, growing and such we would need write more to that xml converter. Other way would be to allow for models to ship their own code with security effect..... editing could be done in cs, ingame or in external like that for torchlight....... parametrisation in the fileformat would be savest as it would be numbers with handle and then changing those with ingame code compiler..

As of now nifs are as bugfixed kinda good but full of bugs themselves......

Anyway the loading seems to happen in mesh part by creating dehfinition for it in mesh.cpp separating skeleton and mesh parts
https://github.com/OpenMW/openmw/blob/m ... h.cpp#L113

And then creatin an entity to scenemanager in ogrenifloader as fullname what looks like the mesh data and skeleton being in name data.
https://github.com/OpenMW/openmw/blob/m ... r.cpp#L686

As of http://www.ogre3d.org/tikiwiki/Basic+Tu ... ng_Started .
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

User avatar
johndh
Posts: 124
Joined: 25 Jan 2015, 18:20

Re: Free asset proof of concept

Post by johndh » 16 Feb 2015, 02:33

All of this technical discussion has made my head spin, but that's okay! I've been messing around a little bit with making different races in MakeHuman, and I also started an art collection on OGA for various assets that might be useful:
http://opengameart.org/content/openmw-s ... sibilities

Here are some others:
http://opengameart.org/content/3d-animals
http://opengameart.org/content/3d-sword-sorcery
http://opengameart.org/users/pantherone
http://opengameart.org/content/daniel-a ... med-models
http://opengameart.org/content/chant-of ... atic-props
http://opengameart.org/content/legend-of-rathnor-parts
http://opengameart.org/content/environmental-and-props
http://opengameart.org/users/alexandr-zhelanov

Is there a list somewhere of all of the assets that need to be found/made for the Example Suite? I know there's a general idea of a few islands with different biomes, etc., but what about an artist friendly list of individual assets or types of assets? What models, textures, animations, are needed at a minimum? I know that we can't start putting the environment cells together until OpenCS gets into a more finished state, but I can certainly prepare some resources if I know what to look for.

I have a long weekend for the first time in a long time, so I'll try to get something done. :)
Free/libre assets for OpenMW, updated frequently: http://opengameart.org/content/openmw-s ... sibilities

Tinker
Posts: 229
Joined: 06 Mar 2013, 17:35

Re: Free asset proof of concept

Post by Tinker » 16 Feb 2015, 10:01

There is, as far as I am aware, no list of anything for the example suite, most of the ideas discussed have been dropped and no planning has been done for replacement ideas.

I think it is fairly safe to assume that a whole lot of basic static stuff, containers, furniture etc. will be needed. PC's, NPC's and animals will be needed but exactly what needs some decision to be made about the setting and time period..

The biggest problem is getting the models into .nif format, static objects may not be to much of a problem but it looks like animation exporting from blender will not be possible until after 2016 {basic armatures are this years project and animation needs that to be completed first) and direct use of the working blender to ogre format will be of no use if OpenMW switches away from ogre.
Arch Linux - rolling release, always up to date, often partly broken.

User avatar
sjek
Posts: 407
Joined: 22 Nov 2014, 10:51

Re: Free asset proof of concept

Post by sjek » 16 Feb 2015, 21:49

Stonehenge, meteorite city, men in black, blade runner, fairyland, warband, monty python inspired scenes. You name it x)

static meshes will be easiest to import and if the animation will take to 2016 then we will probaply have our own animation system and fileformat in good go before that and backward for needed nif support.

Moving to osg need more or less animation rewrite in omwrender. Osg has it's own animation classes (library) in place what can be used at least for moving things around. Skinning with bones and skeleton might need cal3d (if not integrated) which have kinda fitting system with weigthed blending of different animations together, morphing, cycle and action (one time) commands for them and such.

This could lead to writing animation system on top of cal3d or other library. Smartbody has automatized steering and movenent in it and ogre has vertex and procedural animation support.

What have understood osg is vast barebone customisable as ogre taking the way of more ready package but lacking as such the modificability with outside files more as game market partly dictates.

Basically it's kinda how the osg and ogre handles vectors and quarternions (rotations) ....
But just started to learning c++ as first language so i'm kinda fly in the roof.

If needed i can make some machinery and maybe even animate them .p
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest