Page 1 of 1

Problem with some models imported from Wings 3D in to Oolite

Posted: Thu May 31, 2012 5:21 pm
by Shipbuilder
Gents - I have been testing an early pre-release version of the Mantis Scout Ship and have discovered that there are some non-transparent areas around the ship visible on the below screenshot (Black triangles).

I have changed the background colour on the texture file which changes this black to whatever colour I specify for the background.

I have also looked at the 3D Wings model but can't see any issues with the 3D model.

Has anyone else come across this and if so what is the problem and how is it resolved ?


Image

Re: Problem with some models imported from 3D Wings in to Oo

Posted: Thu May 31, 2012 7:07 pm
by Amaranth
Nice looking ship. If it's not solvable, how about incorporating the black into the paintjob?

Re: Problem with some models imported from 3D Wings in to Oo

Posted: Thu May 31, 2012 7:14 pm
by Staer9
Oolite doesn't support transparency and will therefore use full-opacity of whatever colour you have on the texture, if this is black then it will use black.

This is often used to advantage by baking maps (specular or illumination normally) onto the alpha channel.

if you don't want it to be transparent then I can only assume it is a quads-tris error on export that has messed up your UV map and is referencing the wrong parts of your texture.

:edit: apon closer examination it is indeed a triangulation error, use wings to triangulate before exporting

Re: Problem with some models imported from 3D Wings in to Oo

Posted: Thu May 31, 2012 7:20 pm
by Eric Walch
Which converter are you using. The Obj2DatTex or Obj2DatTexNorm. The later should be better, but can have issues. You can set a winding parameter inside the script. It is commented in the script itself. 2 is default, but I see I set it to 0 (=keep original winding) in my script. That was also to get rid of some black triangles.

Re: Problem with some models imported from 3D Wings in to Oo

Posted: Thu May 31, 2012 11:29 pm
by Shipbuilder
Thanks for the suggestions and advice gents. Once I've got my next oxp issued I'll play about with your suggestions and hopefully get rid of the triangles. If all else fails I guess I could incorporate into the ship texture but I will look to sort the problem out first if possible.

Staer9 I assume it is a good idea to always triangulate your model in Wings 3D before exporting.

I have been using Obj2DatTex script.

Amaranth - I'm glad you like the look of the ship. :D

Re: Problem with some models imported from 3D Wings in to Oo

Posted: Fri Jun 01, 2012 7:50 am
by Griff
Eric Walch wrote:
Which converter are you using. The Obj2DatTex or Obj2DatTexNorm. The later should be better, but can have issues. You can set a winding parameter inside the script. It is commented in the script itself. 2 is default, but I see I set it to 0 (=keep original winding) in my script. That was also to get rid of some black triangles.
Wow, thanks for the info eric - i've have a few models become exported with the odd polygon hole in them when using the Obj2DatTexNorm script, i assume it's because of my messy style of working without keeping nice edgeloops in the model, usually i've been able to fix problems by spinning the relevant polygon edges in wings or by defining some hard edges around the problem area, will definately look into messing about with this parameter in the script

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Thu Aug 30, 2012 10:23 pm
by Shipbuilder
I have created a ship model in Wings 3D which looks fine. I have then exported it and created the .obj and .mat files, then created the .dat file.

Once I incorporate the model in to Oolite however their is a section of the ship which is different to the wings model I.e. a sloped section of hull at one side of the ship is vertical in Oolite whereas in wings it is sloping.

Has anyone had this problem and if so haver you been able to solve it ?

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Thu Aug 30, 2012 10:50 pm
by commanderxairon
Shipbuilder wrote:
I have created a ship model in Wings 3D which looks fine. I have then exported it and created the .obj and .mat files, then created the .dat file.

Once I incorporate the model in to Oolite however their is a section of the ship which is different to the wings model I.e. a sloped section of hull at one side of the ship is vertical in Oolite whereas in wings it is sloping.

Has anyone had this problem and if so haver you been able to solve it ?

