### Sketch Tool

There are no stupid questions, just stupid answers.
• 1
• 2

#### Re: Sketch Tool

SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
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.

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.

#### Re: Sketch Tool

JeffR
Steering Committee
Posts: 763
Joined: Tue Feb 03, 2015 9:49 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?

#### Re: Sketch Tool

SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
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.

#### Re: Sketch Tool

Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 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

#### Re: Sketch Tool

SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
@
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.

#### Re: Sketch Tool

Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
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

#### Re: Sketch Tool

SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
Very cool. I subscribed to your channel.
• 1
• 2

#### Who is online

Users browsing this forum: Bloodknight and 1 guest