How edit materials of linked blocks in the assembly file?

Hi Brian,

an example file is on the way (per wetransfer).

Right, the wrong look is caused by the fresnel function. This problem isn’t so important, since I use Enscape for the render output. But a solution could be nice. I set the fresnel value 1.5 at Rhino 5, so, I don’t understand why Rhino ignore it. For me the fresnel option looks like an option to much since the IOR should do the job.

But very important for me is to find a way to handle the materials of (linked) blocks. I wrote some words at the wetransfer message, but maybe it’s interesting for other users, so here a quote:

A first step for a help would be if I could edit materials of linked blocks. An other helpful step would be, if I could merge all materials with the same name from different blocks. For example my train is full of blocks with a wall plastic and I’m looking for a way to edit the wall color without to open dozen of linked blocks. Unfortunately I can embed the blocks, the file size would be a few GB.

I edit the “polster 1KL” material at two linked seat blocks and updated them. Now I see older versions of the material too, the red and the blue material was a temporary test only and can’t be find at the linked blocks anymore (orphans?). Also _purge doesn’t clean it.

I would be glad if we could find a stable solution. At the moment I have no pressure by the project, the hot phase will start later.

-Micha

Thanks, but I just needed a file that you opened in v6 but was saved last in v5 and that only contained the material you are asking about. The file you provided was last saved out of v6 so I can’t see what it looked like in v5 to understand what you did for…

since Rhino 5 Rhino Render doesn’t support Fresnel reflectivity. My hunch is you didn’t use Rhino Render to make the materials in Rhino 5 but probably used Vray 2 there. If that’s the case, it’s the reason why the Rhino Render in v6 material does not see the Fresnel reflectivity setting from v5 due to Vray not being installed on your Rhino 6. I’ve heard that Vray 3 will actually work on 6 but the official v6 version of Vray is coming soon from the Chaos group. Hopefully this clears up the Fresnel question… if my guess on what you did in v5 is correct.

The bug of not being able to edit the material that you showed in v6 is I think something @johnc recently fixed in regards to Material editor display issues. It sounds like you were able to edit the material though when you confirmed the Fresnel reflectivity was disabled. If that’s incorrect, but you still have the issue of not being able to edit the material when opening the v5 file in v6, I would need the version of the file (with just the material and no geometry so it can be posted here) saved out of v5 to try and reproduce it for a bug report.

Are you talking about multiple instances of the same block in one file that share the same material, that should work to change all the materials in unison without opening the block editor. Or are you asking about different block instances that share the same material in the file. I can also edit the one material without opening the block editor for the individual blocks and it updates the material on all instances. I’m thinking that maybe this is an old issue still that I helped get reported to Enscape regarding imported Vray 2 materials.

I’m not seeing this here with your file. I can edit the Polster 1KL material and it updates but it doesn’t create other versions. I can also edit this material with the block editor open for the seat and that doesn’t create the other versions you mentioned either. Perhaps I’m missing a step.

Hi Brian, I sent you a new file.

General I didn’t used Vray for this project. Only basic Rhino materials, since I want to use Enscape only. I set the IOR since I hoped it can be used for a plastic look.

I’m looking for a way to use a material name like “White Wall” at several different block parts (not instances of the same block) and finally I want to see one “White wall” at the assembly file, so that I can change the “white wall” color of all blocks.
(VfR2 was working so and I try to get the workflow for Rhino materials and Enscape. If a linked block was loaded than VfR ask me “do you want to keep the scene material, update it by the block material or you like a renamed copy”. Keeping the assembly scene material was good for 99,9% of the use. Maybe an option at the Block editor could help - “merge materials with same name to one material and keep scene material”.)

I tested the issue of the duplicated materials with the new example file. I changed the color at the linked block and updated the block. For updating I used the attached script. After a few color adjustments->saves->updates I got duplicated material names again.


