We are facing an issue with displaying mesh color on our 3D model in the browser when running the Appserver. While the color is visible in Rhino software, it does not appear in the browser. In Image 1, you can see that the color is visible in Rhino. When creating a new custom file, the model and parameters are visible in the browser, but the color does not appear on the model. I’ve attached the .gh file for reference and also updated the definition.hbs file code to handle the mesh color. Can you help us identify the error? Should we modify the .gh file, the definition file code, or both?
How are you viewing/running the definition on AppServer? Which endpoint are you using? I don’t believe using the /view endpoint will give you a material that exposes mesh vertex colors.
I had to restart both rhino.compute and appserver and also cleared the cache/history in the browser. I did not have to change any code in definition.hbs or any other place.
Thank you. You were right. Now it’s working. I need to ask one more thing. Is it compulsory to use a C# script in Grasshopper script? Can we use context bake instead of a C# mesh to base64 Draco? How can I display reflection and texture on the model?
You can definitely use the context bake. We use the draco compression and base64 to optimize the data transfer, but if this is not a concern for you, you can just use the Context Bake.
I need assistance with opening a Grasshopper file with the definition.hbs code. The model is opening in the browser, but I’m not getting the exact reflection and texture. How can I achieve that? Please reply fast as this is important.