3dvisuals dude's Flying Saucer w/HUD

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.

3dvisuals dude's Flying Saucer w/HUD // Scriptorium

1  ...  2  3  4  5  6  |  

Post by Wigand // Sep 24, 2007, 10:34am

Wigand
Total Posts: 462
pic
But, you answered that already.


Thanks!


froo



Do you say it worked, or is it still spinning?

Post by trueBlue // Sep 24, 2007, 10:35am

trueBlue
Total Posts: 1761
pic
Wigand: I am in Shared Space at this moment if you wish to test.

Post by frootee // Sep 24, 2007, 10:40am

frootee
Total Posts: 2667
pic
Oh sorry... I have not tested it yet. I am still at work.

Post by trueBlue // Sep 24, 2007, 11:16am

trueBlue
Total Posts: 1761
pic
Okay I was able to test that two people can view from Camera at the same time and while using Joystick. When Avatar is viewing from Camera, Avatar is not positioned with Camera, which is odd. Normally that is not the case. Do not have Joystick so I could not confirm consequences when two people try to operate Joystick at same time. I do not see any jerkiness as reported, ride was smooth as butter. Also confirmed that the HUD buttons work with two people viewing from Camera and while using Joystick too. Exiting Camera view into FPN using HUD button was like parachuting down to floor. This would only happen when Joystick is in use and or Moving UFO I reckon. Other wise normally you could FPN around floor of UFO.

Post by frootee // Sep 24, 2007, 11:25am

frootee
Total Posts: 2667
pic
Cool thanks trueblue and Wigand.


Question trueblue:

Does this mean that two people can be in the saucer, viewing from the camera, and each person will have their own unique view (looking in 2 different directions) using the same camera id?


Also, did you notice any lag, since this joystick is using a timer. I'm curious regarding the reason(s) and possible solution(s) with the use of a timer in SS.


Thanks,


Froo

Post by trueBlue // Sep 24, 2007, 11:31am

trueBlue
Total Posts: 1761
pic
Two Avatars viewing from same Camera equalls same view would be my guess. HUD buttons are tied to Camera Matrix. Within this scene/place there are not many objects and in this senario were only two Avatars and so there was zero lag when using Joystick with it's Timer.

Post by 3dvisuals dude // Sep 24, 2007, 1:21pm

3dvisuals dude
Total Posts: 1703
pic
This looks really great :jumpy:
Thanks!

It may be a while before we get the functionality scripted for the dome hinge, retractable ramp/doorway and the retractable landing gear, but at least we all have the same model now with that potential and can work on it now at whatever pace we are each comfortable with.

I reduced the polys quite a lot in order to add all the extra geometry and still have the total polycount no more than 1.5 meg. I would like to have made it much lighter than that but the curved surfaces of the hull and dome demand a fairly high polycount to look even slightly good. I think next time I will make a ship which is hexagonal rather than curved, it would cut the polycount down by at least 60 percent. This is nice though for our current purposes.

We can still use the first version of course and just add this to it when we feel we've reached that point, no rush... just nice to have this alternative ready.

Glad you like it!:)

- Mark / 3dvisuals dude

Post by frootee // Sep 24, 2007, 1:32pm

frootee
Total Posts: 2667
pic
I think one of the next tests should involve using 2 saucers or other craft.


BTW 3dv... Norm asked about modelling a joystick control, so we can grab that.... whatcha think?


Froo

Post by 3dvisuals dude // Sep 24, 2007, 4:27pm

3dvisuals dude
Total Posts: 1703
pic
I think one of the next tests should involve using 2 saucers or other craft.

BTW 3dv... Norm asked about modelling a joystick control, so we can grab that.... whatcha think?

Froo

Sure, piece of cake!

I'll have it uploaded here in a couple of hours!

Good idea!:)

-Mark / 3dvisuals dude

Post by 3dvisuals dude // Sep 24, 2007, 4:31pm

3dvisuals dude
Total Posts: 1703
pic
Okay I was able to test that two people can view from Camera at the same time and while using Joystick. When Avatar is viewing from Camera, Avatar is not positioned with Camera, which is odd. Normally that is not the case.

That's cool! It's really interesting to me that the Avatar doen't have to be positioned with the camera too. There may be uses for that as well, especially for a submarine I'm working on.

Does the Avatar which is not positioned with the camera move with the ship if the ship moves?

- Mark / 3dvisuals dude

Post by 3dvisuals dude // Sep 24, 2007, 4:44pm

3dvisuals dude
Total Posts: 1703
pic
stan: Sure I am interested.
3dvisual: I have not had a chance to look at new UFO version. First thing that comes to mind is the buttons. I found that buttons Encapsulated to UFO was problematic when looking around and that is why I went the way of a HUD that is Encapsulated with Camera.

Ah, ok I didn't know that about encapsulated buttons.

