How edit materials of linked blocks in the assembly file?

unhandled

#1

Hi,

since years I use Vray and it was no problem to edit the materials of linked blocks. The materials was shown at the assembly file VfR material editor. Now I use Enscape based on Rhino materials and I don’t find the materials of the linked blocks at the main file. Is there a way I have overseen? If not, could it be implement like at VfR? It would be to difficult to open all the linked block files.

-Micha


#2

@nathanletwory Nathan, what do you think, looks like there is no current solution and some new development is needed. Do you have an idea, who could direct requested? You? :wink:


(Nathan 'jesterKing' Letwory) #3

Hi @Micha, unfortunately I am not sure what you feature you are talking about. Do you maybe have some screenshots to share?


#4

Screenshots are not so right possible.

Following situation at VfR: I have linked blocks where I have objects with Vray materials. Than I have an assembly file, where the linked blocks are insert. At the assembly file I can see the materials from the linked blocks and can edit the materials like needed. This changes are active at the assembly file only, the linked blocks will not be updated.

So, for example, I can build a train with dozen of linked seats and can simple change the texture of the seat materials at the assembly . If I open an assembly than VfR ask me, do you want to read the materials from the blocks or do you want to use the materials from the assembly file? Most I decide to use the assembly file materials. (Also I could edit the materials at the blocks and update the blocks - than I would be asked again for … .)

That’s the functionality of blocks at VfR. Now, I miss this functionality if I work with linked blocks and Rhino materials. I don’t see the materials of the blocks at the assembly Rhino material editor.


(Nathan 'jesterKing' Letwory) #5

I think I understand, but I don’t know yet how that would be possible. I’ll create a YT item when I am at a computer, and not on my phone (:


#6

Thank you.


#7

I want to come back to the topic since I need help for a current project.

I’m working on a large train interior and use materials based on Rhino materials. I have several seat types as blocks. At the seat blocks I defined the material “Polster 1KL”. It should look like plastic. It looks fine at Enscape.

I use Rhino 6 for the assembly file since the display speed is much better. I can find the seat material at the material editor now, but can’t edit it. Also it is shown like chrome metal, also at the viewport. Why not like plastic?

Now I want to change the seat color? How can I do it?


(Brian James) #8

Can you post a 3dm file that has this material in it… I don’t need the entire model just a 3dm that you open with v6 that has the material Polster 1KL and can’t be edited. My guess on why it’s chrome looking would be that Fresnel reflectivity is off in v6 since the material was a v5 mat that didn’t support that feature. To check we’ll need to be able to edit it and I could use to see the 3dm to help.


#9

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


(Brian James) #10

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.


#11

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
)


#12

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


(Brian James) #13

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.


#14

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.


(Brian James) #15

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!


#16

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)


#17

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


Block conflict dialog
(Brian James) #18

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


#19

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.


(Brian Gillespie) #20

RH-44215 is fixed in the latest Service Release Candidate