is there any way (or workaround) to define various color schemes for a part or assembly model?
For example, when we are working on an assembly, we use different colors to distinguish the different components. Also, at the same time and when we have to make some rendered representations, we have to define some other colors in order to simulate reality as close as possible.
Any ideas? How can someone switch from one color scheme to the other?
Thanks in advance.
Hmm... I've seen model colors change before when a different color map file was loaded (back at Wildfire 2 and 3). I forcibly TRIED to make that happen just now in Creo Elements Pro (Wildfire 5) using two different appearance files and couldn't make it happen.
It's supposed to be that colors are saved with the model. But in the past it was possible to name your colors, load a new appearance file, and then OVERWRITE those named colors with new ones. I've seen this change the model colors on the screen before in WF3... but I can't make it happen now. This makes me wonder if the instances I witnessed in the past were bugs... or if I am mistaken that it was ever possible in the first place.
I'll keep digging... stay tuned.
Yuck. Here's what I found:
I was able to swap colors on models by applying colors to my materials and setting the config.pro option mat_assign_appearance to yes. Using a simple dummy material, I assigned a color of blue giving it a name "material_color". I saved this color from the MATERIAL input window as global_blue.dmt. The global appearance file supercedes the normal model appearance file... so I used this to help achieve the color swapping effect.
I went back to the same material, changed the color to green but kept the name of the color set to "material_color". From the MATERIAL input window, I saved this appearance file as global_green.dmt. Now I have two color files assigned to the same color name.
When global_green.dmt is active, the color called "material_color" is green. When I load global_blue.dmt, the color called "material_color" is blue. I can swap between the two color files and my model changes color (not quite automatically but close enough). In practice, this would be awfully tough to achieve.
I tried a variety of other ideas. I tried UNASSIGNING all materials hoping the model would revert back to it's original color. It did not. I tried saving two appearance files with different color palettes and loading them over top of each other (in an attempt to overwrite the colors). This failed.
In fact, loading the same named color over itself caused Pro/E to throw out a message warning me I was changing my color palette. I accepted this and told the system to overwrite the old palette with the new one. Yet the OLD palette stayed active until I physically clicked on each color from the palette. Once I clicked on the old colors, they disappeared and the NEW colors popped up. Weird. Definitely buggy... very buggy.
I hate to leave people with a NON answer and no possible solution... so I have to give you something. In a pinch, try these:
- Create a new assembly ONE LEVEL HIGHER than your current top level assembly. Add your top assembly as the only component. Color your assembly there for final rendering. This allows you to leave the colors alone in your current top assembly and create a different look to your part for rendering.
- Assign a string variable called "render_color" to each part in your assembly. Use that parameter as a selection device using the FIND tool. You could select all objects with the "render_color" set to "blue" easily using the find tool. Apply your rendering colors this way to save time. You might even be able to use a mapkey to speed this up.
- Play around with the material appearance assignments. they aren't great but they do offer some hope of toggling colors at the part mode quickly (when they're working properly... I had a few issues with having to re-issue the commands several times before the system responded).
Sorry I don't have better advice... anyone else got anything?
there is a way to do it which i often use, make seprate part/assembly for rendring. all u have to do is to copy all surface and publish thoes sufaces and call publish geometry in new part by copy geometry. This way u can keep both color schemes... and dont worry about changes that u will made in part or assemble it will automaticaly update.. try it and let me now
Message was edited by: DalbeerSinghSohal
There are some shortcuts to using this technique Dalbeer is suggesting.
You can create a Shrinkwrap which will automatically gather all solid surfaces of your assembly and all sub-levels (or selected sub-levels) into one object. If you create an External Shrinkwrap, you can keep the new model separate from the existing assembly while preserving associativity.
To do this, you have to create your shrinkwrap from the Insert>Shared Geometry>Shrinkwrap menu. You can't do it properly using the File>Save a Copy menu to save your shrinkwrap.
There are problems with this technique, though. In Dalbeer's method, you create MULTIPLE copied surfaces. Each one represents one part from your assembly. In my method, you avoid having to copy surfaces manually, create publish geometry, and then create external copies. However, the downside is that my technique creates ONE copied surface with sub-features representing each part in the assembly.
Both techniques appear to give the same result. Mine is faster and more automatic but with Creo Elements Pro (Wildfire 5), it's harder to assign colors to my copied model. Dalbeer's is easier to color because he has individual features. Mine are all lumped under one feature which still should be easy to color but the software really fights you when trying to select surfaces.
Ideally, you'd combine the two methods. If you make one separate copy/shrinkwrap feature for each component in your assembly, you'll avoid the selection problems my method has. If you use External Shrinkwraps or External Copy Geometry, you'll avoid carrying copied surfaces and publish geometry in your top assembly.
None of these suggestions gives us what we really need... "Appearance States". We need the ability to keep multiple appearance settings in the same model and toggle between them. We have Layer States, Simp Reps, Style States, and a ton of related features but we don't have Appearance States yet and that would be the best solution to your problem.
Hi, i suppose you have already tried this technique:
I have used it sometimes but would like Pro/Engineer to offer a feature to handle this.
Dear Brian and Dalbeer,
thank very much you for your time and effort.
Yes, both of your techniques can give some results but unfortunatelly they are not so easy to use. Imagine how much time you need on an assembly with some hundreds of components...
On the other hand, I believe that it's not a bad idea to have the ability, to define various "Appearance States" for a model.
PS. What do you think about a poll questioning about the necessity of this functionality?
Thank you for the link to that article. This technique is similar to the one I suggested using the material color options to create different appearances based on material type.
I totally understand that neither of these techniques is giving you the function you need. For a few parts, they work well enough... but for a large assembly they're just too time consuming. We need Appearance States. Perhaps we can convince the powers that be at PTC to develop this for us.
I wish I had a better technique for you. Short of taking the files into a 3rd party rendering package for processing, I am out of ideas.
However, you really SHOULD be able to put a color parameter on each model and use that as a selection filter for coloring. You can add parameters to parts and subassemblies right from the model tree... making it very easy. You could have preset values for your color parameters making them easy to assign. You should then be able to use the Find Tool to gather components by color code. Yet this doesn't work correctly. It only seems to work for ONE level of an assembly when it should work recursively throughout your entire model. I'm fairly certain this is a bug in the Find Tool because it makes no sense that this technqiue doesn't work. In theory, this technique could solve your problem... a few mapkeys, a color parameter, and clever use of the Find Tool is a great answer. Not sure WHY it isn't working though.
It's certainly frustrating!