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-01-2010
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 An example of using drawsurrogate to control transparency in Flexsim 5



Some new visual features in Flexsim 5.0 discussed below and shown in the attached example:

· Surrogate objects added with the Animation Creator
· drawsurrogate attribute
· Controlling transparency order
· Composite visuals

Surrogate objects added with the Animation Creator:

On the Properties window of an object, on the General tab, in the Appearance group, there is a group of buttons labeled “Visuals/Animations”. When you push the Edit button, the Animation Creator window opens.

When the Animation Creator window is opened on an object, three attributes are added to the object automatically within its visual node. Those attributes are drawsurrogate, resizeinfo, and animationinfo.

Pushing the + button in the upper left corner adds surrogate objects (sub-components) to your object. The final version of Flexsim 5.0 will have more documentation on how to use the Animation Creator. This example focuses on the sub-components that can be added, but doesn’t actually use the animation capabilities.

drawsurrogate attribute:

The drawsurrogate attribute allows a single object to draw multiple objects as if they were part of the original object’s shape. The surrogate objects then inherit local coordinates so that they can move, size, and rotate with the original object. This is beneficial for cases such as a multi-axis robot, where each joint’s motion affects the other parts of the robot in a hierarchical structure. The drawsurrogate attribute allows the other joints to be modeled as separate objects without affecting the main object’s content for modeling and statistical reasons. In this example, I am using surrogate objects to control the draw order for the processor base, its flowitems, and the transparent glass.

In the tree, the drawsurrogate attribute works in one of two ways. If it has text data, then you can specify a path to a container that has the surrogate objects. If the drawsurrogate attribute has no data, then it assumes the attribute itself is the container and all the objects within it will be drawn as surrogates.

By default, the objects that you add using the Animation Creator are added as contents of the main object’s drawsurrogate attribute.

Controlling transparency order:

The order in which transparent objects are drawn affects how they look. By default, Flexsim objects are drawn before their contents so that you can see the object through transparent flowitems (such as bottles). If the object has transparency, such as a glass window on a processor, then the default draw order is incorrect and you can’t see the flowitems through the glass.

This example model shows how you can have both transparency on the processor and also on the flowitems by drawing the base first, then the contents, then the glass. The contents are drawn by making an object that has no shape, but has a drawsurrogate attribute with a path back to the original object. This allows it to draw the flowitems in the processor before the glass so that you can see them through the processor’s glass. The main object also has no shape and it hides its content (Show Contents is unchecked on the General tab). This is so that the shape is entirely drawn by its surrogate objects.

Composite visuals:

Because the different parts of the processor are surrogate objects, they can be selected and moved around as a single object in the 3D view. Because all of this was done using the Animation Creator’s surrogate objects and is entirely encapsulated in the main object’s visual node in the tree, you can save the entire “composite visuals” of this object by clicking the Save button on the General tab next to Visuals/Animations. You can then load that saved “composite visual” file into other objects using the Load button for that object. This way you can make a complex visual shape using surrogate objects and easily transfer those visuals (and animations) to other objects as a single file.
Attached Thumbnails
Click image for larger version
Name:	Screenshot.jpg
Views:	754
Size:	27.3 KB
ID:	937  
Attached Files
File Type: zip GlassMachine.zip (39.8 KB, 248 views)
The Following 8 Users Say Thank You to Phil BoBo For This Useful Post:
Tom David (04-01-2010)
  #2  
Old 04-01-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

i open the model, Don't do anything.there are a lot of letters show in the glass
and i import some .skp file, Some place also chang to a lot of letters

What is the role of machine.ac , does it change the glass transparent .
What is the role of glass.png ,does it change the item transparent .
does 5.0 mechanism of making transparent change.
do not need *.tmp file
Attached Thumbnails
Click image for larger version
Name:	pic.jpg
Views:	220
Size:	35.9 KB
ID:	939  
  #3  
Old 04-02-2010
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

machine.ac is the AC3D model file for those who have AC3D. They can see how the shapes were built and designed.

If you use a png for your texture, you don't need a .tmp file for transparency because transparency is built into the png format via (R,G,B,A). The glass uses the semi-transparent png texture.


I'm not sure what is going on with the letters. We'll look into it.
  #4  
Old 04-05-2010
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Kris had the same issue with the "Matrix" look when he loaded a composite visual of a Robot that I had made. I couldn't replicate it on my machine, so it's somehow machine and/or graphics card dependent, but the media is binding to the wrong texture, namely the texture used to draw names under objects. I think it fixes itself if you reload media, but I'm not sure. We'll take a look at this some more.
  #5  
Old 04-05-2010
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 330
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

