Commit 0499933a authored by Nicholas Milef's avatar Nicholas Milef

ENH: updated examples

parent dba7fcb1
c801a7d6253f83ffcee4fa1037f0faa7a5e2db105277b3c2e2627ab797719ca1097f1bc725b391119f9ba48032c97f1a59690318937e96053e1a8fd305bb3e3b
a98f593a8d95e341220ca12c7a4e92817b5cf5c16ca98d2119c34c0e23ea21ef8d436fb29ef421b06c97e984b13b37c66d6aa773f46b202fa074e3e06ee9b680
d7886cc1f0fcc6d867e385913a278e60fc05facbee42bcd6df43afa1e5da5edce51f449c761a906b3d44f6bd3d971f9069fcd8657616cba5fbdb3e0a292fc875
2b3ac2596835a43166c2761932b2325f6bbd9fad2860df7caa4e7a409b037cae2a1c240b674db7440169713a7086c4699b89664209be4f804eebc524d5162bb2
\ No newline at end of file
2b3ac2596835a43166c2761932b2325f6bbd9fad2860df7caa4e7a409b037cae2a1c240b674db7440169713a7086c4699b89664209be4f804eebc524d5162bb2
668bf984749bfe8821834c91a258209d80a8d7728dcc202f9765cf93c1952a02a9e0b1a2ba7aa8dfd7e501ffd2f1f64819232f6ba77751c9fe4d53225a2d263b
eab26eb96b03f966d805ce1f4f3a2a31d948284533240f2e818a8606da64af65fd096707f9842b77d49d9ed9f4c6150185c618ec3786979cc2d6a77f7671dbc4
\ No newline at end of file
eab26eb96b03f966d805ce1f4f3a2a31d948284533240f2e818a8606da64af65fd096707f9842b77d49d9ed9f4c6150185c618ec3786979cc2d6a77f7671dbc4
e610ba3bd770ac39f44f6a0e1c2872a419d91aba92c34c1985d8c4c4468b5bd0c56df4014bbbf83956c88ee8b13e961d79d97c79f6e7530097ec37ff9572b8a2
cc676a2e3711e03730de25cf1915830aaff04f16481e00f3a0c360ce6ee4c28494358ff6b66779a36c4ea2962b5444ef91ba9d8fd7ade6a7c76b9d19d661068e
\ No newline at end of file
cc676a2e3711e03730de25cf1915830aaff04f16481e00f3a0c360ce6ee4c28494358ff6b66779a36c4ea2962b5444ef91ba9d8fd7ade6a7c76b9d19d661068e
551df845e25b1acfc2e733947c79f6608916d68b6d08595e70486340a89ec4570ef8c54fc979ec1d5114bab5118ee8481e2ad614d7df6db9c23f1817df5455fe
52c671ed0ed0b1c9d3641705287cfc0872849286db401131ebda45a2b41fdd637eb700b901e084b0a8511931a457b71f3b8a045ba5399df915a43441e54d525d
5658edf259cd65f4d78b836f0c45d3c264a87d1c857e142b76bebb8931e4395af329417e260bd00c445ed776d1381a6d595f108e1f143be635c9d79739f66c7b
\ No newline at end of file
5658edf259cd65f4d78b836f0c45d3c264a87d1c857e142b76bebb8931e4395af329417e260bd00c445ed776d1381a6d595f108e1f143be635c9d79739f66c7b
8b2cf6afb77b8e49cd9403610e52e37cabd15f8fa4694201c65e1513846b0f4ef9d1694a828a1872521472477fdcb639e2b2e84ea5af0bdae543e29f7beadbf7
578fe4ffdcfe7e03f0f176fbdea00c97e00de1132494b741e6db45ecc2ee7d3121dc7ec1775966ec57d083dfb78ac247e9efd7daf04b367c0f931fc7b30e58a7
\ No newline at end of file
ef2bfa4f8989457b16f3e5beb8d568a187a3c459c38f3f817745bb816e6d20c000a0eb9aca0953f3a79550b43fee85940b47caee27ef518ae41cf36538e1db22
\ No newline at end of file
4b34e9d8856e8c4157f6ebbdb0501c88bb919dfcba295ba39a3372274b4aba392449c68e08c5390f60daaf3771818cb34b94424a3326d505b6ac645ac81922bf
b873c9a63b43ae89d7109091e13c125a86bf06c8f02f0b720040bea1f435a386971941f690583eb817ebd610361b55e03884b5de6a7663375e740b8cb9a04435
\ No newline at end of file
d2318ed34881a96fead130b2608a55416e8b2f9d32d153c5a7c86d686ef83d04b2736499194ca07316a1833531790c1481073b27163d5110862b812f75425df5
2d2c7a33bc6c0b409224eb69c66fef8d13d6cb6ca9c42427fe9221f778a511e21f58d0edf9c043cb0610c1a14d3f4e41132646a67d0c3c520badb12006d5d0d4
\ No newline at end of file
......@@ -38,5 +38,6 @@ CopyAndCompileShaders()
# Associate external data
#-----------------------------------------------------------------------------
list(APPEND FILE_LIST
head/,REGEX:.*)
head/,REGEX:.*
IBL/,REGEX:.*)
imstk_add_data(${PROJECT_NAME} ${FILE_LIST})
\ No newline at end of file
......@@ -43,31 +43,26 @@ int main()
scene->setGlobalIBLProbe(globalIBLProbe);
// Head mesh
auto head = MeshIO::read(iMSTK_DATA_ROOT "/head/head_revised.obj");
auto headMesh = std::dynamic_pointer_cast<SurfaceMesh>(head);
auto headObject = std::make_shared<VisualObject>("Head");
#ifdef iMSTK_USE_Vulkan
auto headObject = VisualObjectImporter::importVisualObject(
"head", iMSTK_DATA_ROOT "/head/head_revised.obj",
iMSTK_DATA_ROOT "/head/", 1, Vec3d(0, 0, 0), "dds");
#else
auto headObject = VisualObjectImporter::importVisualObject(
"head", iMSTK_DATA_ROOT "/head/head_revised.obj",
iMSTK_DATA_ROOT "/head/");
// Head material
auto headMaterial = std::make_shared<RenderMaterial>();
auto headDiffuseTexture = std::make_shared<Texture>(iMSTK_DATA_ROOT "/head/diffuse.jpg", Texture::Type::DIFFUSE);
auto headNormalTexture = std::make_shared<Texture>(iMSTK_DATA_ROOT "/head/normal.png", Texture::Type::NORMAL);
auto headRoughnessTexture = std::make_shared<Texture>(iMSTK_DATA_ROOT "/head/roughness.jpg", Texture::Type::ROUGHNESS);
auto headSSSTexture = std::make_shared<Texture>(iMSTK_DATA_ROOT "/head/sss.jpg", Texture::Type::SUBSURFACE_SCATTERING);
headMaterial->addTexture(headDiffuseTexture);
auto headNormalTexture = std::make_shared<Texture>(iMSTK_DATA_ROOT "/head/HeadTexture_Normal.png", Texture::Type::NORMAL);
auto headMaterial = headObject->getVisualModel(0)->getRenderMaterial();
headMaterial->addTexture(headNormalTexture);
headMaterial->addTexture(headRoughnessTexture);
headMaterial->addTexture(headSSSTexture);
headMaterial->setReceivesShadows(true);
headMaterial->setCastsShadows(true);
auto headModel = std::make_shared<VisualModel>(headMesh);
headModel->setRenderMaterial(headMaterial);
headObject->addVisualModel(headModel);
#endif
scene->addSceneObject(headObject);
// Position camera
auto cam = scene->getCamera();
cam->setPosition(0, 0.25, 2);
cam->setPosition(0, 0.25, 1);
cam->setFocalPoint(0, 0.25, 0);
// Lights
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment