SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 09-07-08, 09:58 AM   #1
Mikhayl
Captain
 
Join Date: Dec 2007
Posts: 485
Downloads: 64
Uploads: 0
Default Obj format and smoothing ?

---

Last edited by Mikhayl; 02-10-10 at 10:36 AM.
Mikhayl is offline   Reply With Quote
Old 09-07-08, 10:46 AM   #2
ref
Grey Wolf
 
Join Date: Nov 2005
Location: Mar del Plata, Argentina
Posts: 871
Downloads: 0
Uploads: 0
Default

You must separate the faces by smooth groups into different elements of the object, the rendering engine tries to smooth all faces that share vertices, even if they have sharp angles, for example the faces in the front, that make a curved surface are smoothed ok, but the window frames must be separated (they must have their own set of vertices), select the faces in max and detach them to elements.

Ref
__________________
ref is offline   Reply With Quote
Old 09-08-08, 05:30 AM   #3
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

If you work with SH, uncheck "Normals" in OBJ Export Options ...
Precision must to be ~ 8 ... 10 ...
These windows are similar on guruware's import/export plug-ins ...
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Old 09-08-08, 12:59 PM   #4
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 28
Uploads: 3
Default

Thanks for letting me check out the model. I see Anvart and ref basically already answered it. In SH4 some models have vertex normals (aircraft, f.ex), but most don't.

I like to add to what already is said, that if a model doesn't have normals, what the game engine does (and so does S3D, it's using the exact same technique), is call a 3D-function "ComputeNormals". This function smoothens out the model as ref already indicated.
You will see that if you choose to import that same model (unmodified), and tick 'Import Normals' in S3D, you will get a close to exact same rendering as your first screenshot. Using precomputed normals has the benefit of proper lighting calculations and faster loading (no calculation needed), but increases the overall filesize (one normal-vector per vertex extra) and possible memory usage (depending on how it's implemented in the game). Not only that, I am currently unaware if the game accepts precomputed normals for each and every model (as I never tested this).

In any way, that's probably why you got different renderings, you looked at the same model with and without normals at different moments...
skwasjer is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.