908317477 Posted October 8, 2019 Author Share Posted October 8, 2019 Okay, thank you How to make a rut? That's the tank wheels left grooves in the ground. Link to comment
morbid Posted October 8, 2019 Share Posted October 8, 2019 Easiest solution is decals. You can draw a texture for the rut. Don't forget to control life time of the created decals, a lot of them will drop performance. Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
908317477 Posted October 8, 2019 Author Share Posted October 8, 2019 How can I change the material of the node in the way of code? Link to comment
morbid Posted October 9, 2019 Share Posted October 9, 2019 You can find related code samples in the documentation: https://developer.unigine.com/en/docs/2.9/api/library/rendering/class.material?rlang=cpp https://developer.unigine.com/en/docs/2.9/api/library/rendering/class.mesh?rlang=cpp How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
908317477 Posted October 11, 2019 Author Share Posted October 11, 2019 hello Use the material::load function to always report errors.The display pointer is empty Link to comment
morbid Posted October 11, 2019 Share Posted October 11, 2019 Show us the code sample please. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
908317477 Posted October 11, 2019 Author Share Posted October 11, 2019 Very simple code Load(),I want to know how to use this function. I want to change the node material by loading disk files. Link to comment
908317477 Posted October 14, 2019 Author Share Posted October 14, 2019 ? How to use load function? Link to comment
morbid Posted October 15, 2019 Share Posted October 15, 2019 The error "pointer is empty" occurs because you're calling method without creating a material instance. To load material you first need to create it: ballmat = Material::create(); ballmat->load(...); How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
908317477 Posted October 15, 2019 Author Share Posted October 15, 2019 How to detect collision with objectmeshcutter? Using a getNumContacts() function does not collide with it. Link to comment
908317477 Posted October 16, 2019 Author Share Posted October 16, 2019 How to make such a large DDS file? This DDS is in your planting. I can't open it, even if I use the DDS plug-in of PS. Link to comment
908317477 Posted October 18, 2019 Author Share Posted October 18, 2019 (edited) Creating Mesh Clusters from Mesh Clutters How can I use C + + to implement this function?Call this function with code and How to set the bounding box of an object? Edited October 18, 2019 by 908317477 Link to comment
danvern Posted October 21, 2019 Share Posted October 21, 2019 Hello @908317477, ObjectMeshClusterPtr createFrom(const ObjectMeshClutterPtr &clutter) { auto cluster = ObjectMeshCluster::create(clutter->getMeshName()); String name(clutter->getName()); cluster->setName(name.append("_Cluster")); cluster->setParent(clutter->getParent()); cluster->setWorldTransform(clutter->getWorldTransform()); cluster->setVisibleDistance(clutter->getVisibleDistance()); cluster->setFadeDistance(clutter->getFadeDistance()); const int suf_num = clutter->getNumSurfaces(); for (int suf_index = 0; suf_index < suf_num; ++suf_index) { cluster->setEnabled (clutter->isEnabled (suf_index), suf_index); cluster->setViewportMask (clutter->getViewportMask (suf_index), suf_index); cluster->setShadowMask (clutter->getShadowMask (suf_index), suf_index); cluster->setCastShadow (clutter->getCastShadow (suf_index), suf_index); cluster->setCastWorldShadow (clutter->getCastWorldShadow (suf_index), suf_index); cluster->setBakeToEnvProbe (clutter->getBakeToEnvProbe (suf_index), suf_index); cluster->setBakeToVoxelProbe (clutter->getBakeToVoxelProbe (suf_index), suf_index); cluster->setCastEnvProbeShadow(clutter->getCastEnvProbeShadow(suf_index), suf_index); cluster->setShadowMode (clutter->getShadowMode (suf_index), suf_index); cluster->setMinVisibleDistance(clutter->getMinVisibleDistance(suf_index), suf_index); cluster->setMaxVisibleDistance(clutter->getMaxVisibleDistance(suf_index), suf_index); cluster->setMinFadeDistance (clutter->getMinFadeDistance (suf_index), suf_index); cluster->setMaxFadeDistance (clutter->getMaxFadeDistance (suf_index), suf_index); cluster->setIntersection (clutter->getIntersection (suf_index), suf_index); cluster->setIntersectionMask (clutter->getIntersectionMask (suf_index), suf_index); cluster->setCollision (clutter->getCollision (suf_index), suf_index); cluster->setCollisionMask (clutter->getCollisionMask (suf_index), suf_index); cluster->setSoundOcclusion (clutter->getSoundOcclusion (suf_index), suf_index); cluster->setSoundOcclusionMask(clutter->getSoundOcclusionMask(suf_index), suf_index); cluster->setPhysicsFriction (clutter->getPhysicsFriction (suf_index), suf_index); cluster->setPhysicsRestitution(clutter->getPhysicsRestitution(suf_index), suf_index); cluster->setMaterial (clutter->getMaterial (suf_index), suf_index); cluster->setSurfaceProperty (clutter->getSurfaceProperty (suf_index), suf_index); } Vector<Mat4> transforms; clutter->createClutterTransforms(); if (!clutter->getClutterWorldTransforms(transforms)) { return ObjectMeshClusterPtr{}; } cluster->createMeshes(transforms); return cluster; } Link to comment
908317477 Posted October 21, 2019 Author Share Posted October 21, 2019 How to expand?cluster 、with c++? Link to comment
908317477 Posted October 22, 2019 Author Share Posted October 22, 2019 When I call this function, my trees don't show up. detachClusterWorldTransforms() Link to comment
Recommended Posts