_-RunScript (
Option Explicit
’Script written by Pascal
’ RMA
’Script version Wednesday, March 14, 2012

Call UpdateSelectedBlocks()
Sub UpdateSelectedBlocks()

Dim aObj: aObj = Rhino.GetObjects(“Select blocks to update.”, 4096, True)
If Not isArray(aObj) Then Exit Sub

Dim sBlock, aUpdate(), n
n = 0

For Each sBlock In aObj
ReDim Preserve aUpdate(n)
aUpdate(n) = Rhino.BlockInstanceName(sBlock)
n = n + 1
Next
Dim aFinal: aFinal = Rhino.CullDuplicateStrings(aUpdate)

Dim str
str = “”

Rhino.EnableRedraw False
Dim X
For Each sBlock In aFinal
X = Rhino.BlockInstanceName(sBlock)
str = str & " _Update " & chr(34) & sBlock & chr(34)
Next

str = “_-BlockManager” & str & " _Enter _Enter"

Rhino.Command str, False

Rhino.EnableRedraw True
End Sub
)

Tested now - I get duplicated materials also if I use the update function of the block manager, it’s not the script.

Thanks for the additional info! I made a simplified set of files to illustrate the bugs with linked+embedded or just linked block materials and filed the issues below.

https://mcneel.myjetbrains.com/youtrack/issue/RH-44213
https://mcneel.myjetbrains.com/youtrack/issue/RH-44214
https://mcneel.myjetbrains.com/youtrack/issue/RH-44215

The one I could not reproduce is the duplicating of materials. If you have the time, please try to use the files I uploaded to these reports to make that happen on your end and let me know the exact steps. Thanks.

That’s funny, you find more issues than I had. :slight_smile:

I tested your files and got my bug running too:

  • open linke-seat at R6, open the material editor to see the materials
  • open the seat at a second, separate by you opened R6 task (not per block edit) and change the color -> press save
  • open the block manager at the first Rhino task and update by pressing the update button -> nothing happens at the material editor
  • edit the seat color again and save (second Rhino task)
  • update at the block manager (first Rhino task) -> I got an extra material
  • … save other colors and new updates cause more duplicated materials, but not every time, maybe every second time

But please don’t forget my initial request:

(a) I can edit the block materials at the assembly file and I don’t need a note only, that it can’t be done. I need a way to edit the material without to open a new Rhino task and to edit the block files. I would need to open a lot of files, if I would like to do it for a complex assembly like a train (my current project file contain more than 50 linked blocks).
For example the different window, ceiling and door panels are using the same material “wall color”. It was so easy at the VfR material editor - only I need to change the single “wall color” material at the assembly.

(b) Every loaded block using “wall color” creates a new entry at the Rhino material editor. I miss a way to merge all materials with the same name. VfR created only one entry at the VfR material editor, also if the same material name was used at several linked blocks.

The goal should be that the assembly file is the file, where the material setup can be finalized by easy adjusting. During my work with VfR2 I never missed duplicated materials with the same name. It’s very confusing for the workflow to see it now.
It would be very helpful if duplicated names could be avoided and a repair function to merge materials with the same name is added. Maybe per hidden test command like _testMergeDupMat. :wink: Also at VfR2 was some special commands for cleaning out Rhino material issues, for example _visCleanMaterialTable. An hidden command could do the job here too first. OK, which material should be used from my screenshot. Take the first one, I would adjust it if I need an other color.

1 Like

Thanks for the steps on the dup material issue. I’m either messing up the workflow, missing something or this just isn’t happening now in the latest internal build of 6.x. This is what I’m doing… is that right? The update not doing anything until I reopen the linked seat file is already reported as you know but I’m failing at getting dup materials. I’ll bang on it some more too as it sounds like it’s intermittent on your end.

@andy Can you please give an opinion on the requests labeled a and b above. Could linked block materials possibly work like that and I thought we couldn’t even make materials with the same name now… at least I can’t!

Your video looks like I did it here. I tested it again:

  • open linke-seat at R6, open the material editor to see the materials
  • open the seat at a second, separate by you opened R6 task (not per block edit) and change the color -> press save
  • open the block manager at the first Rhino task and update by pressing the update button -> nothing happens at the material editor
  • pressed the update a second time and now the duplicate material is shown
  • pressed the update button a third time, no new duplicate material, but the order at the list is changed

In this state I can edit the color of the seat and save it and every single click on the update button show a new duplicate material.

(I disabled the Enscape plugin and the bug still appears.)

Attached the edited block and assembly file, where the duplicated materials can be found. Maybe the bug can be found in the duplicated materials.
LinkeBlockMatBug.rar (59.6 KB)

