Announcement

Collapse
No announcement yet.

Bug: Vrmesh in Rhino block duplicated/recreated on every open

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug: Vrmesh in Rhino block duplicated/recreated on every open

    I have a set of blocks, each of which contains a .vrmesh. The blocks are then instanced. So far so good.

    Since they are vrmeshes, I can set the material on them. So I assign one material to all the vrmeshes and save the file. Here is what it looks when I saved the file. Not that 2 blocks contain the same OH3 Pos and OH3 Neg meshes, so they are shown as 2 separate items, which is already strange, since they link to the same .vrmesh file, but okay.

    Click image for larger version

Name:	Screenshot 2023-05-10 162559.png
Views:	301
Size:	320.8 KB
ID:	1180429



    Now I close Rhino and open the file again. Sometimes it will say there are orphaned materials, sometimes it wont. Here is the asset editor after opening again:

    Click image for larger version

Name:	image.png
Views:	236
Size:	711.5 KB
ID:	1180430
    See that every .vrmesh is now in there twice and has a new Generic material applied to it.

    Not sure what is going on, but its a bug for sure.

    Thanks for fixing.

    I can send over the files if you want to test it.

  • #2
    Here is a test file. There is a master file with 2 linked blocks each containing a .vrmesh file with a material applied.

    Click image for larger version  Name:	image_78491.png Views:	0 Size:	1.03 MB ID:	1180445


    Master file:

    Click image for larger version  Name:	image_78493.png Views:	0 Size:	741.2 KB ID:	1180447


    When I open it a second time:

    Click image for larger version  Name:	image_78494.png Views:	0 Size:	605.2 KB ID:	1180448


    Weirdly, If I press Keep and open the asset editor everything is the same. If I press Delete, now my Sphere has lost its material slot for some reason. I have not edited the sphere.3dm or sphere.vrmesh files in between!?

    Click image for larger version  Name:	image_78495.png Views:	0 Size:	678.3 KB ID:	1180449



    So, yeah, something is still buggy about this workflow. I can't get it to duplicate like in the other file, but the problem I think is the same. It somehow thinks it needs to recreate assets, even though it doesn't.


    It wont let me upload a 850KB zip file, so here is the link to the files: https://www.dropbox.com/s/e12wwyhbur...20bug.zip?dl=0
    Last edited by seltzdesign; 10-05-2023, 09:01 AM.

    Comment


    • #3
      More weirdness with V-Ray Proxy Meshes in linked Rhino Blocks. I go into the block and try to change the preview, but nothing happens. I right-click a Proxy Mesh in the Asset Editor and click Select Objects in Scene and nothing happens. But when I delete the mesh in the viewport and go to Purge unused Assets, the Proxy disappears from the list.

      You can see what I mean here: https://recordit.co/WXLjlE3M8t

      Can you provide a working way to have:

      1. a proxy mesh inside a linked block
      2. Instance that block many times
      3. Change the preview type of it from the file with the instances

      I simply cannot get it to work. It's in the same file I sent you.

      Comment


      • #4
        Seems like its a bug with linked block. If its an embedded block, I can change the preview type of the Proxy Mesh inside the block. It would be nice if it would work with linked blocks too, ie. the block is a separate .3dm file.

        Comment


        • #5
          Hello seltzdesign,
          We are currently investigating this issue with Orphaned materials and Blocks. Thank you for your files - I will take a look and let you know once there is some more information.

          Now I close Rhino and open the file again. Sometimes it will say there are orphaned materials, sometimes it wont.
          In that regard I also wanted to ask how do you open Rhino files? With File>Open, File>Recent or with double-click?
          Natalia Gruzdova | chaos.com
          Chaos Support Representative | contact us

          Comment


          • #6
            Good to hear. Yeah, I also noticed another issue that might be related to that. I have that file with the 57.000 block instances with V-Ray meshes in them. I did "Purge" in Rhino and it said it had purged 57.000 legacy materials. Could it be that V-Ray was creating a Rhino material for every block instance? I will keep a look out if I notice anything.

            Originally posted by natalia.gruzdova View Post
            Hello seltzdesign,
            In that regard I also wanted to ask how do you open Rhino files? With File>Open, File>Recent or with double-click?
            I usually open files from the startup dialog and either click one of the recent files thumbnails or click the open tab on Rhino's startup screen.

            Comment


            • #7
              Hi again seltzdesign,

              So as for the Orphaned materials warning we have it logged as VRW-3964 and some improvements will be introduced in the next update. But I wanted to point out that this issue with how Rhino handles plugin’s materials was also discussed with McNeel and there were also updates on Rhino side.

              What Rhino version are you currently using? Make sure that you use the latest update. You can find some more information here in this article.
              Apart from that we recommend to open files with File > Open after Rhino has fully been loaded just in case. Avoid double-clicking and opening files from recent files.

              Next to your question
              Can you provide a working way to have:
              1. a proxy mesh inside a linked block
              2. Instance that block many times
              3. Change the preview type of it from the file with the instances​
              While you have already received an answer from Nikolay here in this post, I wanted to add that I have made some tests just to make sure how you got those duplicated instances that are not present in the scene (ie OH3-Neg#1).

              When you are inserting a Block instance as Linked definition type, please note that it maintains a link to the external file only. Linked geometry is updated when the external file changes.
              If you want to make any changes to the linked geometry you need to make them in the original file (ie changing materials or preview type of the proxy). Then these changes will be updated when you open the master file again or you can update them manually in the BlockManager.

              If you attempt to make changes to the linked geometry in the master file it seems to work until you save\open the file again. Because when opening the master file you are updating linked blocks and they load information from the external file, disregarding your prior changes in this master file, which is expected. And once you have opened the file you get the duplicates of plugin data without geometry information, which is why they can be safely purged with the V-Ray Purge Unused tool.

              You can try inserting Block with Embed and Link option - in this case you will be able to apply changes in the master file that will be saved, but this will also give you an option to update linked blocks if you want to override all these changes with the external file.

              About instancing V-Ray Proxy and Blocks here is a quote from our documentation: V-Ray Proxy can be instanced by using the _Array command or Alt+drag the object in the Rhino viewport. This helps save memory as the .vrmesh file will be loaded only once regardless of the number of instances.
              Copying and pasting a Proxy Mesh, however, creates copies that end up loading the same file multiple times. This should be avoided.
              A Proxy Mesh within a block definition will be loaded only once regardless of the number of block instances in the project. Therefore, copying and pasting block instances is a safe alternative method to copy/pasting the Proxy Mesh objects directly.

              Hope it helps.

              Click image for larger version

Name:	Linked.jpg
Views:	127
Size:	96.3 KB
ID:	1180854
              Natalia Gruzdova | chaos.com
              Chaos Support Representative | contact us

              Comment

              Working...
              X