ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks
Downloads

Tips and Tricks Share helpful modeling ideas

  #1  
Old 04-11-2011
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default Sketchup Hint: Making parts of a skp file show the Flexsim color

Here are instructions explaining how to prepare a Sketchup file to make parts of the 3d shape use the Flexsim object color.

Note: To simplify the process of removing materials, I use a Material Remover plugin (http://www.smustard.com/script/RemoveMaterials). Put the file in the Sketchup Plugins folder in Windows Explorer, then close and reopen Sketchup to get the menu option Plugins > Remove All Materials.
You could alternatively select each surface and assign the default material to its front and back materials manually using the button shown in the image below.




1. Open a skp model.
2. Open the Outliner window (Window > Outliner). This window shows you the organization of your model. Any entities that have been organized into components or groups will appear in this list.
3. In the Outliner window, right-click in whitespace and uncheck “Sort by Name.”
4. Select the entities that you want to change color using the 3d view or the Outliner.
5. Right-click the entities in the 3d view and select Make Component. (If you can't see this option, then your entities are probably already organized into components. If that is the case, then you need to create a new shape, such as a plane or box, turn that shape into a component, and then drag your existing components into that component in the Outliner window. You can then delete the dummy shape that was required to make the ColorChangeables component.)
6. Enter a name for the component (such as ColorChangeables), check the “Replace selection with component” box, and then press Create.



7. Select menu option Edit > Select All (or press Ctrl-A).
8. Hold the Ctrl key and click the ColorChangeables component in the Outliner window to unselect those entities.
9. Cut the selection using menu option Edit > Cut (or press Ctrl-X).
10. Select menu option Edit > Paste in Place. This operation will have moved everything that isn’t color-changeable to the bottom of the file hierarchy without moving its location in the model.
11. Select only the ColorChangeables component and remove its materials manually or by using the plug-in menu option Plugins > Remove All Materials.



12. Save the model.
13. Import the model into Flexsim. It will be color-changeable now.



This process could probably be automated by writing a Ruby Script Plugin to do this automatically based on the selection. If anyone feels so inclined to write such a script, I'm sure it would be a welcome addition to this thread.
Attached Thumbnails
Click image for larger version
Name:	paint_default_material.jpg
Views:	1409
Size:	16.0 KB
ID:	1340   Click image for larger version
Name:	create_component.jpg
Views:	1379
Size:	20.4 KB
ID:	1341   Click image for larger version
Name:	finished.jpg
Views:	1422
Size:	20.3 KB
ID:	1342   Click image for larger version
Name:	finished_in_flexsim.jpg
Views:	1368
Size:	19.7 KB
ID:	1343  
The Following 16 Users Say Thank You to Phil BoBo For This Useful Post:
syseo (09-06-2011)
  #2  
Old 04-14-2011
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Phil,

Thanks very much for this very helpful post. I tested two models downloaded from Google Warehouse. Both worked well.

By reading your post, it seems Flexsim will change the color of any default material in the first component of a SketchUp model. Is this understanding right?

I do not quite understand the dumy shape operation (Step 5) that you described if the entity is already a component. And if I moved my entity into the dummy shape, and then delete the dummy shape, the entity will be deleted as well. So how can I change the color of a deleted entity?

Another question is how to make the shape scaled properly in Flexsim. I noticed one shape was perfectly imported into the yellow box but the other one shrunk and distorted in the yellow box in Flexsim. Should I do something in SketchUp in order to scale it properly like what we used to do with AC3D?

Thanks.
__________________
Best,
Alan
  #3  
Old 04-15-2011
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

The way OpenGL handles color is a two step process: (1) set the color, (2) draw stuff. The stuff's color will be whatever the last set color was.

The default material skips step 1, which means it will be drawn as whatever color was last set. When an object is drawn in Flexsim, we set the OpenGL color to the Flexsim object's color and then draw the object. So whatever surfaces are drawn first, if they don't set the color themselves, they will be drawn as the object's color.

The Outliner window's order isn't exactly representative of the order that the sketchup surfaces will be loaded in and drawn. The component grouping and cut/paste operation make sure that the surfaces you want to be color-changeable are the first ones loaded.

As for the dummy operation, you don't delete the entity itself. You delete the surfaces within the entity, which leaves the newly created component intact, although it doesn't have any surfaces. It makes the newly created component just a logical grouping of other components. You only need to do this if the "Make Component" option is grayed out on the entities that you want to be color-changeable.

In my tests, I did notice that sometimes the shapes got distorted if I was messing around with the order of objects in the Outliner by dragging things around. This is probably due to surfaces' sizes being relative to their containers. When I followed the steps listed above, then I didn't have this problem. I only noticed this issue when I was doing other stuff.
The Following User Says Thank You to Phil BoBo For This Useful Post:
AlanZhang (04-16-2011)
  #4  
Old 09-28-2011
Warren Wu's Avatar
Warren Wu Warren Wu is offline
Flexsim User
 
Join Date: Aug 2011
Posts: 8
Downloads: 1
Uploads: 0
Thanks: 5
Thanked 0 Times in 0 Posts
Rep Power: 0
Warren Wu is on a distinguished road
Default

Hello Phil,
I have done as what you have described above, it was good in Flexsim 5.12(imported in skp format), but when I exported the SketchUp model out as 3DS format, and imported it into Flexsim 4.52, it did not work.Can you give me some suggestions?
Thanks.
  #5  
Old 09-29-2011
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

The "3D Media" section of the Flexsim Users Manual explains how to get color to show through a 3DS file.
The Following User Says Thank You to Phil BoBo For This Useful Post:
Warren Wu (09-30-2011)
  #6  
Old 06-29-2012
Jayshan Jackson Jayshan Jackson is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 1
Downloads: 1
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Jayshan Jackson is on a distinguished road
Default

I'm sorry I'm so late to the game, but I'm trying to learn Flexsim by myself. My company won't front the cash to pay for a trainer. I've pretty much gotten Sketchup down and have created a warehouse model.

What's the best way for me to import my sketchup models into Flexsim. I've done some research and it appears that I'll need to convert my models to vrml for them to work, but I'd like a second opinion. I'm aware that sketchup does VRML importing in the pro version, but is there a VRML plugin for exporting for the non-pro version??

Am I over-looking an easier way to do import object into my model??

Thanks
  #7  
Old 06-29-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

You can import your models directly into Flexsim (from Flexsim 5.2 onwards). No need to convert them. Just double click an object, go to the general tabpage and on the 3DShape option select your sketchup file.
  #8  
Old 06-29-2012
George Serhan George Serhan is offline
Flexsim User
 
Join Date: Oct 2011
Posts: 49
Downloads: 10
Uploads: 0
Thanks: 59
Thanked 0 Times in 0 Posts
Rep Power: 107
George Serhan is on a distinguished road
Default Import a shape directly

I couldn't import it based on what you described. I didn't get any error message or any indication. I used a queue to test the way you described, it didn't work.
  #9  
Old 06-29-2012
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

If you try to import an skp file but nothing appears, then the Sketchup dll probably failed to register and you ignored the error in the install. Information on how to fix this issue is in this thread:

http://www.flexsim.com/community/for...ead.php?t=1572
The Following User Says Thank You to Phil BoBo For This Useful Post:
George Serhan (06-29-2012)
  #10  
Old 10-02-2013
Carsten Seehafer's Avatar
Carsten Seehafer Carsten Seehafer is offline
FlexSim Geek
 
Join Date: Oct 2008
Location: Ritterhude, Deutschland
Posts: 230
Downloads: 45
Uploads: 1
Thanks: 474
Thanked 320 Times in 143 Posts
Rep Power: 379
Carsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud of
Default

Is there a way to use FlexSim object color for .dae-files (FlexSim 7)?

I've tried it with the solution for .3ds (AC3D) and .skp (Sketchup) and an export to .dae but both ways don't work. Any suggestions or hints?

Thanks!


Thread Thread Starter Forum Replies Last Post
Sketchup color mbaccalaro Q&A 7 04-11-2011 03:54 PM
Does Flexsim support Google SketchUp ? qin tian Q&A 10 02-05-2011 12:04 PM
Flexsim doesn't show Sketchup textures Steven Hamoen Q&A 5 12-01-2010 01:33 PM
Why the object’s color can not show in Flexsim 5.02? Frans Zeng Q&A 6 07-26-2010 02:41 PM
making views follow operators Alex Christensen Tips and Tricks 0 05-23-2008 04:18 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.