It is currently Mon May 20, 2013 12:54 am


All times are UTC - 7 hours




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: interior lighting
PostPosted: Wed Jul 25, 2007 2:37 am 

Joined: Fri Jul 20, 2007 7:13 am
Posts: 16
Location: Germany
Hello everybody,

I am going to design something like that design, which you can find under:
http://www.altia.com/products_more_libraries.php

Could you please tell me, how can I design such an animation of light? Are they some bitmaps, which you set visible or invisible?

I use Altia 8.0, in the model library I could not find such lights I mentiond before.

Thank you a lot.

Best regards,

Merinus


Top
Offline Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2007 8:03 am 

Joined: Wed Aug 02, 2006 4:50 pm
Posts: 281
Location: Colorado
Yes, we use bitmaps for something like this. You can have one image for the dark state and a separate one for when the light is on. This is great because it allows you to add subtle touches to shadows, reflective surfaces, etc.

Since you are using 8.0, you can also overlay partially translucent PNG files to create a similar effect.

The interior lighting libraries you saw on our web page are part of the optional Automotive Library bundle which may be purchased separately from Altia Design.

Jason

_________________
Altia.com - User Interface Design Tools and GUI Software


Top
Offline Profile  
 
 Post subject: Dimming
PostPosted: Fri Jul 27, 2007 4:01 am 

Joined: Fri Jul 20, 2007 7:13 am
Posts: 16
Location: Germany
Hi Jason,

thank you very much for your quick answer.

Now I know I can use PNG for have such effect like light on/off.
In additon I want to display the light dimming. I know, I can use the meters to display a light dimming by 40% for example, but I want to show that by the light as well too...Is that possible?


Top
Offline Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2007 7:38 am 

Joined: Wed Aug 02, 2006 4:50 pm
Posts: 281
Location: Colorado
For dimming, you could use a series of images. However, we would probably do it by applying an opacity to the overlaid image/light to make it look dimmer and dimmer.

Altia interpolates opacity, so creating an animation with a range of opacity is pretty easy. Just define a state 100 (for example) where the image is 100% opaque, then set the opacity to 0% and define state 0. Now, you can play back that animation to get any level of opacity on the light image (which will look like varying intensities).

For more information on setting opacity and using the Opacity tool can be found in the Altia Design User's Guide in section 4.5.2.

Jason

_________________
Altia.com - User Interface Design Tools and GUI Software


Top
Offline Profile  
 
 Post subject: Another LED color by another parameter
PostPosted: Mon Aug 20, 2007 4:10 am 

Joined: Fri Jul 20, 2007 7:13 am
Posts: 16
Location: Germany
It's me again with the interior lighting problems!

I want to display some of my LEDs, which are normally yellow, by starting the simulation blue, if a special paramter is set to "comfort", otherwise yellow.
How can I do that?
Should I define that in the Control window and set the LED-color to blue?

Thank you.

Merinus


Top
Offline Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 12:22 pm 

Joined: Wed Aug 02, 2006 4:50 pm
Posts: 281
Location: Colorado
Yes, you could use the altiaColorFgObj or altiaColorBgObj animation in Control to set the color of a vector object.

You can also animate a color change. That is, you can set the color of an object, then define that state as an animation with the Animation editor. Then, change the color and define that as a different state of the animation.

You can also use a deck for this if you have different colors of LEDs as images that you want to display. For example, show the deck card that has the yellow image in it normally and switch to the other card when you want to show the blue image.


With the LEDs from led.dsn, you need to change the background color. For this example, the object ID was 10 (go to the property dialog and see which object ID the LED Color property affects). So, I created some Control like so:
Code:
WHEN comfort == 1
  EXPR altiaSetObj = 10
  EXPR altiaColorBgObj = "blue"
END
WHEN comfort == 0
  EXPR altiaSetObj = 10
  EXPR altiaColorBgObj = "yellow"
END