Hi,

I have also the same problem with glass showing text.
If I reload the media, the glass looks right.

Also tested to load the machine_glass.3ds into a Visual Tool, the same problem.

I did a test and exported the machine_glass to a new 3ds file and loaded that file into a Visual Tool, get the same problem. Did a Reload Media now everything is okay.
Load the model GlassMachine.fsm, now the glass is without the text and looks as expected.

If you export VRML then it looks like everything works as expected.

Lars-Olof

Last edited by Lars-Olof Leven; 04-05-2010 at 10:15 AM. Reason: Added information about VRML
The Following User Says Thank You to Lars-Olof Leven For This Useful Post:
Tom David (04-05-2010)
  #6  
Old 04-05-2010
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Also, an addendum to Phil's topic on saving the composite visuals. If you save a composite visual .t file, then make sure that the path to any media that that visual references is relative (i.e. in the same directory or a subdirectory) to the path to the .t file. If you do this, then the folder containing the .t composite visual can be zipped up and moved to different locations without messing up the paths to the media.
The Following User Says Thank You to Anthony Johnson For This Useful Post:
Phil BoBo (04-06-2010)
  #7  
Old 01-20-2011
zhang xin zhang xin is offline
Flexsim User
 
Join Date: Dec 2008
Location: China
Posts: 136
Downloads: 147
Uploads: 0
Thanks: 81
Thanked 6 Times in 6 Posts
Rep Power: 150
zhang xin is on a distinguished road
Default

1
Bobo, How do you make drawsurrogate object resize when resize yellow box?

I tried and find that attribute bodies under resizeinfo node matter.

2
If I use a drawsurrogate object in conveyor, it can resize its width, but cannot resize its length. how to solve it?

thanks
  #8  
Old 01-20-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

Quote:
Originally Posted by zhang xin View Post
How do you make drawsurrogate object resize when resize yellow box?
Press the Save Base Positions button in the animation creator. Each sub-object in the animator has Scale X/Y/Z with Main Object X/Y/Z. You can modify these values to have different axis scale with different sizers on the main object. This is helpful for rotated sub-objects.

Quote:
Originally Posted by zhang xin View Post
If I use a drawsurrogate object in conveyor, it can resize its width, but cannot resize its length. how to solve it?
The Conveyor's x size is always 1. The animator has no idea how to know how long the conveyor is because that information is stored as the Layout table instead of a simple x size.
The Following User Says Thank You to Phil BoBo For This Useful Post:
zhang xin (01-20-2011)
  #9  
Old 01-20-2011
zhang xin zhang xin is offline
Flexsim User
 
Join Date: Dec 2008
Location: China
Posts: 136
Downloads: 147
Uploads: 0
Thanks: 81
Thanked 6 Times in 6 Posts
Rep Power: 150
zhang xin is on a distinguished road
Default

thank you, bobo.

Could you give a solution on how to let a 3ds shape in a conveyor resize(or maybe duplicate itself) along length? like this /
thanks

To make my intention clearer, the default shape of conveyor is sometimes not attractive, so I want to replace it. But resize is a problem.
  #10  
Old 01-20-2011
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

haha ,I make the video,please Contact Me ,professor qing
  #11  
Old 01-21-2011
zhang xin zhang xin is offline
Flexsim User
 
Join Date: Dec 2008
Location: China
Posts: 136
Downloads: 147
Uploads: 0
Thanks: 81
Thanked 6 Times in 6 Posts
Rep Power: 150
zhang xin is on a distinguished road
Default

It seems that we can modify the x and sx(under resizeinfo node) of the surrogate object.
  #12  
Old 01-23-2011
zhang xin zhang xin is offline
Flexsim User
 
Join Date: Dec 2008
Location: China
Posts: 136
Downloads: 147
Uploads: 0
Thanks: 81
Thanked 6 Times in 6 Posts
Rep Power: 150
zhang xin is on a distinguished road
Default

No one can implement / ?
  #13  
Old 01-24-2011
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by zhang xin View Post
No one can implement / ?
I did not know why you want to know that??
I said ,I make it.
Attached Files
File Type: zip 导入图形制作的带护栏传动.zip (2.08 MB, 278 views)

Last edited by LINWEIXU; 01-24-2011 at 01:47 AM.


Thread Thread Starter Forum Replies Last Post
Version control of Flexsim model AlanZhang Q&A 11 12-09-2014 11:12 AM
Please help to control Flexsim remotely cedric molthoff Q&A 0 03-30-2010 02:25 AM
control Flexsim remotely Martin Saler Q&A 1 12-14-2007 04:35 AM


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.