• Welcome to Twisted DIRT Forums.
 

Reflex Surface Creator Tool

Started by JamieT, January 09, 2015, 09:55:28 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

JamieT

Introduction
   Ok guys, this is your first port of call in order to make custom 3D objects for your Reflex tracks.  This tool creates the correct mesh format needed to plug into the Custom Model Library Maker. >> http://twisteddirt.com/smf/index.php/topic,4691.0.html

The file format for the input is Collada (*.DAE) files.  Every modelling tool is able to export this format, and was chosen because it has many advantages over .OBJ for example.  One advantage is the ability to store vertex colours.  In particular, vertex alphas.  These are needed for creating "bump map models".  More info on those another time.


How to create models..?
Blender or Milkshape 3D are free tools that let you create 3D Models.  Autodesk 3D Studio Max is (in my opinion) the best tool for the job, but it's not free.


Questions?
Reply to this thread, or shoot me a PM with any questions, or bugs that you need to report.


Latest Version, 1.2.1 - 1 November 2015
http://reflex-central.com/tools/Surface_File_Creator_v1.2.1.rar


old versions
1.1 - http://reflex-central.com/tools/Surface_File_Creator_v1.1.rar
1.2 - http://reflex-central.com/tools/Surface_File_Creator_v1.2.rar

TwizardT

#1
so I've made model exported it as a collada file and tried loading it. i got this message:

