XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Wed Sep 19, 2018 4:39 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Messed up Normals (3DS Max)
PostPosted: Wed Jun 20, 2018 11:55 pm 
Offline
n00b

Joined: Fri Apr 29, 2016 8:20 am
Posts: 13
Has thanked: 1 time
Have thanks: 0 time

I have a large collection of very stubborn models which I've successfully extracted from a game archive, only to run into an issue with the normals.
Unfortunately, the game I intend to use these models in has single-sided faces, meaning the normals must be correct.

Here's the sample OBJ model and PNG texture:
https://pastebin.com/raw/iVaKF401
https://orig00.deviantart.net/328f/f/20 ... ceyg6b.png

Here's a list of things I've tried: (none of them worked)
-Importing normals from file and Unifying
-Using Auto-normals and Unifying
-Welding vertices first, and then Unifying
-Welding vertices, exporting, importing with auto-normals, and then unifying

Does anyone have any ideas to fix these?


Image

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: Messed up Normals (3DS Max)
PostPosted: Thu Jun 21, 2018 2:08 pm 
Offline
veteran

Joined: Mon Sep 22, 2014 1:23 am
Posts: 109
Has thanked: 47 times
Have thanks: 8 times
I had a quick look and I can say it probably isn't the normals.
If you check your geometry (move points, for example), you will see it's really bad and some vertexes do not weld together when they should, creating this awful effect. :)
You will need a lot of patience to fix this..


Top
 Profile  
 
 Post subject: Re: Messed up Normals (3DS Max)
PostPosted: Thu Jun 21, 2018 2:53 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 308
Has thanked: 16 times
Have thanks: 162 times
lolwatt wrote:
I had a quick look and I can say it probably isn't the normals.
If you check your geometry (move points, for example), you will see it's really bad and some vertexes do not weld together when they should, creating this awful effect. :)

You can't expect a 3D app to weld two vertices belonging to two triangles of opposite normal vectors.
lolwatt wrote:
You will need a lot of patience to fix this..

I wouldn't say so since it's rather simple to solve via several lines of code.

The only reason causing this issue is that the model is double sided.
A few lines of the face indices from the beginning:
Code:
# 10491 texture coordinates // line 20988

f 9/9 18/18 1/1
f 18/18 9/9 1/1

f 1/1 18/18 10/10
f 18/18 1/1 10/10

f 1/1 10/10 11/11
f 10/10 1/1 11/11

f 11/11 10/10 10/10
f 10/10 11/11 10/10

f 11/11 10/10 2/2
f 10/10 11/11 2/2

f 2/2 10/10 19/19
f 10/10 2/2 19/19

f 2/2 19/19 3/3
f 19/19 2/2 3/3

f 3/3 19/19 20/20
f 19/19 3/3 20/20

f 3/3 20/20 3/3
f 20/20 3/3 3/3

As you can see, the first triangle is followed by the same one of opposite orientation, which defines the orientation of the face normal vector. And this pattern repeats till the end of the face buffer. Now you can imagine why the model looks like a mess when you try to load this into Max.

Edit:
Here is a simple QuickBMS example script that can get you a better result from the existing obj files:
Code:
get Name basename
set Side1 Name
set Side2 Name
string Side1 + "_side1.obj"
string Side2 + "_side2.obj"

findloc Offset binary "\x66\x20"
log Side1 0 Offset
log Side2 0 Offset
append
set Size long 0
goto Offset
do
   savepos Offset1
   findloc Offset2 binary "\x0D\x0A"
   goto Offset2
   get Linefeed short
   savepos Offset2
   xmath Size "Offset2 - Offset1"
   log Side1 Offset1 Size
   
   findloc Offset1 binary "\x0D\x0A"
   goto Offset1
   get Linefeed short
   savepos Offset1
   xmath Size "Offset1 - Offset2"
   log Side2 Offset2 Size
   
   findloc Offset binary "\x66\x20"
while Offset != ""

_________________
"No investigation means no right to speak."
An Imitable Workflow for Reverse Engineering a Game Model

Don't forget to thank people by clicking the Image when you get helped.


Top
 Profile  
 
 Post subject: Re: Messed up Normals (3DS Max)
PostPosted: Thu Jun 21, 2018 6:35 pm 
Offline
n00b

Joined: Fri Apr 29, 2016 8:20 am
Posts: 13
Has thanked: 1 time
Have thanks: 0 time
You're right, every face was duplicated in reverse.

Thanks so much for your help!

Image



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Marktomato, tainhx and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group