ATTENTIONThis 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 |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
|||
|
|||
Why the object’s color can not show in Flexsim 5.02?
Hi, everyone
I have made a model in Flexsim 4.5 and it run smoothly. When I open my model in Flexsim 5.02, some objects’ color can not show properly. I have removed the materials of the 3D model that predefined with it, and retried in Flexsim 5.02, but found that this problem still existed. I found some words about color showing in Flexsim users manual, “If you want the object’s Flexsim color to show through the 3D object, you will need to change the ordering of the 3D file accordingly.” But I do not understand the meaning of those words. Can anybody give me some advices? I really appreciate your help in advance. |
#2
|
||||
|
||||
As the next line from the manual explains: "In the 3D file, the polygons whose Flexsim color shows through must be defined before any material is defined in the file. This can be tricky to do, and depends on the 3D modeling program that you are using."
From the "Preparing a 3D File" section of the Manual: [h3]"Getting the Object's Color to Bleed Through[/h3] For 3DS files, you can have the Flexsim object's color bleed through on certain shapes in the 3DS file. To do this, in AC3D give the object an ambient color value of rgb: (0.235,0.235,0.243). Also, you'll need to make sure the object gets exported as first in the 3DS file definition. AC3D's 3DS export sorts all objects alphabetically by their name, so you should give the object a name that is alphabetically before any other objects in the model." The functionality for getting a wrl color to show through hasn't changed. The objects in the shape that you want to show through need to be defined before the materials. You can do this using a text editor like Notepad or AC3D's "Flexsim mode" that exports objects with material 0 (black) before the material definitions. It would be easier to know what the problem is if you explained what you did to get the color to show through in version 4.52 and what you are trying to do to get it to work in 5.0. It would be helpful to know what 3d shape format you are using and what 3d modeling program you are using. It would be most helpful if you would attach the shape files. |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Frans Zeng (07-14-2010) |
#3
|
|||
|
|||
thanks for Phil's reply
Dear Phil, thanks for your quick reply.
Firstly, I will tell you what the 3D model format and the modeling program. The 3D model format I am using is .3ds and the modeling program is AutoDesk 3ds Max Design 2010. Except “Adjust the scale” and “Move objects to the origin”, as what have been mentioned in the users manual of Flexsim 4.52, hardly anything have been done for me to get the color to show through in this version. When it comes to version 5.02, there is a different scene. I can list below what I have tried to do to get it work: (1) the same .3ds format model’s color does not work in version 5.02, as shown in the attached thumbnails of the first thread. (2) I changed format of the 3D shape to .wrl and exported a new model through 3D program, and later I imported the new .wrl format model into Flexsim, but unfortunately, the imported shape was invisible. (3) I tried to change the format to .dxf and imported into Flexsim, and found that the imported shape was visible, but it’s color could not be changed. (4) If I want the object’s color to bleed through and be able to be changed in Flexsim 5.02, .stl(ascii, not binary) format file is my only choice. Last edited by Frans Zeng; 07-15-2010 at 12:42 AM. |
#5
|
||||
|
||||
The shape's material has a texture defined as "XSSZ—ZY.jpg"
Flexsim 4.5 was skipping the texture because the file doesn't exist. Flexsim 5 is trying to read the texture, but since it doesn't exist, it is drawing it white. This change occurred because of other changes that were made to the way textures are handled for the new skp import. I will add it to the development list to change this so that it properly ignores the texture for 3ds files if the texture file doesn't exist. In the meantime, you can do one of these things to fix it: -Remove the texture from the Material and re-export. -Add a texture with that name to the same directory as the 3d shape (such as in the attached zip file). Also, 3ds Max's wrl export is probably VRML2. Flexsim's wrl import is VRML1. It is confusing because VRML1 and VRML2 are both .wrl files. That is why it isn't properly importing when you use 3ds Max's wrl export. Although this particular shape's color doesn't bleed through in version 4.52 or 5.0, you have many options for making the color show through in Flexsim version 5, including but not limited to using the stl format. For instance, you can edit the 3ds material: -You can use the 3ds Material's Ambient Color to tell Flexsim to show the Flexsim color. Do this by setting the Ambient color to (60,60,62) on a 0-255 scale, which is (0.235,0.235,0.243) on a 0-1 scale. This particular ambient color tells Flexsim to let the object's Flexsim color show through. -You can also add "_fsclr" to the end of the material name. This will also tell Flexsim to let the object's Flexsim color show through. -You can give it a "fstx.png" texture in order to get the Flexsim texture to show through. |
The Following 2 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Jörg Vogel (07-18-2010) |
#6
|
|||
|
|||
Hi, Phil, thanks for the multiple choices that you offered on this topic.
I solved my problem by adding a texture to the directory as you told me, it is so simple! You are great! But the question I wonder at right now is why you found out the material’s texture of the 3D model easily, whereas I can not. I have a few 3D models in my hands, and I encountered the same problems when I imported them into Flexsim 5.02. I attach two model in the attachment, could you tell me some information about the material’s texture of them? |
#7
|
||||
|
||||
I was able to find the object's texture by step-debugging the 3ds import code (to find out why it was behaving differently in 5.0 than in 4.52). It is possible for a Flexsim developer, but not easy. Also, it is not a usable solution for a user.
Your best bet for finding the texture is to load the file in the program that it was built in, or talk to the person who created the file. Or you could try loading the file into another 3d modeling program and try to modify it there. These particular shapes don't open well in AC3D (what most Flexsimmers use) so you would need to try a different package. |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Jason Lightfoot (07-26-2010) |
Thread | Thread Starter | Forum | Replies | Last Post |
how to change color of 3D object made in 3D Max | qin tian | Q&A | 3 | 03-26-2013 10:27 PM |
Storing a C++ class pointer in a flexsim object | Steven Hamoen | Q&A | 2 | 04-15-2010 09:19 AM |
How to partially change the color of a 3D object ? | Veronique Dossogne | Q&A | 3 | 04-06-2010 09:06 AM |
COM Object for Controlling Flexsim | Anthony Johnson | User Development | 6 | 02-25-2009 11:43 AM |
Statusbar could show more information like object state. | Steven Hamoen | Gripes and Goodies | 6 | 02-22-2008 06:38 PM |