See the end of this message for details on invoking
JIT debugger (Just In Time) instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
    at Reflex_DX_v2.Form1.MakeSurface (String myfilename, Device device)
    at Reflex_DX_v2.Form1.open_dae_button_Click (Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick (EventArgs e)
    at System.Windows.Forms.Button.OnClick (EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp (MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp (Message & m, Mouse Buttons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc (Message & m)
    at System.Windows.Forms.ButtonBase.WndProc (Message & m)
    at System.Windows.Forms.Button.WndProc (Message & m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage (Message & m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc (Message & m)
    at System.Windows.Forms.NativeWindow.Callback (IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)


************** Loaded Assemblies **************
mscorlib
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.18444 built by: FX451RTMGDR
     Codebase: file: /// C: /Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Surface File Creator
     Assembly Version: 1.0.0.0
     Win32 Version: 1.0.0.0
     Codebase: file: /// C: /Users/Tjeerd/Desktop/Surface%20File%20Creator/Surface%20File%20Creator.exe
----------------------------------------
System.Windows.Forms
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
     Codebase:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
     Codebase:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
     Codebase: file: /// C: /Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Microsoft.DirectX.Direct3D
     Assembly version: 1.0.2902.0
     Win32 Version: 9.05.132.0000
     Codebase:file:///C:/Windows/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
mscorlib.resources
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
     Codebase:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_nl_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
Microsoft.DirectX
     Assembly version: 1.0.2902.0
     Win32 Version: 5.04.00.2904
     Codebase: file: /// C: /Windows/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
System.Xml
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
     Codebase:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Xml.Linq
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
     Codebase:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Core
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
     Codebase:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
     Assembly version: 1.0.2911.0
     Win32 Version: 9.12.589.0000
     Codebase:file:///C:/Windows/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2911.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll
----------------------------------------
Microsoft.VisualC
     Assembly Version: 10.0.0.0
     Win32 Version: 11.00.50938.18408 built by: FX451RTMGREL
     Codebase:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualC/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll
----------------------------------------
System.Windows.Forms.resources
     Assembly Version: 4.0.0.0
     Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
     Codebase:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_nl_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** JIT Debugging **************
To enable JIT debugging, should be in the configuration file for this
application or computer (machine.config) the value
jitDebugging set in the System.Windows.Forms area.
The application must also be compiled with debugging
was turned on.

For Example:

<configuration>
     <System.Windows.Forms jitDebugging = "true" />
</ configuration>

When JIT debugging is enabled, any unhandled exception
to the JIT debugger registered on the controlled computer
rather than be handled by this dialog box.


TwizardT

and when I clicked to do it anyways nothing happend

do you know what this means? (does it only work on 32bit computers?)

JamieT

Ok thanks TwizardT.

Which program did you use to make the object?  If you could email the Collada file to me, I'd like to take a look please.

Click the envelope on the left of this message to get my email address.

JamieT

Thanks for the file.

For everyone's benefit reading this, it's created with Cinema 4D.  This was a program I wasn't able to use during testing, as it's not free.

The main issue I'm seeing is that the mesh doesn't have a name assigned to it.  As this was a quick test that you did, are you able to assign a name to the mesh before you export?  Ii'd also be interested in seeing a screenshot of the export options (if there are any).

I should also point out that the mesh must be triangulated before being exported.  The file you sent me was saved with quads rather than triangles.

TwizardT


JamieT

#6
New version in the first post.

Just switched around a few lines of code to make it more stable.  Generating the vertex normals caused an error on certain model shapes.  Hopefully this should fix that.

Thanks to Logan and Mototank for bringing this to my attention.

JamieT

New version.

Fixed the NAN issue which affected certain users from Europe due to their language settings.

Link in the first post.

Danwasaki

I think there is a problem creating objects with sketchup.
((ITS GERMAN  ;D))


Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Collada.Source_Cllda.ToFloatList(String input, Int32 author)
   bei Collada.Source_Cllda..ctor(XElement xe, Int32 author)
   bei Reflex_DX_v2.Form1.MakeSurface(String myfilename, Device device)
   bei Reflex_DX_v2.Form1.open_dae_button_Click(Object sender, EventArgs e)
   bei System.Windows.Forms.Control.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Geladene Assemblys **************
mscorlib
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18444 built by: FX451RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
Surface File Creator
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///C:/Program%20Files%20(x86)/Steam/SteamApps/common/MX%20vs%20ATV%20Reflex/SurfaceFileCreator/Surface%20File%20Creator.exe.
----------------------------------------
System.Windows.Forms
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34238 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
Microsoft.DirectX.Direct3D
    Assembly-Version: 1.0.2902.0.
    Win32-Version: 9.05.132.0000.
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll.
----------------------------------------
mscorlib.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
Microsoft.DirectX
    Assembly-Version: 1.0.2902.0.
    Win32-Version: 5.04.00.2904.
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll.
----------------------------------------
System.Xml
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34234 built by: FX452RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
System.Xml.Linq
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll.
----------------------------------------
System.Core
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
Microsoft.DirectX.Direct3DX
    Assembly-Version: 1.0.2911.0.
    Win32-Version: 9.12.589.0000.
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2911.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll.
----------------------------------------
Microsoft.VisualC
    Assembly-Version: 10.0.0.0.
    Win32-Version: 11.00.50938.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualC/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll.
----------------------------------------
System.Windows.Forms.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Wenn das JIT-Debuggen aktiviert ist, werden alle Ausnahmefehler an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.



JamieT

Quote from: Danwasaki on March 28, 2015, 07:21:09 PM
I think there is a problem creating objects with sketchup.
((ITS GERMAN  ;D))


Could you send me the Collada format so I can take a look please?

Danwasaki


JamieT

Thanks for the file.

(For the benefit of the thread) The problem is the same as the Cinema4D problem.  I need to improve how I read Collada files, which I'll try to do this week.  I have a much better understanding now that I've seen more examples and have more experience with this format.  Sorry for the problems guys. :)

In the meantime, you could use Blender or Milkshape 3D to save as a Collada format.

gary664

Whenever I try to launch the Surface Creator Tool application it never actually opens... It looks like my computer thinks about launching it, but then nothing happens.. Any ideas as how I might be able to fix this?

JamieT

Make sure you keep the config and DLL files with it in the same folder as the .exe

gary664

I made sure that all the files are in the same folder.. I click the link for the download, then i use WinRAR to extract, then drag the folder to the desktop then open folder and click on application and nothing happens.. Am i missing a step in here somewhere?

JamieT

Hmmm not sure why that would be.  Working fine for me.  Maybe try installing DirectX9 End User Runtime again.

gary664

Yeah still got nothing.. I really dont have a clue whats going on.. I dont have problems downloading or installing anything else   :-\

Baja1000McCoy306x

It might be an operating system compatibility issue, what operating system is your pc running on?

gary664

Windows 8.1 64 bit.. I was thinking the same thing Baja1000, but dont even know where to start to fix it...

mcm2boys

Do you have .NET Framework 4.0 installed? It will be listed as something like 'Microsoft .NET Framework 4....' in the installed programs list in the control panel. If not look on the microsoft site for it - google will find it quick enough. You might still need 4.0 even if 4.5 or higher is installed - i've had that issue in the past...