Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4]   Go Down

Author Topic: Importing 3d models into IL2  (Read 27327 times)

0 Members and 2 Guests are viewing this topic.

just champi

  • Modder
  • member
  • Offline Offline
  • Posts: 608
Re: Importing 3d models into IL2
« Reply #36 on: December 14, 2015, 04:04:52 PM »

Well, I'm not familiar with MIG 21 model, and really I can't tell what should I be seeing at the wingtips...
Just guessing, Western may be right and is an "only one side poly" issue.

Settings in 3dsMax Material editor apply inside max viewports, but don't have any effect in IL-2, so if you select doubleside material property it won't change anything... you need to actually build the two sides with polys.
Like in most 3d engine in Il-2 there is backface culling so you only see one side, the one facing the camera, to be able to see the other you need to put some triangles facing the other side..

But I bet it also has to do with the Symmetry modifier you applied.
Everytime you use Mirror to make symmetric parts, one half gets their axes inverted, and shows with normal faces inside out (the other one, with correct axes orientation shows right) .
To fix this you can apply a ResetXform modifier to the wrong half.
This will fix the inverted axes orientation ...but as a side effect, will make the faces or your mesh get inverted.
Then, to fix them, just select the offending ones and use Flip (inside EditMesh or EditPoly modifier) to restore back their normals.
 Be aware that ResetXForm, it also aligns the Local axes with World coordinates so if you have a part with their Local axes rotated (like with moving parts) you will need to rotate them back again...
Is always good idea to apply ResetXform before exporting, but be very careful, especially with animated parts, as after applying ResetXForm changes can't be undone!
Logged

Koty

  • Mr. MiG
  • Modder
  • member
  • Offline Offline
  • Posts: 2274
  • It's a MiG!
Re: Importing 3d models into IL2
« Reply #37 on: December 14, 2015, 04:17:35 PM »

Well, I'm not familiar with MIG 21 model, and really I can't tell what should I be seeing at the wingtips...
Quote
It should be small object, shaped a bit like those droptanks.
But I bet it also has to do with the Symmetry modifier you applied.
Everytime you use Mirror to make symmetric parts, one half gets their axes inverted, and shows with normal faces inside out (the other one, with correct axes orientation shows right) .
Quote
THIS! Yes that explains it.


To fix this you can apply a ResetXform modifier to the wrong half.

Okay, will try.
Logged
If I don't have to do it, I won't. If I have to do it, I'll make it quick.

Koty

  • Mr. MiG
  • Modder
  • member
  • Offline Offline
  • Posts: 2274
  • It's a MiG!
Re: Importing 3d models into IL2
« Reply #38 on: December 15, 2015, 01:15:26 PM »

Okay, solved. The problem was in scaling. I had to scale the object using Heir by 0.0254 - so I scaled the mesh itself and now I have 2.54 - all faces show, but they are too shiny (but at least the correct side is shiny). So I guess best is to keep it at 1. I'll have to figure how to scale properly in Max, but so far, solved.

EDIT: So, scaling wasn't that hard to do o.O
So, conclusion - if the scaling is 1>X>0, it gets lighting inverted. The more it is different from 1, the more intense the lighting is. If you get your cam too close - relative to original model, not the one scaled down by Hier - some faces are invisible.

I wish you a nice day.

Btw, if I figure how to correctly export from IL with keeping the mapping and if I manage to export it back... I might delete the stuff that has to be deleted and release it. Yeah, these things are just too complicated to me.

Logged
If I don't have to do it, I won't. If I have to do it, I'll make it quick.

western0221

  • Modder
  • member
  • Offline Offline
  • Posts: 6790
  • Live in Japan
    • IL-2 itaki blog
Re: Importing 3d models into IL2
« Reply #39 on: December 15, 2015, 01:28:36 PM »

I'll have to figure how to scale properly in Max, but so far, solved.