The great thing about this approach is that you can easily change the colors. If you want to change to magenta and cyan, you just have to change those 2 text fields.

Jason

_________________
Altia.com - User Interface Design Tools and GUI Software


Top
Offline Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 2:05 am 

Joined: Fri Jul 20, 2007 7:13 am
Posts: 16
Location: Germany
Hi Jason,

thanks again for your quick answer.

How do I know that the variable name of LED color is "altiaColorBgObj"?
If I want to change a Button label also in dependancy of an incoming parameter which variable I have to overwrite?

I reviewd the Altia API Reference Manual, but I didn't find such informations in there.

Merinus


Top
Offline Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 12:47 pm 

Joined: Wed Aug 02, 2006 4:50 pm
Posts: 281
Location: Colorado
altiaColorBgObj/altiaColorFgObj are built-in animations that let you change the color of any vector or text object (anything that you can assign a color to with the color picker in Altia). These animations (and other built-in animations) are described in section 7.8.9 of the Altia Design User's Guide.

Here's what it currently says:
    altiaSetObj:
    Send the object ID of the object whose color is to be modified to this animation - must be called first!

    altiaColorFgObj:
    Send a string to this animation containing an RGB value (such as “46 20 00”) or the name of a color (such as “red”) to change the foreground color of the object set by the altiaSetObj built-in animation.

    altiaColorBgObj:
    Send a string to this animation containing an RGB value (such as “046 200 0”) or the name of a color (such as “red”) to change the background color of the object set by the altiaSetObj built-in animation.

You can do a lot of neat stuff with the built-in animations described in that part of the manual (like change opacity on the fly, disable all stimulus except for certain objects, etc.).

Jason

_________________
Altia.com - User Interface Design Tools and GUI Software


Top
Offline Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 2:46 am 

Joined: Fri Jul 20, 2007 7:13 am
Posts: 16
Location: Germany
Hi Jason,

ok, I read that stuff und now I know how to deal with.

I couldn't find something about changing a text property or changing an object label.
something like this:

WHEN comfort == 1
EXPR altiaSetObj = 10
EXPR "Tab Text" = "type 1"
END
WHEN comfort == 0
EXPR altiaSetObj = 10
EXPR "Tab Text" = "type 2"
END

Is that also possible?


Top
Offline Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 12:52 pm 
V.P. of Engineering

Joined: Wed Aug 02, 2006 3:15 pm
Posts: 67
Location: Altia Colorado Springs HQ
Hello Merinus,

If the object is from one of our component libraries, such as leds.dsn, then the "Label" is what we call a Text I/O object. This means it is possible to send new text to the label in this case.

If the Label was created by just using the Text Tool in the Altia Design tool panel, the resulting text is static and cannot be changed dynamically. In this case, you want to open the Altia models readouts.dsn library or the simpler more/textio.dsn library and use one of these objects as the label. In the case of more/textio.dsn, use the object that is referred to as "simple text i/o" in the library.

If the object is from leds.dsn, readouts.dsn, or more/textio.dsn, it has a built-in "text" animation that accepts a new string. To see this animation and others, open the Animation Editor when the object is selected. For an LED from leds.dsn, the text animation will be something like:

XXX_led_name_text

where XXX is a number. For an object from readouts.dsn, the text animation will be something like:

XXX_readout_text

Finally, for an object from more/textio.dsn, the text animation will be something like:

XXX_text

These are the animations that will accept a string as in:

EXPR 123_led_name_text = "type 1"

Note that the text animation name is not in quotes. Just the string that is going to get assigned to the text animation should be in quotes.

I am writing this under the assumption that you are not using "connections" to interface between objects and instead are just using the exact animation names. If you want to learn more about connections, I recommend having a look at Chapter 9 - Adding and Modifying Connections - of the Altia Design User's Guide. If you want to learn more about Text I/O objects, check out Section 6.6.1 - Text Input/Output Object Models - in Chapter 6 - Models Libraries - of the Altia Design User's Guide.

