Saeder, I need talk you..
The code is Visual Studio 2019 is only for 3dxchange? I´m try , and look , really, the most ever solution in years!! Sure!
But..., I dont know how this works in Daz Studio, coz I use MotionBuilder for retarget. If I try to get the mocap in bvh from 3dXchange, is more similar trhu your code, but the position , in ever soft conversion no native, is lost. (No too accurate.. Not your mind, of course!) The real problem as the closed code from the companys (Reallusion and Daz..), and the "little satlz grain.." for this task.
I dont agree this "war". The two are a nasty companys... (well, for my opinion.., but the free Daz models are the most really framework for a human3dD )
Then... (Urghh... Humm...), I have a code to reduce the size for any Bvh file, around the 50% of Kb.. but, is in Perl code.
It´s soo very simple script like this:
///-----------------
@files = <*.bvh>;
foreach $file (@files) {
open (OLD, $file) || die "Couldn´t open $file: $!\n";
open (NEW, ">$file.bvh") || die "Couldn´t open $file.bvh: $!\n";
while (<OLD>
{
$line = $_;
if (/Normal/) { while (<OLD>
{ last if /}/; } $line => ""; }
if (/normalIndex/) { while(<OLD>
{ last if /[]]/; } $line = ""; }
$line =~ s/[-+]?[0-9]\.[0-9]+e[+-][0-9]+/0/g;
$line =~ s/([-+]?[0-9]+\.[0-9]{2})[0-9]+/$1/g;
$line =~ s/0\.00/0/g;
$line =~ s/[ ]+/ /g;
$line =~ s/[\t]+/ /g;
$line =~ s/^ //g;
print NEW $line;
}
close OLD;
unlink ($file);
close NEW;
}
/// ---------------------- EOF
Only the "magik" is avoid redundant data, like all the *.000000000000 to *.000.. (also, avoid the spaces, etc...)
Is possible translate this code (Perl) to your code?
Thanks for your work!