Shockwave walk-by with collisions?

zardoz

Active member
Hi everyone,

I've been using shockwave for sometime now, but unfortunely I'm not a programmer...I am one of those that 'fishes' code all over the web...so I want to leave here some questions about this...

How hard it is to using a simple model of a house, for example (a few rooms, a hall, etc, with open doors) and using the arrow keys, 'walk' inside that house? with collisions?

Petter Sundnes (petterms here at the forums) who has helped me a lot in the past (tx petter) has something like this on his website...in his example you can walk thru the inner doors but can't thru the outside walls...

How much code does this has? Is there a way to tell shockwave that we have a collision in every polygon?

Having a way to create this would be great for me.

Tx in advance for all the help.
 

Sam_Horton

New member
Shockwave 3D and Havok Physics demo

I made a demo using the havok physics engine and Director to get some really detailed collision detection. Havok simply converts your existing geometry into collision objects, and gives you control over how complex the collision representation is (convex, concave, spherical, bounding box).

Some people complain that havok is too much, but I have had good luck with it so far.

Here's a link to the zip file w/ all the assets ready to go.
http://shorton.phpwebhosting.com/files/w3dHavokDemo.zip

Read the readme file first and determine if you need to put the 2 plugins in the director xtras folder (it will not work w/ out them).

Good luck, and let me know if this helps out.
 

zardoz

Active member
hi sam,

once again thanks a lot for your help...but as I said I'm not a programmer :help:
so I've been editing your code for my scene (just a test one) and when I press play the camera goes crazy and I can't understand how to fix this...

I have the file here...if you could look at it and teach me where is the problem...

I also send the .lwo, and the simple .lws

thanks for your help
 

Sam_Horton

New member
This file uses the setMouse xtra. I included it in the zip file so you will need to place it in the directorMX2004 -->configuration-->xtras folder. The other thing that is really important is that the stage needs to be at 100% view scale. It cannot be expanded or contracted. press ctrl+alt+zero to set the stage to 100% before viewing.

You can comment out the setMouse line (line 112 in the original file) but then you will need to change the mouse sensitivity to a more suitable number such as .01 (look for this value at the end of line 104 in the original code.

One other thing I can think of is that I made this at 800X600. If you are changing the stage size you will need to update line 112 to reflect the center of your stage.

good luck again!
 

Sam_Horton

New member
I switched your stage size to 800x600 and then stretched the w3d file to fit and it worked perfect!

The only other thing you might want to do is lower the scale of the scene in Lightwave. If you model in centemeters instead of meters and assume that 1 cm converts to 1 meter then you will be looking good. I always make a person-sized box as a point of reference to scale things by.

Havok really needs things to be scaled a certain way or the physics will seem to be in slow motion.
 

zardoz

Active member
Hi Sam,

yep, that was it! it's fixed now and working great. If I do anything that looks good with this I'll post it here and of course I'll give you the credits for oyour script.

Thanks for all the help.
 

Sam_Horton

New member
Nice website petterms!

I love to see people showing strong support for Director and shockwave 3D. Maybe Adobe will recognize what a good thing they have going and continue development.
 

mdoyle

New member
Jsut got this too, been neglecting the forums the last few weeks been really busy.

Hopefully adobe will do some stuff with shockwave, am slowly but surely getting some really nice stuff done with it and it would be a shame for it all to go to waste! :D

Still testing shadows and morphs but hopefully will be available soon :D
 

Sam_Horton

New member
Macromedia released the shockwave 3D engine way before the market was ready for it. (4+ years ago?) It would be such a waste to drop Director when things are just starting to pick up in the web-3D and casual games market, which are two of Director's strong points imo.

I've been testing out other 3D engines in preparation for the eventual switch if necessary, and they are rather painful to work with in comparrison. Even more so when you consider all the other stuff Director can do along with 3D.

I'd be happy If Adobe would just tell us what they plan on doing with the software, and stop all this secretive beating around the bush.
 

mdoyle

New member
I agree that perhaps it was slilghtly ahead of its time 4 years ago but now its going backwards as it has not benn updated. The frustrations over the last 2 years you can get with shockwave and long ways to get good results is just not needed if they made updates for it. It would be a shame to drop it as I have jsut go radiosity looking worlds and morphs jsut about working and are looking very close to F9 renders in shockwave along with good animated characters.

I am trying to organise a meeting with someone in adobe to find out if there is anything going ahead or if shockwave will be ditched. Will keep my fingers crossed.

I agree with you about other engines as they are not the best. However I am also using Poetry In Motion just now and its light years ahead of shockwave and even what shockwave can do even if it was updated. Adobe in this short period of time can't make updates that could compete with this. Its still in beta but its an engine that can use up to 100's of thousands of poly's without slowing down. It uses the core of lightwave and allows morphs, weights, bones, volumetric lighting, normals maps,lum maps, reflections, well basically anything you can do in lightwave and it converts it to real time (even volumetric lights and shadows) The beauty of it is, is that its dead easy to use and it can be web based.

It uses java script for coding and well I would say easier than flash well it doesn't even need alot of it. Its all done in lightwave!! I use shockwave alot for government and education establishments too for learners etc and am comfortable now that PIM will be as secure as any macromedia product or extra and its just so easily adaptable. It can be integrated with any multi user server or even scorm compliant databases through java. You can also still open up web sites within the app alowing for use of flash etc The list goes on but all I can say is that once it goes live you must try it!!! I didn't believe much of it till I was invited to test it and was still skeptical but now that i have thoroughly tested it I can say with alot of confidence it will be the best online engine out there. It also compiles as executables for running on pc or kiosks as well.

Here are a few screen shots from the test I am working on just now and I am getting over almost 300 fps on these rooms alone which I have also created for shockwave and max I get in shcokwave is 60fps without the "extra" stuff that PIM can offer.

Over and above I am still using shockwave and will use shockwave in parallel with PIM as it still has its uses but the more I use PIM the more I would like to forget about shockwave, I don't want shockwave to stop as I have spent 3 years getting stuff almost looking like the screen shots you see above but its tough getting running on really low spec machines, Will just need to wait and see!
 
Last edited:

zardoz

Active member
I agree with you guys.

For the last years we have been more into architechtural vizualisation and we've been looking for a good solution for interactive stuff...and it has been really hard because there are so many solutions but none is really easy to use. And we are not programmers...that's the main problem. So we have been using shockwave because it's simple to use.

But to do a simple interior walkby is really hard when you are not a programmer. And it would be nice to have a simple solution for this. The market is really big for this kind of thing.
 

mdoyle

New member
Thats what is so good about PIM. You can do a camera fly through with no coding, and well you can do a walk through with 20 lines of code (and thats just to set sensitivity of mouse and define which keys to use) which will come with PIM. For achitects and real time previews PIM will allow us non coders to be able to make some nice stuff as I am not a programmers myself.
 

Sam_Horton

New member
I was looking at PIM the other day and I have to admit I was blown away. I signed up for the beta, but so far haven't heard back from them. I had a few concerns about how much code functionality would be available, but it sounds like you will be able to do the same things that shockwave can do and much more! When it's released I will most definitely be using it.

If you are trying to meet with someone at Adobe and you haven't already contacted Tom Higgins, (product manager for Director) I would try getting in touch with him. His old email was [email protected] but who knows if that still works after the adobe merger.
 

mdoyle

New member
Yeah I think u should like using PIM especially if you are comfortable with using lightwave and know java script well.

Thanks for the email will see if I can get anything from them but am trying the adobe people in london and amsterdam just now to see if I can get anywhere,

Will keep people posted if I manage anything!
 
Top Bottom