I was having trouble quickly assigning "glass" material to Revit windows imported to Sketchup (via .dwg) in a way that worked with 3D PDF (which "Color by Layer" doesn't seem to). And I found you had been chasing this down in 2008 via Ruby's "Material by Layer." Did you ever figure it out for porting to your plugin? Otherwise, it's incredibly tedious changing all those windows over.

Views: 374

Reply to This

Replies to This Discussion

t sounds like what is needed here is a feature to assign a SketchUp material to each face to match the layer of the face. If we did that for just one layer at a time, then you could set the transparency of the glass by layer.

 

There is a ruby, layers_materials.rb, which can help. It has a bug in the section which creates new layers to match the material names. But the function 'Match materials from layers'

Match materials from layers:


This command is intended to paint faces with the material with the same name than the layer
they belong to. If the material exists, both front and back material are set for each face. If the
material doesn't exist, the face is left unchanged.

If you glass in in layer "Glass 3", then you create a material with the same name, "Glass 3", and run 'Match materials from layers'. The faces in layer "Glass 3" will be assigned the material "Glass 3", which makes it much easier to change them.

'Match materials from layers' will assign materials to face in all layers if there is already a material with that name.

Try it out, and let us know if it works, and maybe we can add a similar feature to IRender nXt - with a dialog or wizard to make it easier to use.

It doesn't appear to work. One of the problems, I guess, is that these guys probably have to constantly update their plugins for new versions of Sketchup (which is now 8). I'm sure you tried to find a way to convert the "color by layers" to use by your RPS 3D PDF...

We are probably not going to be able to support "color by later". We were able to do something like that several years ago, using a SketchUp Reader provided by SketchUp. But no one has had much success lately.

 

If you create the materials yourself, with the same names as the layers you want to convert, the attached .rb should work. Click on 'Convert Materials to Layer Names' on the plugins folder after you unzip it into the plugins folder.

 

Lets test if for one layer first:

 

1. Find the name of the layer you want to change

2. Create a new material with same name as the layer

3. Make the new material really noticeable for the test - e.g. red and 50% transparent

4. Run Convert Materials to Layer Names.

- It should work for everything in the later desired.

 

If it works well, you can try to convert several more layers.

- If you would prefer to simply convert all materials to match the layer names, let me know.

I added this feature to the .rb file - use the function: Create New Materials from Layer Names

- Alternatively we could only convert faces which do not already have a material.

 

If you have any problems, load the ruby console before you run it and send me the results from the ruby console.

 

Let me know if the .rb works for  you.

 

We are adding this as a feature to IRender_nXt in the next couple of weeks:

 

 

Create Materials from Layer Names is used to create new materials based on layer names, and to assign these new materials to all faces in those laters.

This is valuable after loading a DWG file which will have layer names on all of the faces imported from AutoCAD or Revit. By assigning materials to match these names, you can easily change these materials.

This function is available on the nXt Setup Tab

  • Create new materials for all layers (except Layer0) - If this is checked, then new materials will be created to match all layers, except Layer 0. If it is not checked, then no new layers will be created, and only existing layers will be used.
  • Do not change existing, not default, material names - If this is checked, then only faces with no material set will be set to the material with the same name as the entity's layer,. If it is unchecked, then exiting materials will be overridden with the layer materials.
  • Process Layers and Create New Materials - click the button to process the layers and materials.

Here is yet another version, which I posted to the SUC forum as well:

 

Put this in the plugins folder and give it a try.

After loading SketchUp, and importing a DWG file, select Convert Layer Names to Materials from the Plugins menu.



Create new materials for all layers (except Layer0) - If this is Yes, then new materials will be created to match all layers, except Layer 0. If it is No, then no new layers will be created, and only existing layers will be used. Only material names which match the layer names will be used.

Do not change existing, non default, material names - If this is cYes, then only faces with no material set will be set to the material with the same name as the entity's layer,. If it is No, then exiting materials will be overridden with the layer materials.

A report will be provided of new materials created and how many faces had their materials changed.

Let me know what goes wrong. (The first person to try a new plugin will undoubtedly find a problem or two)

 

 

Attachments:

Works GREAT.

Tips: The layer names, plus a few extra ones (not sure yet why, but the same ones were created with the broken ruby, too), are produced in a Paint Bucket category called "In Model." Adjust the materials there and it works great. To make sure that the material name pops up as you hover over the materials, first click on whatever material name is at the top of the dialogue box. That kicks in the hover-over/show-name ability.

I have to work on getting all my Revit window parts on correct layers. For some reason, they're not separating all the glass from the frame & sash parts. I may have several windows from different genesises (is that a word?) though.

 

 

Al, is there a way for me to import my .ArMaterials into Sketchup?
Revit Window layers problem solved. Revit automatically assigns the window "Opening" (the hole Revit puts in walls for the opening) its own Revit subcategory under the Windows Category, and assigns it a generic Window layer in the Export Dialogue Box. That "Opening" subcategory needs to be assigned the same Export Layer as the Glass. This is all internal to Revit, in the Export setup.

Geof Narlee said:

Works GREAT.

Tips: The layer names, plus a few extra ones (not sure yet why, but the same ones were created with the broken ruby, too), are produced in a Paint Bucket category called "In Model." Adjust the materials there and it works great. To make sure that the material name pops up as you hover over the materials, first click on whatever material name is at the top of the dialogue box. That kicks in the hover-over/show-name ability.

I have to work on getting all my Revit window parts on correct layers. For some reason, they're not separating all the glass from the frame & sash parts. I may have several windows from different genesises (is that a word?) though.

 

 

OMG, if you could port ArMaterials right into the 3D PDF...!

Geof Narlee said:
Al, is there a way for me to import my .ArMaterials into Sketchup?

I put the .ArMaterials Query in a new thread:

 

http://irendernxt.com/forum/topics/revit-armaterials-importing

 

I will put this latest comment there as well.


Geof Narlee said:

OMG, if you could port ArMaterials right into the 3D PDF...!

Geof Narlee said:
Al, is there a way for me to import my .ArMaterials into Sketchup?

Reply to Discussion

RSS

About

Render Plus created this Ning Network.

Search


Enter a phrase here to search the entire Render Plus web site:

Loading

Translate

Latest Activity

Dana Berry posted photos
Thursday
Erik Bootsma posted photos
Oct 8
Rudi Schwarz posted a photo
Oct 1
Rich Hart replied to Daniel Mimnagh's discussion IRender Nxt cloud animation
Aug 9

© 2024   Created by Render Plus.   Powered by

Badges  |  Report an Issue  |  Terms of Service