資源簡介
快速實現模型LOD簡化面生成的開發包,可以集成到任何編輯器中,這個版本已破解.
The Simplygon SDK provides powerful methods to optimize 3d assets, which can easily be im-
plemented and integrated into your 3d asset pipeline. At the very core, the optimization can be
divided into two parts: Geometric optimization and 2d-material optimization.
There are two dierent approaches that Simplygon uses to optimize the geometric data. Through
reduction, geometric data is reduced using re-linking of triangles and vertex removal, and through
remeshing, where the geometries are replaced by a lightweight proxy geometry that resembles the
original.
The material casting is a post-process of both the reduction and remeshin processing, where
the caller application can use the mapping image data to cast material and texture data from the
original onto the processed geometry. This can either be used to increase the details of the data,
using normalmaps, or greatly reduce the amount of data through baking together a large number
of texturemaps into a single one.
代碼片段和文件信息
#include?
#include??
#include?
#include?
#include?
#include?“SimplygonSDKLoader.h“
static?std::vector>?AdditionalSearchPaths;
#ifdef?_WIN32?
#include?
#include?
#include?
#include?
typedef?int?(CALLBACK*?LPINITIALIZESIMPLYGONSDK)(?LPCTSTR?license_data??SimplygonSDK::ISimplygonSDK?**pInterfacePtr?);
typedef?void?(CALLBACK*?LPDEINITIALIZESIMPLYGONSDK)();
typedef?void?(CALLBACK*?LPGETINTERFACEVERSIONSIMPLYGONSDK)(?char?*deststring?);
typedef?int?(CALLBACK*?LPPOLLLOGSIMPLYGONSDK)(?char?*destbuffer??int?max_length?);
#define?PUBLICBUILD
namespace?SimplygonSDK
{
static?LPINITIALIZESIMPLYGONSDK?InitializeSimplygonSDKPtr?=?NULL;?
static?LPDEINITIALIZESIMPLYGONSDK?DeinitializeSimplygonSDKPtr?=?NULL;
static?LPGETINTERFACEVERSIONSIMPLYGONSDK?GetInterfaceVersionSimplygonSDKPtr?=?NULL;
static?LPPOLLLOGSIMPLYGONSDK?PollLogSimplygonSDKPtr?=?NULL;
static?HINSTANCE?hDLL?=?NULL;?//?Handle?to?SimplygonSDK?DLL
static?int?LoadError?=?0;?//?if?the?load?failed?this?contains?the?error
//?critical?sections?process-local?mutexes
class?rcriticalsection
{
private:
CRITICAL_SECTION?cs;
public:
rcriticalsection()?{?::InitializeCriticalSection(&cs);?}
~rcriticalsection()?{?::DeleteCriticalSection(&cs);?}
void?Enter()?{?EnterCriticalSection(&cs);?}
void?Leave()?{?LeaveCriticalSection(&cs);?}
};
static?int?GetStringFromRegistry(?LPCTSTR?keyid??LPCTSTR?valueid??LPTSTR?dest?)
{
HKEY?reg_key;
if(?RegOpenKey(?HKEY_LOCAL_MACHINE??keyid??®_key?)?!=?ERROR_SUCCESS?)
return?SimplygonSDK::SG_ERROR_NOLICENSE;?
//?read?the?value?from?the?key
DWORD?path_size?=?MAX_PATH;
if(?RegQueryValueEx(?reg_key??valueid??NULL? NULL??(unsigned?char?*)dest??&path_size?)?!=?ERROR_SUCCESS?)
return?SimplygonSDK::SG_ERROR_NOLICENSE;
dest[path_size]?=?0;
//?close?the?key
RegCloseKey(?reg_key?);
return?SimplygonSDK::SG_ERROR_NOERROR;
}
inline?LPTSTR?ConstCharPtrToLPTSTR(const?char?*?stringToConvert)?
{
size_t?newsize?=?strlen(stringToConvert)+1;
LPTSTR?returnString?=?(LPTSTR)malloc(newsize?*?sizeof(TCHAR));
#ifndef?_UNICODE
memcpy(?returnString??stringToConvert??newsize?);
#else
size_t?convertedChars?=?0;
mbstowcs_s(&convertedChars?returnString?newsize?stringToConvert?_TRUNCATE);
#endif?//?_UNICODE
return?returnString;
}
static?bool?FileExists(?LPCTSTR?path?)
{
DWORD?v?=?::GetFileAttributes(?path?);
if(?v?==?INVALID_FILE_ATTRIBUTES?)
{
return?false;
}
return?true;
}
static?std::basic_string?GetInstallationPath()
{
TCHAR?InstallationPath[MAX_PATH];
//?get?the?installation?path?string?from?the?registry
if(?GetStringFromRegistry(?_T(“Software\\DonyaLabs\\SimplygonSDK“)??_T(“InstallationPath“)??InstallationPath?)?!=?0?)
{
return?std::basic_string(
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????10461??2013-02-28?01:07??SimplygonSDKV4x86\4squares.obj
?????文件???????2715??2013-02-28?01:07??SimplygonSDKV4x86\add.jpg
?????文件???????2768??2013-02-28?01:07??SimplygonSDKV4x86\ba
?????文件???????1090??2013-02-28?01:07??SimplygonSDKV4x86\cube.obj
?????文件?????????25??2013-03-10?17:23??SimplygonSDKV4x86\License.dat
?????文件?????534016??2013-02-27?18:05??SimplygonSDKV4x86\LicenseApplication.exe
?????文件???????3945??2013-02-28?01:07??SimplygonSDKV4x86\multi.obj
?????文件???????2731??2013-02-28?01:07??SimplygonSDKV4x86\multiply.jpg
?????文件??????56105??2013-02-28?01:07??SimplygonSDKV4x86\ob
?????文件????4397056??2013-03-07?07:14??SimplygonSDKV4x86\Org\SimplygonSDKRuntimeReleaseWin32.dll
?????文件???????8605??2013-03-10?17:22??SimplygonSDKV4x86\output25.obj
?????文件??????33663??2013-03-10?17:22??SimplygonSDKV4x86\output50.obj
?????文件???????5054??2013-02-27?18:07??SimplygonSDKV4x86\ReleaseNotes.txt
?????文件????1507105??2013-03-07?07:01??SimplygonSDKV4x86\SimplygonAPIDocumentation.chm
?????文件??????98507??2013-02-27?18:07??SimplygonSDKV4x86\SimplygonAPIExamplesOverview.pdf
?????文件????2748730??2013-02-27?18:07??SimplygonSDKV4x86\SimplygonAPIUsersGuide.pdf
?????文件????9562624??2013-03-07?07:15??SimplygonSDKV4x86\SimplygonGUI.exe
?????文件???11037721??2013-03-07?07:01??SimplygonSDKV4x86\SimplygonSDK\ExamplesSource.exe
?????文件?????278528??2013-03-07?07:15??SimplygonSDKV4x86\SimplygonSDK\MaxPluginsx86\SimplygonMax2009ReleaseWin32.dlu
?????文件?????279040??2013-03-07?07:13??SimplygonSDKV4x86\SimplygonSDK\MaxPluginsx86\SimplygonMax2010ReleaseWin32.dlu
?????文件?????279040??2013-03-07?07:13??SimplygonSDKV4x86\SimplygonSDK\MaxPluginsx86\SimplygonMax2011ReleaseWin32.dlu
?????文件?????279040??2013-03-07?07:13??SimplygonSDKV4x86\SimplygonSDK\MaxPluginsx86\SimplygonMax2012ReleaseWin32.dlu
?????文件?????347136??2013-03-07?07:15??SimplygonSDKV4x86\SimplygonSDK\MaxPluginsx86\SimplygonMax2013ReleaseWin32.dlu
?????文件?????355328??2013-03-07?07:15??SimplygonSDKV4x86\SimplygonSDK\MayaPluginsx86\SimplygonMaya2009ReleaseWin32.mll
?????文件?????355328??2013-03-07?07:13??SimplygonSDKV4x86\SimplygonSDK\MayaPluginsx86\SimplygonMaya2010ReleaseWin32.mll
?????文件?????355328??2013-03-07?07:13??SimplygonSDKV4x86\SimplygonSDK\MayaPluginsx86\SimplygonMaya2011ReleaseWin32.mll
?????文件?????354816??2013-03-07?07:13??SimplygonSDKV4x86\SimplygonSDK\MayaPluginsx86\SimplygonMaya2012ReleaseWin32.mll
?????文件?????354816??2013-03-07?07:16??SimplygonSDKV4x86\SimplygonSDK\MayaPluginsx86\SimplygonMaya2013ExtensionReleaseWin32.mll
?????文件?????354816??2013-03-07?07:16??SimplygonSDKV4x86\SimplygonSDK\MayaPluginsx86\SimplygonMaya2013ReleaseWin32.mll
?????文件??????10461??2013-02-28?01:07??SimplygonSDKV4x86\SimplygonSDK\SourceCode\Assets\4squares.obj
............此處省略305個文件信息
評論
共有 條評論