it happens beause of the exporter's need to triangulate shit before exporting it it just doesnt accept some types of surfaces, smoothing normaly solves it but if you want to low poly everything you should design everything with that in mind

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Thu Aug 30, 2012 11:05 pm
by Shipbuilder
I may try to triangulate the individual panels in question in Wings 3D and recreate the .dat file. I'll post a update to advise whether or not this solves the problem once I get the chance to try it out.

This is annoying as I have completed most of the texturing (hopefully if this fixes the model the texture map won't be effected)

The other side of the ship, which is symmetrical formed fine.

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Thu Aug 30, 2012 11:12 pm
by Tricky
commanderxairon wrote:
Shipbuilder wrote:
I have created a ship model in Wings 3D which looks fine. I have then exported it and created the .obj and .mat files, then created the .dat file.

Once I incorporate the model in to Oolite however their is a section of the ship which is different to the wings model I.e. a sloped section of hull at one side of the ship is vertical in Oolite whereas in wings it is sloping.

Has anyone had this problem and if so haver you been able to solve it ?

it happens beause of the exporter's need to triangulate shit before exporting it it just doesnt accept some types of surfaces, smoothing normaly solves it but if you want to low poly everything you should design everything with that in mind
It would help if you dropped the kiddie arrogance and actually posted some constructive help.

When exporting OBJ files from Wings 3D you need to select the options by clicking on the highlighted section in this image...
Image

Then you need to make sure that your options match this screen...
Image

EDIT: You will need to reload (import) the object back into Wings 3D to do the UV mapping.

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Thu Aug 30, 2012 11:19 pm
by Shipbuilder
Thanks Tricky I'll double check tomorrow but I am 99% sure that I selected all the settings you have kindly posted screenshots of.

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Thu Aug 30, 2012 11:59 pm
by Tricky
Shipbuilder wrote:
Thanks Tricky I'll double check tomorrow but I am 99% sure that I selected all the settings you have kindly posted screenshots of.
kk. Wasn't a dig at you Shipbuilder.

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Sat Sep 01, 2012 12:15 am
by Shipbuilder
Tricky wrote:
Shipbuilder wrote:
Thanks Tricky I'll double check tomorrow but I am 99% sure that I selected all the settings you have kindly posted screenshots of.
kk. Wasn't a dig at you Shipbuilder.
No problems Tricky.

OK I have managed to overcome this problem so will post the solution so that anyone else who experiences this issue can correct their model.

1) Make a backup copy of your Wings 3D file (Just in case you do something wrong). :?

2) Open the Wings 3D file and select the faces around the area which is not forming correctly.

3) Right click and select Tesselate then select Triangulate from the drop down menu.

4) Select file > export > wavefront (Ensure that the options in Tricky’s screenshots in the above post are selected).

5) Select save (This will produce the .obj and .mtl files which you can then use to produce the .dat file as usual.

This should correct the problem. :D

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Sat Sep 01, 2012 1:00 pm
by Zieman
I always Tesselate -> Triangulate my models in Wings3D before UV mapping. That way I can .Turn. any awry looking edges to my liking (automated triangulation sometimes makes dents where there should be none or breaks surface curvature - no matter if it is done while modelling or when exporting to .obj) and check easily how the texture I'm making will look like. Sure, it might mean more work with getting UV mapping done right, but defining some temporary hard edges help tremendously there.

Re: Problem with some models imported from Wings 3D in to Oo

Posted: Sat Sep 01, 2012 10:05 pm
by Tricky
Shipbuilder wrote:
OK I have managed to overcome this problem so will post the solution so that anyone else who experiences this issue can correct their model.

1) Make a backup copy of your Wings 3D file (Just in case you do something wrong). :?
ALWAYS.
Shipbuilder wrote:
2) Open the Wings 3D file and select the faces around the area which is not forming correctly.

3) Right click and select Tesselate then select Triangulate from the drop down menu.

4) Select file > export > wavefront (Ensure that the options in Tricky’s screenshots in the above post are selected).

5) Select save (This will produce the .obj and .mtl files which you can then use to produce the .dat file as usual.

This should correct the problem. :D
What I do is select faces on the top, click on a face then select all (CTRL-A) and then right click and then select tessalate and triangulate.
Image