Update code for camera DoF, lens shader.
Greetings...
Moderators: Ratow, coordinators





//-- Geometry associated to lights
bool vIsPortal = false;
string::size_type loc = string(CString(o.GetName()).GetAsciiString()).find( "PORTAL", 0 );
if (loc != string::npos) vIsPortal = true;
//-- meshlight
if (float(s.GetParameterValue(L"inc_inten"))> 0 ) vIsMeshLight = true;
CString type_mesh = L"mesh";
if ( vplymesh ) type_mesh = L"plymesh";
CString type_shape = L"Shape";
if ( vIsPortal ) type_shape = L"PortalShape";
//-----------------
if ( vIsMeshLight )
//-----------------
{
//--
float red = 0.0f, green = 0.0f, blue = 0.0f, alpha = 0.0f;
s.GetColorParameterValue(L"incandescence",red,green,blue,alpha );
float inc_intensity(s.GetParameterValue(L"inc_inten"));
//--
CString lName = findInGroup(o.GetName());
if (lName == L"") lName = o.GetName().GetAsciiString();
//--
f << " LightGroup \"" << lName.GetAsciiString() << "\"\n";
f << "\nAreaLightSource \"area\" \n";
f << " \"float importance\" [1.00] \n";
f << " \"float gain\" ["<< inc_intensity <<"] \n";
//f << " \"float power\" [100.0] \"float efficacy\" [17.0] \n";
f << " \"color L\" ["<< (red * inc_intensity) <<" "<< (green * inc_intensity) <<" "<<(blue * inc_intensity ) <<"]\n";
}
f << type_shape.GetAsciiString() <<" \""<< type_mesh.GetAsciiString() <<"\" \n";
//-------------
if ( vplymesh )
//-------------
{
//--
CString vInput_FileName = vFileObjects.GetAsciiString();
int Loc = (int)vInput_FileName.ReverseFindString(".");
vFilePLY = vInput_FileName.GetSubString(0,Loc) + L"_"+ o.GetName() + L".ply";
f << " \"string filename\" [\"" << replace(vFilePLY.GetAsciiString()) << "\"] \n";
}
//-- share
f << " \"integer nsubdivlevels\" [" << subdLevel <<"] \"string subdivscheme\" [\"loop\"] \n";
f << " \"bool dmnormalsmooth\" [\""<< MtBool[vSmooth_mesh] <<"\"]";
f << " \"bool dmsharpboundary\" [\""<< MtBool[vSharp_bound] <<"\"] \n";
//f << " \"string displacementmap\" [\"none\"]\n";
//f << " \"float dmscale\" [\"0.0\"] \"float dmoffset\" [\" 0.0\"]\n";
//--------------
if ( !vplymesh )
//--------------
{
f << " \"string acceltype\" [\""<< MtAccel[vAccel] <<"\"] \"string tritype\" [\"wald\"] \n";//TODO
f << " \"integer triindices\" [\n" << vTris.GetAsciiString() << "\n ]";
f << " \"point P\" [\n" << vPoints.GetAsciiString() << "\n ]";
if ( vSmooth_mesh && vNormals != L"" )
{
f << " \"normal N\" [\n" << vNormals.GetAsciiString() << "\n ]";
}
//--
if ( vText && vUV != L"" )
{
f << " \"float uv\" [\n" << vUV.GetAsciiString() << "\n ]";
}
}

Return to LuXSI (Softimage XSI exporter)
Users browsing this forum: No registered users and 0 guests