Today first time I have seen this popup window. The same is needed for materials of blocks. Additional it’s needed that the user can edit linked block materials at the assembly file.

ScreenShot9240

Thanks for the new upload but I only see two materials in the Linked-Seat.3dm so something about the issue you are seeing is not saving with the file. I’ll let you know if I can figure out how to reproduce it here for a bug report.

Unfortunately, I don’t think this will be possible due to how the block system works in Rhino. See @andy’s comment on https://mcneel.myjetbrains.com/youtrack/issue/RH-44215

Oh[quote=“BrianJ, post:18, topic:53659”]
Unfortunately, I don’t think this will be possible due to how the block system works in Rhino. See @andy’s comment on https://mcneel.myjetbrains.com/youtrack/issue/RH-44215
[/quote]

@andy Oh, that would be really hard, I’m shocked. So, a big assembly can’t be setup for rendering. It’s a standard for VfR since years. Please, try it.

1 Like

RH-44215 is fixed in the latest Service Release Candidate

Hi @BrianJ and @brian,

I have seen the update at the latest release now. The note, that it can’t be edit is shown at the material editor. I think, it should be added to the object material properties too. In this case the material was applied to an object of the scene and first I was confused that it was not editable until I found the note at the material editor.

But, much better would be to allow to edit it. This functionality is very important, since complex assemblies needs to be fine adjusted at the assembly file. Vray for Rhino allow it since years and it’s the basic for a lot of my projects. For the future the functionality is needed for other plugins like Enscape. Please, please … go this litte further step. A note, that this material is used by a linked block could be kept.

Edit: there are still duplicated material names.

I have just committed a fix for the missing note (in the 6.x branch).

@johnc Couldn’t we not find a solution for editing the block materials at the assembly file? It’s so essential for render work that I don’t understand why not allow it. (Also there shouldn’t be duplicated material names.) Trust me, my wish is to see the great, since years proofed Vray workflow for all render plugins.

For example “glass gepäck” is a glass material of luggage rack parts (approx. 8 different linked blocks). If my client ask me for a light blueish tint, than at the moment I need to open 8 blocks and adjust the glass material, save it and update the blocks - 8 files, 8 materials - a lot of work. This should be done by a single edited material at the assembly file.

Micha

The way Rhino works is that “things” that are imported from a reference file (like a linked block) are read-only. This happens with everything - objects, layers - you name it.

Since the materials are in the linked file, and since the linked file doesn’t save when you save the file that references it, how do you think the changes get saved?

  • Andy

VfR solved it so:

  • the assembly load materials from the linked block
  • if a material exist, than the user can choose which one should be used
  • all materials are saved at the assembly file
  • if a material is changed at the assembly, than this is saved at the assembly only

The workflow is to assign materials at the block files first. So several different block files can contain materials with the same material name like “metall.alu.9006”. Later, at the assembly, all blocks are using the same material with the same name. So, I can create a complex train interior with a lot of blocks and a few materials only. It doesn’t matter that the newest material is at the assembly only. Most, single block files are not used for rendering.

Here a screenshot from VfR2 (it’s nearly the same at VfR3):
ScreenShot9290

2 Likes

@andy @johnc @brian @BrianJ
Sorry, I need to ask again. I’m a paying customer but I’m lost with this problem here - no support?

My client like to get his renderings. It’s a complex train interior with many different seats. What is the recommended way for example if I need to change the color of the plastic back parts of the seats?

We are in concept phase and I need to adjust the color several times. Should I open and close all linked seats for adjusting the right look?

Please help. It’s a serious problem now. The project needs to be done.

Micha

It’s not going to be addressed in Rhino 6. I do have a plan for this in Rhino 7, but there’s nothing I can do to add this feature in Rhino 6.

  • Andy

Hi @andy Andy, than you for the quick answer.

I was writing something more in this moment:
And an other observation as motivation to touch the material system. I have 6 seats and all use “plastic A” (white). Now I edit one block and changed the color to blue. I saved the block and updated the linked block. But at the main file there is still plastic A in white. So, how are the same named materials of the different blocks handled?

@andy, couldn’t be there a way to remove the lock from the material editor and allow to edit them? Maybe per testcommand or an other workaround?