|
Calculator
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
Calculator // Interactive Artwork
Post by Wigand // Jan 15, 2007, 11:07am
Wigand
Total Posts: 462
|
Ok, there are still some bits I must correct. But please try my
Calculator ( the LED display is one from ProfessorKhaos)
If you test it, please click only on the green cylinders, not on the numbers.
Check active of the 'selection change' (I think there is a bug, it is not possible to activate it automatically).
Don't do bad calculations like 1/0. And close every "(".
If I export the sceene and import it into Trueplay, I see nothing, why?
I must deactivate/activate the 'Selection Change', why?
The filesize is very large, why?
If you have ideas or suggestions, let me know. Maybe there is someone
who can make a better design for the calculator? |
Post by trueBlue // Jan 15, 2007, 11:37pm
trueBlue
Total Posts: 1761
|
Howdy Wigand,
Nice project!
1.) Try the Pause Activity as shown in screen grab.
2.) You should Glue as Sibling or Encapsulate 3D your text to cyclinder to make them one each.
3.) To use this in truePlay you have to make a Recording of it. But for some reason your Calculator does not work in truePlay1.21. Could be because it is going through some changes.
4.) Not sure why you saved it as a Model file (scn) but you should save it on the Player side as a RsObj or RsScn file.
5.) Professor Khaos recently updated his LED Display and they are way smaller in file size then the one you used. Here:
http://forums1.caligari.com/truespace/showpost.php?p=21800&postcount=31 (http://forums1.caligari.com/truespace/showpost.php?p=21800&postcount=31) |
Post by Wigand // Jan 16, 2007, 11:11am
Wigand
Total Posts: 462
|
[QUOTE=trueBlue;22481]Howdy Wigand,
Nice project!
Thank You! Yet one who answered. :)
1.) Try the Pause Activity as shown in screen grab.
Done.
2.) You should Glue as Sibling or Encapsulate 3D your text to cyclinder to make them one each.
Done
3.) To use this in truePlay you have to make a Recording of it. But for some reason your Calculator does not work in truePlay1.21. Could be because it is going through some changes.
Recordfile created.
4.) Not sure why you saved it as a Model file (scn) but you should save it on the Player side as a RsObj or RsScn file.
Done
5.) Professor Khaos recently updated his LED Display and they are way smaller in file size then the one you used. Here:
Oh his work is incredible good. :banana:
Now I added Error-handling.
Align the displaynumbers to the right side.
Eliminated leading zeros.
Managed paranthesises.
Still problem with the 'aktivate check box'.
More features? |
Post by spacekdet // Jan 16, 2007, 1:12pm
spacekdet
Total Posts: 1360
|
Using truePlay 1.21 here.
rcd file loads but the calculator is non-functional.
RsScn file loads a blank scene.
Red numbers on dark green buttons= hard to see. |
Post by prodigy // Jan 16, 2007, 2:44pm
prodigy
Total Posts: 3029
|
MMM excelent work.. but i have a question.. why you need a calculator over the trueplay?? |
Post by trueBlue // Jan 16, 2007, 3:03pm
trueBlue
Total Posts: 1761
|
Still problem with the 'aktivate check box'.
Here try this works in truePlay1.21 too: |
Post by Wigand // Jan 16, 2007, 6:24pm
Wigand
Total Posts: 462
|
Thank you TrueBlue!
Now it works in Trueplay. :) I see wat you have done. But do I understand?
You switch activation off and on by this object, the same procedure what I
done by clicking.
spacekdet:
<-Using truePlay 1.21 here.
<-rcd file loads but the calculator is non-functional.
TrueBlue changed something, now it works
<-RsScn file loads a blank scene.
I don't know why. Is here someone who knows? :confused:
<-Red numbers on dark green buttons= hard to see.
What would you like? Change it and show us, if you want. :) |
Post by trueBlue // Jan 16, 2007, 7:11pm
trueBlue
Total Posts: 1761
|
Basically that script does as you say refreshes the Selection change event off then on. VB Macro Recorder was used to record clicking on Active off and on.
But also it runs automaticaly when the scene loads.
If you click on the script's icon top left you can choose to Show or Run.
I don't know why. Is here someone who knows? :confused:
Check here: http://forums1.caligari.com/truespace/showpost.php?p=21554&postcount=5 (http://forums1.caligari.com/truespace/showpost.php?p=21554&postcount=5)
Also look inside all of your objects and you will see that I Expanded the Transform's Matrix. That locks the objects so that a user can not move them.
Very nice Wigand and thanks! |
Post by Norm // Jan 17, 2007, 7:37am
Norm
Total Posts: 862
|
Looking very interesting so far folks.
Now I wonder if the calculator could be built so it was powered by a light source ... sort of a psydo "solar" calculator. Move it away from the light and it shuts off .. move it closer to a light and it turns on again. |
Post by spacekdet // Jan 17, 2007, 11:32am
spacekdet
Total Posts: 1360
|
Works now!
Scene is still dark and dim.
I can't change anything as I only have truePlay, not 7, but the values of the red and green are too similar. Even giving the numbers a small amount of ambient value would help. Painting them with a high contrast color-something closer to white- would be better.
It's not going to replace my standard Windows calculator, but it's still an interesting project. |
Post by Wigand // Jan 17, 2007, 11:44am
Wigand
Total Posts: 462
|
spacekdet:
<Works now!
<Scene is still dark and dim.
<I can't change anything as I only have truePlay, not 7, but the values of the red and green are too similar. Even giving the numbers a small amount of ambient <value would help. Painting them with a high contrast color-something closer to white- would be better
Please make a screencopy, so I could see.
<It's not going to replace my standard Windows calculator, but it's still an interesting project
What do you need to replace your calculator? ;)
I am still working on it. |
Post by spacekdet // Jan 17, 2007, 12:37pm
spacekdet
Total Posts: 1360
|
Keep in mind I'm running a 32 MB circa 2001 video card so I suspect that may have something to do with the awesome quality you see in the screenshot. |
Post by trueBlue // Jan 17, 2007, 2:04pm
trueBlue
Total Posts: 1761
|
Keep in mind I'm running a 32 MB circa 2001 video card so I suspect that may have something to do with the awesome quality you see in the screenshot.
Just for you Spacekdet. |
Post by Wigand // Jan 19, 2007, 9:29am
Wigand
Total Posts: 462
|
Hello TrueBlue
I tried some different options to let the user see, that a button is
pressed or not.
First, I read the object.name and then add a nummer to the Z-position:
Dim pos
Sub Execute(params)
Objectname = params.conValue("Objectname")
Set koords=Node.Value(Objectname,"ObjMatrix")
pos=koords.GetTransZ()-0.5
koords.SetTransZ(pos)
node.Value(Objectname,"Matrix")=koords
params.conValue("ZPosition") = pos
End Sub
It worked, but how can I fix the X- and Y-Position relativ to
the calculator case?
I would need a script object for every button. But this is to much work.
Is there an easier way? |
Post by trueBlue // Jan 19, 2007, 12:00pm
trueBlue
Total Posts: 1761
|
Hello trueBlue
It worked, but how can I fix the X- and Y-Position relativ to
the calculator case?
I would need a script object for every button. But this is to much work.
Is there an easier way?
Are you calling this script within your Objekt.Name script?
Seems to me that all you need is to change the Node Value of tz.
Node.Value(Objektname + "/ExpandInMatrix", "tz") = 1.5
But then you will need to reset it back after it has been unselected.
Look at the example "Click and Jump" in the Activities/Base Library.
There is an example using First and Last Selected.
On another note have you noticed a bug when selecting the same number twice?
Seems that it is selecting the cube on a second click of the same number.
Try this:
If (Objektname = scene +"/Cube") Then
Space.Select(System.ThisName())
EndIf
FYI - If you download P.K.'s lastest LED display you can cut your file size down by 50%. |
Post by Wigand // Jan 20, 2007, 3:43am
Wigand
Total Posts: 462
|
Are you calling this script within your Objekt.Name script?
No, I look for selected Objects with the same starting character in their name.
And if these objects are selected, I call two seperate scripts one "Up" and one "Down".
"Down" is called after a "pause activity". So the button goes down and then up again.
But how I said before, if the objects matrix is not
expanded, the user could move the buttons anywhere. The button should be
fixed in a relative position to the case object. Then the user could move the
whole calculator with all of its button. ( And I don't know how to manipulate
the buttons if they are encapsulated inside of the case)
Seems to me that all you need is to change the Node Value of tz.
Node.Value(Objektname + "/ExpandInMatrix", "tz") = 1.5
But then you will need to reset it back after it has been unselected.
Look at the example "Click and Jump" in the Activities/Base Library.
There is an example using First and Last Selected.
Thanks, I will look and try.
On another note have you noticed a bug when selecting the same number twice?
Seems that it is selecting the cube on a second click of the same number.
Try this:
If (Objektname = scene +"/Cube") Then
Space.Select(System.ThisName())
EndIf
I noticed that problem but had not enough time to fix it.
FYI - If you download P.K.'s lastest LED display you can cut your file size down by 50%.
I thought that I have the latest one. Maybe I have to look for it a second time.
Thank you. |
Post by Wigand // Jan 20, 2007, 5:06am
Wigand
Total Posts: 462
|
Quote:
Originally Posted by trueBlue
On another note have you noticed a bug when selecting the same number twice?
Seems that it is selecting the cube on a second click of the same number.
Try this:
If (Objektname = scene +"/Cube") Then
Space.Select(System.ThisName())
EndIf
I noticed that problem but had not enough time to fix it.
Now I tried some options to eliminate this behaviour. But I see that the problem seems to come from the standard TrueSpace feature: If you click
an object twice, the object behind that one you clicked will be
selected. So the user will click on the button again. The calculation
is ok, but only its display disappears. It disappears with your script (above)
too. So I tried to hold the last button in memory, but then I got double(retriggered) numbers. |
Post by trueBlue // Jan 20, 2007, 5:51am
trueBlue
Total Posts: 1761
|
Now I tried some options to eliminate this behavior. But I see that the problem seems to come from the standard trueSpace7 feature: If you click
an object twice, the object behind that one you clicked will be
selected. So the user will click on the button again. The calculation
is ok, but only its display disappears. It disappears with your script (above)
too. So I tried to hold the last button in memory, but then I got double(re-triggered) numbers.
Yes I noticed the double triggered numbers too, thats what led me to the Pause Activity. It still happens if you click the Buttons in the Link Editor, but not in D3D view. So far that is.
But how I said before, if the objects matrix is not
expanded, the user could move the buttons anywhere. The button should be
fixed in a relative position to the case object. Then the user could move the
whole calculator with all of its button.
If you wanted a user to be able to move, size, and or rotate your Calculator, you can not Expand the Matrix. If you do then you will have to select all of your objects and Encapsulate in 3D. But I think that you will lose your ability to select buttons.
P.K. Latest LED display to date:
http://forums1.caligari.com/truespace/showpost.php?p=21554&postcount=5 (http://forums1.caligari.com/truespace/showpost.php?p=21554&postcount=5) |
Post by Wigand // Jan 20, 2007, 7:12am
Wigand
Total Posts: 462
|
P.K. Lastest LED display to date:
http://forums1.caligari.com/truespace/showpost.php?p=21554&postcount=5 (http://forums1.caligari.com/truespace/showpost.php?p=21554&postcount=5)[/QUOTE]
Leads me to Vladimirs post about TruePlay |
Post by trueBlue // Jan 20, 2007, 7:26am
trueBlue
Total Posts: 1761
|
Oppps!
http://forums1.caligari.com/truespace/showpost.php?p=21800&postcount=31 (http://forums1.caligari.com/truespace/showpost.php?p=21800&postcount=31) |
Post by trueBlue // Jan 20, 2007, 8:34am
trueBlue
Total Posts: 1761
|
Now I tried some options to eliminate this behavior. But I see that the problem seems to come from the standard TrueSpace feature: If you click
an object twice, the object behind that one you clicked will be
selected. So the user will click on the button again. The calculation
is OK, but only its display disappears. It disappears with your script (above)
too. So I tried to hold the last button in memory, but then I got double(re triggered) numbers.
Update:
Yes this is true. Seems to work sometimes but not always.
Well maybe try a different approach.
1.) Use Keyboard keys
2.) Use Proximity Sensor |
Post by Wigand // Jan 20, 2007, 9:36am
Wigand
Total Posts: 462
|
Update:
Yes this is true. Seems to work sometimes but not always.
Well maybe try a different approach.
1.) Use Keyboard keys
2.) Use Proximity Sensor
Yes, keyboard could be easier, maybe later. But then it is not more this
feeling of interactivity.
At that time, when I had this idea of a calculator, I looked for an easy
use of mouseclicks (You can find my post in this forums) But I got no
response. :-(
Later I found this Node.FirstSelected object and finally made the calculator.
It was easier than I had thought (thanks to the eval-function)
only two extra scripts to write.
But for a calculator it is not neccessary to select the objects. I only want to
know which button is clicked. (its the selecting which brings all the problems)
There is a mouse object in the widget library, but I am not sure how I can use
it.
I saw the Proximity Sensor in the "Browser-Script" but I still would need
the "click". If the user would move over the buttons, and every button
reacts, it would be confusing. |
Post by trueBlue // Jan 20, 2007, 9:52am
trueBlue
Total Posts: 1761
|
Here is another version.
1.) Calculator is Encapsulated "Not 3D"
2.) Added Widgets.DeactivateDefaultWidgets()
3.) Added newest LED
4.) Exported Colors for Cube, Buttons, and LED.
5.) Lower right button activates the power. Uses the Highlight Evalulator and a Left click control.
6.) Updated the case.
If you wanted to scale, move, or rotate this Calculator you can go inside and select the (Cube, LED, and all Buttons (Only)) and then use the widget in D3D view. |
Post by Wigand // Jan 20, 2007, 10:09am
Wigand
Total Posts: 462
|
Wow! You' ve done it. Really great:banana:
Much work with all the color connections ;)
looks more professional.
Please, explain what your Widget object does. |
Post by trueBlue // Jan 20, 2007, 10:29am
trueBlue
Total Posts: 1761
|
It was not much work if you use the Macro Recorder to do it.
First select your object.
Activate the recorder.
Do something to the selected object and then stop the recorder.
Now select your next object and run the script.
Widgets.DeactivateDefaultWidgets() does what is says, Deactivates the widget.
I update the previous post "My Calculator.rcd" to include another option for you for a Left click with the mouse senario. Look inside the Power button to see how it works. You could use this on just the label, button, or both. It is not necessary to use the Highlighter though.
Hope this helps! |
Post by Wigand // Jan 20, 2007, 10:43am
Wigand
Total Posts: 462
|
Thank you trueBlue:jumpy:
There is still so much to learn.
I only scratched the surface. ;) |
Post by Wigand // Jan 20, 2007, 11:57am
Wigand
Total Posts: 462
|
update:
some small bugfixes. |
Post by trueBlue // Jan 20, 2007, 8:21pm
trueBlue
Total Posts: 1761
|
Hey there Wigand,
Have you noticed when you first load your Calculator and select a button for the first time nothing happens? I added one more line at the end of the scripts to the Power On button and the Activate SCE script that remedies this.
Node.Select(Space.CurrentScene() + "/Calculator/Cube")
Do you ever get the feeling that I am picking on that poor Cube to death? :D |
Post by ProfessorKhaos // Jan 22, 2007, 10:22pm
ProfessorKhaos
Total Posts: 622
|
Nice calculator Wigand! I'm going to have to comb thru all this good stuff!
I may have learned how to make meshes in scripts and modify colors but I still gotta learn how to make buttons interactive the way you have.
So much to learn I have... :)
Nice to see the wide variety of skills coming together on a project such as this. One really nice thing to see is that the interactive nature of tS7 and truePlay does lead to more collaboration, even if it's not always "realtime" online.
You guys are using my display in so many creative ways that I never even dreamed of before. Glad to see that it's of use but don't sell yourself short on credit. I just built a nifty modular part. Ya'll are putting them together in surprising new ways. I couldn't be more thrilled! :)
Someday not too distant someone will take the parts you've built and make something even bigger still. Maybe someone will build a fully functional keyboard using your number pad methods, etc...
Would be cool to develop a community created library of objects like this.
P.K. |
Post by trueBlue // Jan 23, 2007, 1:24am
trueBlue
Total Posts: 1761
|
Yes I do agree both scripts that you guys made blow me away. I started a trueSpace Repository along time ago if you guys are interested. Things like this might be hard to find as time goes on. Like for instance your chart maker Wigand, I forgot about that until just recently I saw somebody looking at it. Another great script!
http://forums1.caligari.com/truespace/showthread.php?t=1498 (http://forums1.caligari.com/truespace/showthread.php?t=1498) |
|