Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: Sofox on November 17, 2014, 05:32:49 pm

Title: Collada textures with flipped normals/one sided textures
Post by: Sofox on November 17, 2014, 05:32:49 pm
Hey, I'm getting Collada models from a 3rd party source, and importing them into the engine. It turns out that some of the texture faces are "Flipped", as in, you can see them from the inside, but not the outside, or in other words, only see them if you're looking at them from the wrong side.

Is there a fast way to fix this?
Title: Re: Collada textures with flipped normals/one sided textures
Post by: angrypig on November 17, 2014, 05:34:32 pm
The only way to fix that is manually in 3D modeling tool...
Title: Re: Collada textures with flipped normals/one sided textures
Post by: necro on November 18, 2014, 01:38:06 am
Yes, you have to flip the normals for the affected faces.
Title: Re: Collada textures with flipped normals/one sided textures
Post by: M7 on November 18, 2014, 10:07:18 am
If its sketchup models you can always export with both fronside and backside normals but as a result, the engine will have  twice as many faces to render.
Title: Re: Collada textures with flipped normals/one sided textures
Post by: PytonPago on November 18, 2014, 12:14:14 pm
If its sketchup models you can always export with both fronside and backside normals but as a result, the engine will have  twice as many faces to render.



 ... but should be used just on faces, witch are paper-thin and both-sidely visible. In Blender, you have an option to show faces single and both-sided (or normals). I think, sketchup should have such option too hidden somewhere. Try finding it and leave it on single (OT doesnt support both-sided rendering (thats why the vert count doubles if you do it M7s way - it simply copies the whole mesh and flips the normals for the whole second one)). ... so as i said, when you find that option and apply it, check the whole model, select the bad faces anf flip them ower (in blender its "W" -- "flipp normals").
Title: Re: Collada textures with flipped normals/one sided textures
Post by: Sofox on November 19, 2014, 07:08:03 pm
Thank you all for your responses. I had been using Collada files generated by other people in Sketchup (exported as KMZ files) which were intended for use in Google Earth. Since both Sketchup and Google Earth supported double sided polygons, the artist did not care about which direction the polygons faced, so when they were put into the Outerra engine, which clearly doesn't support double sided polygons, some faced the right direction, others didn't.

I was hoping for a command line tool to fix the models, but it seems clear I'll have to use a 3d Modelling program. Thank you for your help and suggestions.
Title: Re: Collada textures with flipped normals/one sided textures
Post by: PRiME on February 15, 2015, 05:04:43 am
In Blender there is a function called recalculate normals, you can select the entire model or just some sections in edit mode and it appears to correct these inverse normals.
Title: Re: Collada textures with flipped normals/one sided textures
Post by: PytonPago on February 15, 2015, 02:45:51 pm
In Blender there is a function called recalculate normals, you can select the entire model or just some sections in edit mode and it appears to correct these inverse normals.

 ... depends on the complexity of the model doe. Had some argues whyte it myself. Better to check manually at the end anyway.
Title: Re: Collada textures with flipped normals/one sided textures
Post by: PRiME on February 15, 2015, 08:19:29 pm
Yes some of those functions are finicky, sometimes they work fine, other times they just don't.
Title: Re: Collada textures with flipped normals/one sided textures
Post by: josem75 on February 16, 2015, 04:31:42 am
In Max, flip normals is a hell..  You can unify but always some faces will have normals opposite, then u need to select manually and flip, but not always work. Sometimes youflip and just nothing happend..  Then my trick is create a sphere and attack to my object with inverse normals. Then i select sphere faces and the bad faces in my objects, and flip normals, or unify normals. Normally one or another will make the job for fix my bad normals..

In 1% of the cases, even that will not work.. So i need to remake the faces..
Title: Re: Collada textures with flipped normals/one sided textures
Post by: PytonPago on February 16, 2015, 06:22:01 am
You can unify but always some faces will have normals opposite, then u need to select manually and flip, but not always work. Sometimes youflip and just nothing happend..

Thats quite odd ... is that some bug ?
Title: Re: Collada textures with flipped normals/one sided textures
Post by: josem75 on February 16, 2015, 07:51:14 am
You can unify but always some faces will have normals opposite, then u need to select manually and flip, but not always work. Sometimes youflip and just nothing happend..

Thats quite odd ... is that some bug ?
I think must be a bug. I dont find a reason why you flip and nothing happend.  A 3d piece can be good, bad optimize or bad draw, but in anycase flip normals should do the job.
I will try a Script i found on internet and lets see the results
Title: Re: Collada textures with flipped normals/one sided textures
Post by: josem75 on February 16, 2015, 08:37:42 am
You can unify but always some faces will have normals opposite, then u need to select manually and flip, but not always work. Sometimes youflip and just nothing happend..

Thats quite odd ... is that some bug ?

Ok. I was testing a script and i recomend it so far.  http://www.scriptspot.com/3ds-max/scripts/unify-flip-normal-polygons

I downloaded the rar. Copy the bg script folder to script directory of 3dsmax.  And also i copied the .mse file into macroscript directoyy (dont know if this was necesary). Then go to customize- customize user interface. Then in Category, is all choosed, change and look for BG tools and choose it.. Then pick down in make unify or flip normal and select a hotkey, for example alt+M.
Improved dramatically my normals problems. I choose the object and faces, and pick unify, if not all are unified, pick again, and again, at some point, almost all are unified. And manually u can flip the rest with flip option with the script. And always do his job flipping even in the scenes some faces was unable to flip using the normal max tool.
Title: Re: Collada textures with flipped normals/one sided textures
Post by: PRiME on February 16, 2015, 09:18:42 pm
You must have quite a complexed mesh to have this many fliped normals problem. Atm my lousy M4A4VC Firefly Sherman tank is pretty low detail (Only made it for testing rigging and learning vehicle scripts).