How to import .osgt file into OpenMW-CS

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
openmwfan27
Posts: 113
Joined: 23 Apr 2015, 22:11

Re: How to import .osgt file into OpenMW-CS

Post by openmwfan27 » 13 May 2016, 18:22

I heard back from K1ll too :) , the ones on ftp://redfortune.de/openmw/release/ currently have the same issue with the .osgt errors. :(

User avatar
psi29a
Posts: 4917
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: How to import .osgt file into OpenMW-CS

Post by psi29a » 13 May 2016, 19:03

Try again, new builds. :)

User avatar
openmwfan27
Posts: 113
Joined: 23 Apr 2015, 22:11

Re: How to import .osgt file into OpenMW-CS

Post by openmwfan27 » 13 May 2016, 19:23

Just tried the new build, the errors about the .osgt files have gone although it's not quite working, i can see my mesh in the 'preview' panel and i can also see the test mesh scrawl uploaded in the 'preview' as well. When i try to drop either mesh into a scene it seems to create an instance in the instances panel but the mesh is not rendered in the scene. I've tried importing a mesh from a morrowind mod in .nif format and that works ok and i can see it in the scene.

When i save my mod and run it in game, i also cannot see the .osgt meshes, the console output makes no reference to the .osgt files when running openmw, neither does openmw-cs although it does mention this:

Code: Select all

Failed to open image: Resource 'textures/buddhastatue_dif.unknown' not found
Failed to open image: Resource 'textures/buddhastatue_nor.jpg' not found
QGLContext::makeCurrent(): Failed.
QGLContext::makeCurrent(): Failed.
I'm not sure if that would prevent it rendering in openmw-cs, the mesh i made does not have a texture and there's no output related to that. My mesh is just the default cube you get when you open blender, i removed the light source and camera, selected the cube and exported it.

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: How to import .osgt file into OpenMW-CS

Post by scrawl » 13 May 2016, 19:54

Could it be that the mesh is too small to be seen? 1 unit in blender equals about 1.3 centimeters in game.

User avatar
openmwfan27
Posts: 113
Joined: 23 Apr 2015, 22:11

Re: How to import .osgt file into OpenMW-CS

Post by openmwfan27 » 13 May 2016, 20:29

Thank you Scrawl, i knew there was something i was missing.

So i've managed to get your test mesh and my mesh working in OpenMW-CS but in game your test mesh still isn't visible anywhere, and my mesh seems to be in the correct position, and is now visible due to the scale being set in OpenMW-CS but it's much smaller in-game then what OpenMW-CS shows.

Screenshots to show what i mean: https://imgur.com/a/jHYfd

Another question, how do you select and then move / rotate thing's in the scene view in OpenMW-CS? I've tried left and right clicking instances in the scene and i do not get any x,y,z arrows or anything show up, occasionally i can get it to show a tooltip of the instances name. So far i've been editing each instance via the instances -> edit instance panel.

*Edit*, In blender i've created a new mesh and set the dimensions to 1x1x1 , does this mean 1 blender unit in each dimension? After exporting the model to .osgt and importing it into OpenMW-CS the initial scale is really tiny, i have to boost it to about 450x.

I've attached the .blend, .osgt files i'm using as well as the .log file.
Attachments
testmesh.zip
(92.4 KiB) Downloaded 41 times

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: How to import .osgt file into OpenMW-CS

Post by scrawl » 13 May 2016, 21:40

So i've managed to get your test mesh and my mesh working in OpenMW-CS but in game your test mesh still isn't visible anywhere, and my mesh seems to be in the correct position, and is now visible due to the scale being set in OpenMW-CS but it's much smaller in-game then what OpenMW-CS shows.
Scaling is limited to 0.5-2.0 range ingame. We left this limitation in to preserve compatibility with the original game. I suppose the editor should also enforce this scaling, to avoid confusion.

User avatar
openmwfan27
Posts: 113
Joined: 23 Apr 2015, 22:11

Re: How to import .osgt file into OpenMW-CS

Post by openmwfan27 » 13 May 2016, 22:18

Thanks again :) , i've figured out the scaling needed in blender to make my cube mesh visible ingame with a scale of 1.0.

I've tried to assign a texture to the cube and in the .osgt file the texture is listed as 'tx_sand_01.unknown'. In game the cube is bright purple which i think means it cannot find the texture, i've tried renaming 'tx_sand_01.unknown' to 'tx_sand_01.dds' and OpenMW-CS still shows the cube as purple, when i try to view it in-game, after clicking 'new' on the main title screen i get a CTD with the console output:

Code: Select all

Segmentation fault (core dumped)

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: How to import .osgt file into OpenMW-CS

Post by scrawl » 13 May 2016, 23:00

The .unknown extension is due to a bug in the exporter. It should work when you change the ".unknown" reference to ".dds".

If I remember correctly, you need to place the texture in a subdirectory "textures" relative to the blend file so that the .osgt file references it as "textures/texture.dds". Finally, your game data folder should look like this:

Code: Select all

meshes/mesh.osgt
textures/texture.dds
The CDT is a bug, the game should not crash even on faulty meshes - can you get a backtrace?

User avatar
openmwfan27
Posts: 113
Joined: 23 Apr 2015, 22:11

Re: How to import .osgt file into OpenMW-CS

Post by openmwfan27 » 13 May 2016, 23:34

my data folder currently looks like:

Code: Select all

meshes/testmesh.osgt
textures/tx_sand_01.dds
textures/tx_sand_01_nh.dds
textures/tx_sand_01_diffusespec.dds
scrawl wrote:If I remember correctly, you need to place the texture in a subdirectory "textures" relative to the blend file so that the .osgt file references it as "textures/texture.dds".
I am saving my .blend file outside of the games data directory and exporting the .osgt to that same directory, then copy/pasting into the games data/meshes/ folder, do i also need a copy of the .dds texture in a folder called 'textures' in the same folder i'm saving the .blend file to and the initial .osgt export?
scrawl wrote:The CDT is a bug, the game should not crash even on faulty meshes - can you get a backtrace?
I have no idea how to do this :(

User avatar
openmwfan27
Posts: 113
Joined: 23 Apr 2015, 22:11

Re: How to import .osgt file into OpenMW-CS

Post by openmwfan27 » 14 May 2016, 11:45

So after playing with the texture a bit more i've managed to stop the CTD, if i use a .png as the texture rather then a .dds and place the .png texture in the game's data/texture/ folder where i placed the .dds i get no CTD when starting a new game.

The texture however does not seem to work, i've attached the png texture and screenshots here: http://imgur.com/a/2w91w

The cube shows a slight brown colour which i've not 'set' anywhere in blender, and in blender the cube is grey without the texture on so i'm wondering if that colour is being picked up from the texture and being applied in the engine somehow?

Post Reply