I'm not sure your Max version's User Interface is as same as mine but....
 1. - In highlighting the object, mouse right click then menu tip is opened, and left click the box icon on the right of "Scale" menu. There is number input dialog. You can input "2.54%" and Enter, the object bacome smalled-down into 2.54%.
 2. - In highlighting the object, Push "R" short-cut-key or from menu-bar going Edit - Scale , then you can scaling by mouse left dragging up or down on the triangle highlight area.

After all, you have to use "XForm Reset" modifier and after it, "Collapse All" process.
Logged

Koty

  • Mr. MiG
  • Modder
  • member
  • Offline Offline
  • Posts: 2274
  • It's a MiG!
Re: Importing 3d models into IL2
« Reply #40 on: December 15, 2015, 01:47:29 PM »

Well, I just highlighted the object and typed directly into the number boxes down there. Worked. :)) I could not do that by dragging - I needed to input an exact number - can't do that by mouse... :)

But thanks anyway.
Logged
If I don't have to do it, I won't. If I have to do it, I'll make it quick.

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23882
  • Taking a timeout
    • STFU
Re: Importing 3d models into IL2
« Reply #41 on: December 16, 2015, 12:58:00 AM »

Just want to add my $0.02 concerning hier.him scaling:
Don't do it.
By all means, don't.
Hier.him scaling causes all kinds of issues, from lighting issues over shadowing issues to inverted face issues.
Just don't do it, always use "1.0" scaling factor in hier him and instead resize your mesh if needed.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

Koty

  • Mr. MiG
  • Modder
  • member
  • Offline Offline
  • Posts: 2274
  • It's a MiG!
Re: Importing 3d models into IL2
« Reply #42 on: December 16, 2015, 06:05:56 AM »

Yeah, figured... what works however is the translation (last three numbers) - they do not cause any problems. Also from what I have seen rotation does not cause problems as well.
Logged
If I don't have to do it, I won't. If I have to do it, I'll make it quick.

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23882
  • Taking a timeout
    • STFU
Re: Importing 3d models into IL2
« Reply #43 on: December 16, 2015, 11:46:41 AM »

That's correct.
The first 9 numbers span the coordinate system.
It can have any rotation of your choice, but each single vector (triple of numbers) has to have a length of 1.0, no matter which direction it points to.
The last triple is the position inside the coordinate system and that can take any numbers without issues.
You can move around meshes, hooks etc. as much as you like, just make sure the coordinate system vector lengths are 1.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

just champi

  • Modder
  • member
  • Offline Offline
  • Posts: 608
Re: Importing 3d models into IL2
« Reply #44 on: December 16, 2015, 01:21:55 PM »

I'm with Storebror regarding hier.him scaling

Do you want to take a look at the matrix in Max? try this:

-create a box of any dimensions and make it Edit Poly
-check the box matrix:
-hit F11 to open MaxScriptEditor and write:
 
 $nameofyourbox.transform

Code: [Select]
$Box001.transform
(matrix3 [1,0,0] [0,1,0] [0,0,1] [5.85897,3.1619,0])

-now scale your box and check again

  $nameofyourbox.transform

Code: [Select]
$Box001.transform
(matrix3 [2,0,0] [0,2,0] [0,0,2] [5.85897,3.1619,0])

Now find in the right command panel the hierarchy tab, and inside it the Pivot button.
There is a rollout in there called "Adjust transform"
and inside of it, at the bottom, the "Reset scale" button.
press that button and check again your matrix

$nameofyourbox.transform

Code: [Select]
$Box001.transform
(matrix3 [1,0,0] [0,1,0] [0,0,1] [5.85897,3.1619,0])

So its very easy to use Reset scale and don't have hier.him scaling

Also if you need to scale some whole object sometimes, try XForm modifier:

-add XForm modifier to your EditPoly box
-select gizmo sublevel
-scale the box
-check the matrix...

Code: [Select]
$Box001.transform
(matrix3 [1,0,0] [0,1,0] [0,0,1] [5.85897,3.1619,0])

no scaling!  8) it's like magic! :P
Logged
Pages: 1 2 3 [4]   Go Up
 

Page created in 0.04 seconds with 27 queries.