Hope this helps.

_________________
Tom Walton
Altia, Inc.


Top
Offline Profile  
 
 Post subject: Changing the Text of a tabbar
PostPosted: Mon Sep 24, 2007 2:58 am 

Joined: Fri Jul 20, 2007 7:13 am
Posts: 16
Location: Germany
Hi Tom,

thank you very much for your detaild explanation.
I had unfortunately no time to try that stuff, but I think you didn't explain something about changig a tabbar text dynamically!?!

I have currently a problem with changig the font on my stimulation deck.
I use 2 decks, one for stimulate objects and one for displaying effects.
On the display side I used verdana 8. On the stimulate side, I have no chance to change the font and size of my text.
What should I do?


Top
Offline Profile  
 
 Post subject:
PostPosted: Mon Sep 24, 2007 5:24 am 
V.P. of Engineering

Joined: Wed Aug 02, 2006 3:15 pm
Posts: 67
Location: Altia Colorado Springs HQ
Hello Merinus,

I'm sorry, I don't understand what is meant by "stimulation deck."

In general, to change the font for an object in a card of a Deck, focus
into the card and select the object. Then set the tool to the "Text Tool"
and type a new font name in the Font Chooser or pick a font name from
on that is available in the drop down list of the Font Chooser.

There is no facility for changing a font dynamically (for example, from
control).

_________________
Tom Walton
Altia, Inc.


Top
Offline Profile  
 
 Post subject:
PostPosted: Fri Sep 28, 2007 3:32 am 

Joined: Fri Jul 20, 2007 7:13 am
Posts: 16
Location: Germany
Ok, I found a solution how to change the text of a tab.

Now, We made an executable (Matlab/Simulink models + Altia GUI).
By running the executable, we detected a very terrible performace of the simulation.
We guess, the performance problem depends on the way of dimming lights (defining opacity explaind by Jason).

example: By opening the driver door, there are some lights, wich are going on (from 0% to 100%). Near the lights I used readout-Fields for displaying the percent too. The time raising from 0 to 100 is too long and not acceptable.

What should I do? are there any tricks for solving this problem or there is another problem and I can't see it?

Thank you.

Merinus


Top
Offline Profile  
 
 Post subject:
PostPosted: Fri Sep 28, 2007 8:17 am 
V.P. of Engineering

Joined: Wed Aug 02, 2006 3:15 pm
Posts: 67
Location: Altia Colorado Springs HQ
I can understand that it might be very slow changing every state from 0 to 100 where the opacity changes 1% for each state.

Changing opacity is very CPU intensive.

I would suggest changing the state maybe only 10 times and incrementing by 10 each time (i.e., 0, 10, 20, etc. to 100). You may need to experiment with the increment. For example, maybe 20 times incrementing by 5 each time works better.

_________________
Tom Walton
Altia, Inc.


Top
Offline Profile  
 
 Post subject:
PostPosted: Fri Sep 28, 2007 9:42 am 

Joined: Fri Jul 20, 2007 7:13 am
Posts: 16
Location: Germany
Thank you very much for your quick answer.

Your suggested solution was the only solution, which I tought; but I hoped, you can tell me something about a small setting in the environment and the performance will be going well...

I deleted all that opacities and defined only 5 steps (by 5,25,50,75 and 100) for displaying dimming. I still have that performance problem.

I did another test too:
I described in my last message, that I display also the percent of dimming near my light.
I deleted all lights and tested the simulation only with the readout fields (also from 0 to 100) again and I had the same performance problem.

Should I use 5 steps for the readout fields too? Might that help?

Back to dimming:
How does altia handle the state changing?
I define yellow (RGB: 255, 255, 204) by state 5 and then define yellow (RGB: 255, 255, 153) by state 25 and so on.
Does altia update every state or will be updated first by 5 and then 25 and so on?
I ask it only, because that would an updating problem, which cause the performance problem.

Kindly regards,

Merinus


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net