johann.nadalutti Posted April 10 Share Posted April 10 Hi, I created many referenced nodes from an ObjectMeshStatic, and the mesh use a surface material that need to changed UV from node ID. In visual graph I change UV position with "InstanceID" and "Function" nodes. This works, but sometimes the UVs change when we change the position of the object or camera. Thanks for your help. Link to comment
arizmenda Posted April 11 Share Posted April 11 Hi, Johann. Can you, please, provide us your mesh with textures and surface material in .upackage for a research? You can do it by clicking on mesh with RMB -> Export As Package and attach the package file to your reply. How often does this behavior occur? Does it happen every single time you moving the nodes and camera, or just randomly? Thanks! Link to comment
johann.nadalutti Posted April 11 Author Share Posted April 11 Hi, unigine_project01.zip This is my test project. Thanks ! 1 Link to comment
arizmenda Posted April 11 Share Posted April 11 Thank you for your samples and quick response! We are now going to examine the code and material. We will reply as soon as we'll got some information about the case. Link to comment
arizmenda Posted April 12 Share Posted April 12 Hi, Johann! Your method doesn't work due to Instance ID node grants a non-deterministic result, nothing can be done with it. If it's for static nodes, you can attach it to the world position. But if it's for dynamic nodes, you'll either have to generate signs from the code or just manually prepare nodes with numbers as usual. Thank you! Link to comment
johann.nadalutti Posted April 12 Author Share Posted April 12 Hi, It's for dynamic nodes, how to do this in c# code ? Thanks you ! Link to comment
arizmenda Posted April 15 Share Posted April 15 Hi, Johann! Thank you for waiting! Your code suppose to randomly generate car license plates with different textures by setting a random seed value for the material parameter of specific surfaces. Basically, you need to write a randomizer, that defines seed. The rest is done by material. It should put dynamic UV mapping to the surface depends on world coordinates. You should also consider working on your mesh to avoid positioning problems. We can provide you piece of mgraph a bit later. Thanks! Link to comment
johann.nadalutti Posted April 15 Author Share Posted April 15 Hi, that work now ! I generate UV from a global counter from a CS script. I need to duplicate material from the script too. Thanks ! LicPlateUVGenerator.csbox_mesh_base.mgraph 1 Link to comment
arizmenda Posted April 17 Share Posted April 17 Hi, Johann! That's good to hear! As promised, here's a mesh, texture and material: car_numbers.upackage You can use it as example, but overall, your solution is quite elegant! Again, thank you for waiting. 1 Link to comment
Recommended Posts