Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: Collada textures with flipped normals/one sided textures  (Read 6084 times)

Sofox

  • Newbie
  • Posts: 8
  • newbie
Collada textures with flipped normals/one sided textures
« 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?
Logged

angrypig

  • Outerra Developer
  • Sr. Member
  • *****
  • Posts: 454
    • http://outerra.com
Re: Collada textures with flipped normals/one sided textures
« Reply #1 on: November 17, 2014, 05:34:32 pm »

The only way to fix that is manually in 3D modeling tool...
Logged

necro

  • Sr. Member
  • ****
  • Posts: 451
    • google+ Blog
Re: Collada textures with flipped normals/one sided textures
« Reply #2 on: November 18, 2014, 01:38:06 am »

Yes, you have to flip the normals for the affected faces.
Logged

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Collada textures with flipped normals/one sided textures
« Reply #3 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.
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: Collada textures with flipped normals/one sided textures
« Reply #4 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").
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

Sofox

  • Newbie
  • Posts: 8
  • newbie
Re: Collada textures with flipped normals/one sided textures
« Reply #5 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.
Logged

PRiME

  • Full Member
  • ***
  • Posts: 169
  • newbie
Re: Collada textures with flipped normals/one sided textures
« Reply #6 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.
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: Collada textures with flipped normals/one sided textures
« Reply #7 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 with it myself. Better to check manually at the end anyway.
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

PRiME

  • Full Member
  • ***
  • Posts: 169
  • newbie
Re: Collada textures with flipped normals/one sided textures
« Reply #8 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.
Logged

josem75

  • Sr. Member
  • ****
  • Posts: 262
  • newbie
Re: Collada textures with flipped normals/one sided textures
« Reply #9 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..
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: Collada textures with flipped normals/one sided textures
« Reply #10 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 ?
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

josem75

  • Sr. Member
  • ****
  • Posts: 262
  • newbie
Re: Collada textures with flipped normals/one sided textures
« Reply #11 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
Logged

josem75

  • Sr. Member
  • ****
  • Posts: 262
  • newbie
Re: Collada textures with flipped normals/one sided textures
« Reply #12 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.
« Last Edit: February 16, 2015, 08:40:21 am by josem75 »
Logged

PRiME

  • Full Member
  • ***
  • Posts: 169
  • newbie
Re: Collada textures with flipped normals/one sided textures
« Reply #13 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).
Logged