Well we could still use them if we like for something, maybe D3D TRT screens with camera views, or scrap them and the console they are in to save polys... no big deal, just thought at the time they might be useful.

I'm not sure now after reading Stan's comment on widgets whether he made a joystick-like widget already or he made the commands for one and wants an object created like that to attach widget scripts to. Hmmmm. I suppose I'll make a joystick model anyway just in case he hasn't already, better too many than not enough I guess!

- Mark / 3dvisuals dude

Post by trueBlue // Sep 24, 2007, 4:45pm

trueBlue
Total Posts: 1761
pic
Well the first time I saw this several days ago I believe the Avatar was offset by a considerable amount and did move with UFO. This last time today I did not see Avatar at all. It was way out of my view. It was a quick test and not enough time to confirm what was going on. Maybe tomorrow's Scripting Meeting we can confirm what is going on there. Before the Joystick came into play it was clear that Avatar was positioned where invisible Camera was. Hopefully there will be more then one person with working Joystick.

Post by trueBlue // Sep 24, 2007, 4:54pm

trueBlue
Total Posts: 1761
pic
Sure the buttons on console could be used for something else. The problem that I experienced before HUD was that when you looked away from console you could not see buttons anymore. I believe stan the man is referring to the HUD buttons being able to click + hold + drag to move a Camera or Object. This is great because Timer would not be needed for movement.

Post by 3dvisuals dude // Sep 24, 2007, 4:54pm

3dvisuals dude
Total Posts: 1703
pic
Well the first time I saw this several days ago I believe the Avatar was offset by a considerable amount and did move with UFO. This last time today I did not see Avatar at all. It was way out of my view. It was a quick test and not enough time to confirm what was going on. Maybe tomorrow's Scripting Meeting we can confirm what is going on there. Before the Joystick came into play it was clear that Avatar was positioned where invisible Camera was. Hopefully there will be more then one person with working Joystick.

Cool. If it can be offset from the camera and yet move with the ship that makes other things possible. Excellent.

I agree on testing it all Tuesday, it sounds like a great idea for Tuesday Night! We'd have more experimenters all in the same place and time then.

I'll try to get hold of a joystick between now and then, I have one but the drivers are too old for my system and I don't see an upgrade path to XP Pro for them. Like you said, hopefully a few folks will have one and the DLL install set up for them before the meeting. I have the dll install but haven't set it up yet because of the driver issue.

Will be great if we all get it running and can run some tests then.:)

- Mark / 3dvisuals dude

Post by trueBlue // Sep 24, 2007, 5:08pm

trueBlue
Total Posts: 1761
pic
Well the Avatar being offset like that is odd to me. Not sure what it is really. I suspect it has something to do with the new additon to Joystick POV script.

Post by Wigand // Sep 24, 2007, 5:22pm

Wigand
Total Posts: 462
pic
One important thing should still be scripted:

when I use the spinning or tilting of the saucer by POV_HUD buttons,

the direction of the joystick action should use this new direction.

It would be easier to handle the joystck otherwise the action is swapped.


And for the modelers:

We could need a space station to land on. And skillness things.

I hope you understand what I mean.


Bye! I have to go to my daily job.

Post by 3dvisuals dude // Sep 24, 2007, 6:03pm

3dvisuals dude
Total Posts: 1703
pic
Well the Avatar being offset like that is odd to me. Not sure what it is really. I suspect it has something to do with the new additon to Joystick POV script.

Ok. Still it is a cool phenomenon. Maybe we can isolate what caused it and harness that for the future at some point in all this too.

I have an idea we'll stumble over a few cool things like that in all this testing, and that's a good thing.:)

- Mark / 3dvisuals dude

Post by 3dvisuals dude // Sep 24, 2007, 6:05pm

3dvisuals dude
Total Posts: 1703
pic
One important thing should still be scripted:
when I use the spinning or tilting of the saucer by POV_HUD buttons,
the direction of the joystick action should use this new direction.
It would be easier to handle the joystck otherwise the action is swapped.

And for the modelers:
We could need a space station to land on. And skillness things.
I hope you understand what I mean.

Bye! I have to go to my daily job.

OK... we have a few ideas on obstacle courses too, we can put all that together in a scene at some point soon so we can all practice our piloting skills with it!

Good idea! Thanks!

- Mark / 3dvisuals dude

Post by 3dvisuals dude // Sep 25, 2007, 2:55am

3dvisuals dude
Total Posts: 1703
pic
OK...

Here's one Alien Joystick Object that should work. The parts are named in the LE and this is designed to be scripted based on contact between the 8 directional objects and the stick.

If you need a different type or feature just let me know.

- Mark / 3dvisuals dude

Post by frootee // Sep 25, 2007, 3:56am

