Sketch Tool

There are no stupid questions, just stupid answers.
  • 1
  • 2
17 posts Page 2 of 2
SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
by SqHd » Fri Oct 30, 2015 8:36 pm
I remember dealing with this in the past and discovered a work around (back in 2010) using the Autodesk FBX converter, but was surprised to find it doesn't work anymore.
So I compared a Collada export from T3D 1.2 to the current version. Mud-H was on the right track with the spacing. It just needs to be separated line by line.

T3D 1.2

Code: Select all

<source id="t3d1cube-Position">
                    <float_array id="t3d1cube-Position-array" count="24">
                        0.5000 -0.5000 0.5000
                        -0.5000 -0.5000 0.5000
                        -0.5000 0.5000 0.5000
                        0.5000 0.5000 0.5000
                        -0.5000 -0.5000 -0.5000
                        0.5000 -0.5000 -0.5000
                        0.5000 0.5000 -0.5000
                        -0.5000 0.5000 -0.5000
                    </float_array>


T3D 3.8

Code: Select all

<source id="t3d3cube_orig-Position">
                    <float_array id="t3d3cube_orig-Position-array" count="24">0.5000 -0.5000 0.5000-0.5000 -0.5000 0.5000-0.5000 0.5000 0.50000.5000 0.5000 0.5000-0.5000 -0.5000 -0.50000.5000 -0.5000 -0.50000.5000 0.5000 -0.5000-0.5000 0.5000 -0.5000
                    </float_array>


Once the coordinates are separated line by line (there are 4 sections that this needs to be done), the file can be converted to FBX, then the FBX to OBJ using the latest Autodesk FBX Converter (which can be downloaded for free). Finally, the OBJ can be imported into Blender (no textures though). Obviously, editing the file line by line is way too tedious a process, so I started to delve into the source files.

At some point there were changes made in these two files (which deal with collada export information): colladaUtils.cpp and colladaUtils.h
Using WinMerge to compare the files, the differences were mostly converting 'int' to 'S32' and a 'double' to 'F64'

It would be great if a programmer could shed some light on why this would affect the line output to be one long line (with out the carriage returns). Hopefully, we can get it to function like it did in T3D 1.2 and use the converter to get our Sketch Tool creations in Blender.
JeffR
Steering Committee
Steering Committee
Posts: 763
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Mon Nov 02, 2015 3:36 pm
To clarify on it, with the spacing correction back in there, does it still not import correctly into blender without first passing it through FBX and OBJ?
SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
by SqHd » Mon Nov 02, 2015 8:39 pm
Hi Jeff.
That's correct. Even with the correct spacing, the collada file still needed to go through the conversion work around to get into Blender. (It wasn't too much of a pain since the Autodesk converter allowed for batch conversion.)

Also, I was doing some more digging last night and the collada output files changed (the spacing) with the 3.0 release. This is the release where the DIF interiors and "export DIF interior to collada" were taken out.

Finally, these files (colladaUtils.cpp and colladaUtils.h) didn't mess up the spacing as I had previously assumed. The 2.0 and 3.0 versions are the same.
Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sat Nov 26, 2016 8:41 pm
Hey hi, I was quick reviewing this and I found the problem. I start played with the Sketch Tool and did a little more complex building and this solution fixed the load into Blender3D 2.78a and can export already dts files into Blender3D.

If you wanna tested T3D_ColladaExporter (15MB)

Open Issue: https://github.com/GarageGames/Torque3D/issues/467

Open PR: https://github.com/GarageGames/Torque3D/pull/1831
SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
by SqHd » Sun Nov 27, 2016 4:35 am
@
User avatar
Johxz
: Wow! Great work! This is awesome. Thanks for the fix. I did some testing tonight and works like a charm. It's so nice to have this functionality back. Hope it makes the cut for 3.10.
Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Mon Nov 28, 2016 7:51 am
I'm doing a few video tutorials, I want to show one of the potential to use the sketch tool and then export to collada.

https://youtu.be/Vu_jg4_CM9c
SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
by SqHd » Fri Dec 02, 2016 7:53 pm
Very cool. I subscribed to your channel.
  • 1
  • 2
17 posts Page 2 of 2

Who is online

Users browsing this forum: Bloodknight and 1 guest