The Neutral Object Format

Thank you Richard andnbsp; <!– s:D –><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /><!– s:D –>

I ‘ve got MSVC Standard would this be Ok, or should I use Visual basic…
Would this retain all the information Texture names and Object names ?

But this is interesting :
andquot;I have the ability to write ASC from 3DC (it is currently hidden), but it doesn’t export textures information. So that wouldn’t be much helpandquot;

…This would be helpfull if it was not hidden, I could use to Export Objects and… Add the textures manuallly, which is how I did the Textures for the Spitfire Mk2 (UFO, Ball, Bouncing bomb ;D) And I would not have to buy and use Converts, which do not save the Textures names, anyway <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

Hi All,

The Neutral Object Format (NOF) is 3DC’ answer to MD2. It is a very simple file format that includes mesh animation. The main goal was to create a format that was andquot;Neutralandquot;, meaning it doesn’t favour a particular type of game, and is graphics API neutral. A secondary but nearly as important goal was to make it really easy to read.

I have written a plug-in that will be provided with the next release of 3DC that imports a NOF file and creates an object from it. This sample could be used to read in a NOF file and export to another format (say MD2) or it could be used by game development systems to load NOF.

Anyone who is interested in this plug-in let me know (<!– e –><a href="mailto:richard@amabilis.com">richard@amabilis.com</a><!– e –>)

Richard

Here is the source for reading a Neutral Object Format file:

‘******************************************************
‘ Purpose: Loads a Neutral Object File (nof)
‘******************************************************

Public Function udtLoadNOF(strFile As String) As udtNOFFile
Dim intFileNumber As Long
Dim lngPointListKeyFrame As Long

With udtLoadNOF

‘get the next available files and open input file
intFileNumber = FreeFile
Open strFile For Binary Lock Read As #intFileNumber

‘get the header
Get #intFileNumber, , .udtHeader

‘if there are textures, get them
If .udtHeader.lngTextureCount ] 0 Then
ReDim .udtaTextureList(.udtHeader.lngTextureCount – 1) As udtNOFTexture
Get #intFileNumber, , .udtaTextureList
End If

‘get the materials
ReDim .udtaMaterialList(.udtHeader.lngMaterialCount – 1) As udtNOFMaterial
Get #intFileNumber, , .udtaMaterialList

‘get the key-frames
ReDim .udtaPointListKeyFrames(.udtHeader.lngPointListKeyFrameCount – 1) As udtNOFPointListKeyFrame
For lngPointListKeyFrame = 0 To .udtHeader.lngPointListKeyFrameCount – 1
‘get each key-frame in succession
‘we can’t get the whole thing at once due to the ordering of VB multi-dimension arrays
ReDim Preserve .udtaPointListKeyFrames(lngPointListKeyFrame).udtKeyFrameList(.udtHeader.lngPointCount – 1) As udtNOFKeyFramePoint
Get #intFileNumber, , .udtaPointListKeyFrames(lngPointListKeyFrame).bytName
Get #intFileNumber, , .udtaPointListKeyFrames(lngPointListKeyFrame).udtKeyFrameList
Next lngPointListKeyFrame

‘get the normals
ReDim .udtaNormalList(.udtHeader.lngNormalCount – 1) As udtNOFVector
Get #intFileNumber, , .udtaNormalList

‘get the UV coordinates
ReDim .udtaUVList(.udtHeader.lngUVCount – 1) As udtNOFUV
Get #intFileNumber, , .udtaUVList

‘get the triangles
ReDim .udtaTriangleList(.udtHeader.lngTriangleCount – 1) As udtNOFTriangle
Get #intFileNumber, , .udtaTriangleList

‘close the file
Close

End With
End Function

It really is hard to say. What languages to you know? If you know Visual Basic,then it would be hard to find an easier file format to find a andquot;readerandquot; for than Neutral Object Format. Since I provide exactly the code required to read it. Writing would be up to you of course, but I would guess writing to ASC would be relatively simple (can’t say for sure though).

I have the ability to write ASC from 3DC (it is currently hidden), but it doesn’t export textures information. So that wouldn’t be much help.

Richard

Richard

Neutral Object Format (NOF)

I would like to Export to different 3D formats, so the Neutral Object Format (NOF) seems a good idea to me (Newbie <!– s;) –><img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" /><!– s;) –>)

I will be using 3DC for :

1. asc

BoB Battle of Britain (Rowan) open sourse…I want to develop new Aircraft in BoB this requires asc 3D Studio ASC File (and vue !) (BDG : BoB Developers Group)

You might want to see this ;D :

Is it a :
A. Bouncing Bomb
B. UFO
D. Spitfire Mk2
C. Highly classified WW11 Aircraft…see 9th post down :
[img:3unoxy4z]http&#58;//www&#46;simhq&#46;com/simhq3/sims/boards/bbs/Forum40/HTML/003879&#46;html[/img:3unoxy4z]
<!– m –><a class="postlink" href="http://www.simhq.com/simhq3/sims/boards/bbs/Forum40/HTML/003879.html">http://www.simhq.com/simhq3/sims/boards … 03879.html</a><!– m –>
I’ve progressed a bit from this, using your Tutorials <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

and Mkeshp2 MAKE SHAPE Spitfire (Supplied by BoB, Rowan)
[img:3unoxy4z]http&#58;//www&#46;simhq&#46;com/simhq3/sims/boards/bbs/Forum40/HTML/003862&#46;html[/img:3unoxy4z]
<!– m –><a class="postlink" href="http://www.simhq.com/simhq3/sims/boards/bbs/Forum40/HTML/003862.html">http://www.simhq.com/simhq3/sims/boards … 03862.html</a><!– m –>

2. MDL

Flight Simulator 2002 Professional Edition…MDL Aircraft (BGL Scenery)

3. MD3 …or other 3D file formats (MS TrainSim <!– s:D –><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /><!– s:D –>)

4.Neutral Object Format (NOF) :
So would this be the correct direction for me : NOF ? I have seen the amout of different file formats there are and do not know which would be the best format to concentrate on for the future…

…I use 3D Exploration to convert Exported 3DC raw to asc. Is raw ok, should I use 3ds or which format in 3DC?

Richard

Thanks again, that’s excellent support… <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

I’ll look at the DirectX export sample

…I thought that it might export coordinates, so it is best to do the Export as you said <!– s;) –><img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" /><!– s;) –>

By the way, I got VB learning Edition from a Computer Fair for fun…a new tool for me to play with ;D

What you use to program it depends on what you are proficient at. If you are good at a language use it. The VB sample can be translated into pretty much any language.

If you are looking to write an exporter for 3DC you could look at the DirectX export sample.

The ASC export doesn’t export texture coordinates. So it would be a nearly impossible job to make manual modifications.

Richard

You must be logged in to reply in this thread.