frootee
Total Posts: 2667
pic
Cool 3dv. And thanks for naming the items in the LE. That makes understanding things SO much easier!


BTW... What's a directional divider?


Froo

Post by 3dvisuals dude // Sep 25, 2007, 4:13am

3dvisuals dude
Total Posts: 1703
pic
Cool 3dv. And thanks for naming the items in the LE. That makes understanding things SO much easier!

BTW... What's a directional divider?

Froo

LOL... you caught me on my way to catch some z's!

The directional dividers are basically objects which prevent the stick from coming in simultaneous contact with more than one directional object at a time. The 8 directional objects for instance are named north, northeast, east, etcetera. If there were no "directional dividers" in place between each directional object, the stick is likely to come in contact with north and northeast at the same time, this way it can't.

Also the stick is boolean unioned to a sphere which is larger than the top opening of the base, so if the ship were in a gravitational area where physics applied it could not drop through the upper hole in the base when the ship is upside down. Just a precaution for future applications.;)

It was also actually built inside the UFO_v2 model and uses a DX9 shader from that to maintain some consistency with the ship. I built it there to establish proportions proper to that specific environment so when scaled it should look great there.

Time for z's....

See ya tonight!

- Mark / 3dvisuals dude

Post by Wigand // Sep 25, 2007, 7:33am

Wigand
Total Posts: 462
pic
Thanks Wigand. I will try that tonight.

Also, I had to comment out the lines for the POV control. the error message was, my joystick did not support that functionality.


Is this an expected error? Is there something else I need to modify possibly, or do you think the joystick really does not have the capability? it does not have a 'thumb-hat' on it.


Froo



Try the simplest way. Please test the On Error Resume Next

in the ReadJoystick. Maybe it helps, or you get a big crash.

So please backup your work prior testing. ;)


Sub Execute(params)


On Error Resume Next


Set fn = Node.AccessNearFnSet("Joyinit")



params.conValue("XPOS") = fn.JX(1)

params.conValue("YPOS") = fn.JY(1)

params.conValue("ZPOS") = fn.JZ(1)

params.conValue("POV") = fn.JPOV(1)




For i = 1 To 15

params.conValue("Button" & i) = fn.JBUTN(1,i-1)

Next







End Sub

Post by 3dvisuals dude // Sep 27, 2007, 12:01am

3dvisuals dude
Total Posts: 1703
pic
Hi folks, just a quick update on my immediate plans to help you all with this project:

Later tonight (Thursday) I hope to have finished two things which I'll upload to this thread if they are ready as expected:

(1) A new version of the UFO_v2 which I will upload to the same post as the original object download. I will add a new post here to let you all know when that has been done and I recommend downloading the new version of the model at that time and overwriting the original UFO_v2 model with the new version. Appearance will be identical on the new version, but the functionality will be enhanced.

I have a few things to do on modelside with axes adjustments.

If all goes according to plan, it will have the axes of the dome set to the axes centerpoint of the dome hinge so that when opening and closing the dome it will have a perfect arc of movement from the closed to open state for scripting purposes.

The same goes for the two part doorway, the parts will be aligned to the axes of the two hinges (one at the lower ship hull doorway opening and the other between the two parts of the ramp) pertaining to them each in order to facilitate a perfect arc for each when the scripting is created to open them and close them.

There is a new circular platform on the floor of the v2 ship (designed as an optional Avatar centering device for the ship) which should also be used I think as a proximity trigger object to initiate the closing of both the dome and door ramp. We will also need to hook an opening script for both to some other device which can be activated by the Avatar, or use the landing gear feet as collision triggers to activate the opening when all 4 feet come to rest.

The telescoping feet may be more of a challenge for me with regard to each axes set (each leg has 2 uniquely tilted axes) since they are uniquely tilted, although they are also each centered perfectly now in their respective telescoping angles. If I can I'll have these ready in this version for scripting as well tonight.

(2) If time permits I hope to have the first UFO Training Course Scene ready, where we will all be able to test out our new UFO Piloting Skills (this should be a laugh!) by descending vertically through a shaft and maneuvering around through (slightly larger than UFO-sized) tunnels.

If we come in contact with any of the surrounding Training Course tunnel walls, it will make "a wonderful sound" to let us (all) know we need a few more Piloting Lessons!:D

When we've conquered that, we can all then move on to the fine art of realtime shared space Avatar Abductions.:D

In the meantime thank you everyone for all the hard work you are each putting in to make this a reality for everyone. Thanks to you guys, although some folks here may not believe this is ever really going to happen, it doesn't matter at all, because very soon now they'll be experiencing it for themselves!:D

That day will make all these other days an investment we will all be very glad we made together.;)

See you all tonight.

- Mark / 3dvisuals dude

Post by 3dvisuals dude // Sep 27, 2007, 4:50am

3dvisuals dude
Total Posts: 1703
pic
OK, slight change...

I managed to correct the axes for the dome and the two door/ramp parts so that each will now arc perfectly on their object x axis for scripting purposes, and both the upper ramp part and the hinge between the ramp parts are now owned by the lower ramp part so when the lower moves it will move the hinge and upper ramp part appropriately.

As I suspected the axes work on the tilted landing legs (12 rather than 8) will be a lot of work. I'm sure I can figure it out but it won't be today. If anyone wants to take a stab at that by all means have at it, if not I'll get to it over the next few days.

The new shared space joystick controller object has been placed and scaled inside and the hull is it's owner object.

The current form of the UFO_v2 is now "UFO_v2b" and is attached to this post rather than the previous one as I indicated earlier I had planned to do, my reasoning in that is that since they appear virtually identical but are quite different axes-wise and since the new v2b version includes the joystick controller it may be easier to refer to by a new designation to avoid any related confusion over the seemingly similar downloaded versions.

This new version has had it's moving parts already rotated along their x axes, so in other words, the dome and door/ramp are both closed perfectly now and can be easily opened by rotating only their x axes.

I'll catch some z's now and get the Training Course Scene up tonight if all continues according to plan.

Thanks guys,

- Mark / 3dvisuals dude

Here's the new UFO_v2b Saucer:

Post by frootee // Sep 27, 2007, 5:20am

frootee
Total Posts: 2667
pic
Thanks Mark. The training scene sounds cool! Also to make things interesting Later, we could add a little drift to the saucer movement, so we have to be thinking on our toes with joystick control.


Wigand: I will test the joystick OnError code asap. The past couple days/nights have been busy; I tried dropping in the joystick controller Tuesday night but I had the wrong version, which only controlled pitch, roll, and yaw. I have the latest version; just need to clear out my desktop and eliminate the WIPs. Thanks!


Froo

Post by Wigand // Sep 27, 2007, 7:46am

Wigand
Total Posts: 462
pic
Hello Mark:


please remember to bind the direction of the pilots sight (HUD and POV)

to the direction of the flight (joystick). Otherwise you have problems with

interchanged left and right and back and forth.

Post by frootee // Sep 27, 2007, 3:58pm

frootee
Total Posts: 2667
pic
Hi Wigand.


Now is the kind of time I need an 'Easy Button'. They sell those at Staples here in the U.S. You press it and it says, 'That Was Easy!'


In other words, I added the line of coded you recommended:


On Error Resume Next


and I understand it, although I haven't written VBscript yet:


It means, when an error is detected, ignore it, and continue in the script.


Thanks! glad I could finally try that. Cool!


Froo

Post by Wigand // Sep 27, 2007, 5:14pm

Wigand
Total Posts: 462
pic
Froo:

I am glad to hear that.

Sometimes it is possible that the whole operation system crashes.

Because it waits for an answer but the program ignores it.

Good that it worked fine.

Post by trueBlue // Sep 27, 2007, 5:27pm

trueBlue
Total Posts: 1761
pic
Wigand: Any way to include error handling when dll is not present?

Post by Wigand // Sep 28, 2007, 7:20am

Wigand
Total Posts: 462
pic
I really don't know. I tested something but it's strange:confused:


Here some code I changed


Joyinit:



'' This is a VBScript Function Set

' Put usefull functions, constants, enumerators here and share them across your project

' Use Node.AccessFnSet / Node.AccessNearFnSet to get access here from your script commands

' Hint: do not use commands like System.ThisOwner, System.ThisName or Node.NearValue here, as they reffer to callers command location

' Hint: use Private statement to mark local variables / functions in the function set

Public Joy

Public Joyloaded_var


Public Function initjoy(p)


On Error resume Next


Set Joy= CreateObject("Joy.Joystick")



a=Joy.DInput_Init(0)


If isobject(Joy) Then

Joyloaded_var=True

Else

Joyloaded_var=False

End If


End Function


Public Function Joyloaded()


Joyloaded=Joyloaded_var


End Function



The IsObject() is a VB function and should be possible, but I could not test it yet.




And ReadJoystick object:


' Execute

' Called to execute the command

Sub Execute(params)

On Error resume Next

Set fn = Node.AccessNearFnSet("Joyinit")


If fn.Joyloaded Then

params.conValue("XPOS") = fn.JX(1)

params.conValue("YPOS") = fn.JY(1)

params.conValue("ZPOS") = fn.JZ(1)

params.conValue("POV") = fn.JPOV(1)




For i = 1 To 15

params.conValue("Button" & i) = fn.JBUTN(1,i-1)

Next


End If



End Sub


Then I changed the name of the dll call from



Set Joy= CreateObject("Joy.Joystick")



to



Set Joy= CreateObject("Joy_.Joystick")



but the joystick still works with no problem.

I would need a PC with no joy.dll to test this changes.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn