Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,055 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Is this a candidate for physics? #17781
10/02/03 13:24
10/02/03 13:24
Joined: Sep 2000
Posts: 300
Ohio, USA
V
vrkaya Offline OP
Senior Member
vrkaya  Offline OP
Senior Member
V

Joined: Sep 2000
Posts: 300
Ohio, USA
One of my projects involves a motorized boat on a river. I want it to respond to the current speed and direction. Currently, my idea is to break the river surface up into pieces that allow me to give each piece a different texture name, then I check which texture the boat is on, and it sees the current data that way.

But, I downloaded and messed around with the Crane demo and just wonder if I'm trying things the hard way. Do you think A6 physics would make a realistic boat in a river current?

I've only got the commercial version, right now.

Thanks, Ron

Re: Is this a candidate for physics? [Re: vrkaya] #17782
10/02/03 13:35
10/02/03 13:35
Joined: Feb 2003
Posts: 2,826
Margaritaville (Redneck Rivier...
myrlyn68 Offline
Senior Expert
myrlyn68  Offline
Senior Expert

Joined: Feb 2003
Posts: 2,826
Margaritaville (Redneck Rivier...
While it can be done, I don't think it is hardly the easiest way to do it. I don't think it would be possible with commercial though either. Simulating fluid dynamits is hard. It is even hard for software which is set up to calculate a short segment of time over a long period of time (determine what will happen when a landing craft hits the water at 50 mph...that 30 second or so time period takes well over a days worth of CPU time, and is still inaccurate).

You should be able to "fake it" some and get satisfactory results using the method you are persuing right now. This post touches on some ways to use the physics engine with water though.

http://www.conitecserver.com/ubbthreads/showflat.php?Cat=&Number=288647&page=1&view=collapsed&sb=5&o=&fpart=1


Virtual Worlds - Rebuilding the Universe one Pixel at a Time. Take a look - daily news and weekly content updates.
Re: Is this a candidate for physics? [Re: myrlyn68] #17783
10/02/03 14:45
10/02/03 14:45
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
actually this isn't a bad way to fake it. You would program a diffrent texture name for each segment, say n1000. the first part of the name gives you direction, teh second the magnitude and then you add a force in response in response to the texture name.

Sounds ez to me. Just make sure to make the segments large with respect to the boat model and it should work pretty well. You could do smaller segments, but you'll likely experience very jerky accelerations.

Neat idea!

If I understand you right, this seems like the eziest way to do a river using the 3DGS A6 PE.

Re: Is this a candidate for physics? [Re: vrkaya] #17784
10/03/03 04:47
10/03/03 04:47
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
If you do not have breaking waves or other mesh deformation then this should be easy to do. I don't think using different textures is very efficient. How about using a default direction for your river and then place some invisible marker objects that player collides with to change directions and such. But that will depend on what you want to achieve in the first place.

Re: Is this a candidate for physics? [Re: Marco_Grubert] #17785
10/03/03 10:06
10/03/03 10:06
Joined: Sep 2000
Posts: 300
Ohio, USA
V
vrkaya Offline OP
Senior Member
vrkaya  Offline OP
Senior Member
V

Joined: Sep 2000
Posts: 300
Ohio, USA
Thanks for the ideas.

It's not a white-water river I'm trying to simulate, but something smoother, like the Ohio River. We regularly put boats on the river in my town and there are many things you must watch for when on moving water. There's laminar flow, eddies behind bridge columns and shore coves, dam boils, strainers, standing waves (just above rocks) etc. I would like to simulate the way a boat responds to river current. It is very interesting to operate under such conditions.

The direction of the current could change drastically - 180 degrees with eddies and boils, but I do like the method mentioned of using markers rather than textures. It even seems that there might be some use here for a State machine AI. There really wouldn't be much mesh deformation, as all movement would probably be accomplished with animated textures and u,v, animation.


Regards,
Ron

Re: Is this a candidate for physics? [Re: vrkaya] #17786
10/04/03 03:24
10/04/03 03:24
Joined: Jul 2000
Posts: 8,973
Bay Area
Doug Offline
Senior Expert
Doug  Offline
Senior Expert

Joined: Jul 2000
Posts: 8,973
Bay Area
The quickest solution (from the scripting side) would be to use "trigger volumes" to mark the eddies and things. But, from a level building and game play side, I like the idea of using textures since I imagine these water features would have different textures/animations so the player could identify what sort of behavior to expect (i.e. white-water, reverse animation, etc.).

Going from the top of my head, I would have the boat scan for the texture, look up that texture in a list (maybe just use the first letter in the texture name to make things quicker), and then use the physics values stored in the list for that frame.


Conitec's Free Resources:
User Magazine || Docs and Tutorials || WIKI
Re: Is this a candidate for physics? [Re: Doug] #17787
10/04/03 23:38
10/04/03 23:38
Joined: Sep 2000
Posts: 300
Ohio, USA
V
vrkaya Offline OP
Senior Member
vrkaya  Offline OP
Senior Member
V

Joined: Sep 2000
Posts: 300
Ohio, USA
Thanks, Doug. You're exactly right that different parts of the river would have different texture animations. I also plan on offering the player a top-down view along with a 3D view to navigate the river. I didn't even think about just checking the first letter of the texture name to speed things up.

fastlane, I forgot to reply about something you mentioned earlier. You mentioned how the changes might appear jerky as they change. I'll offer something I learned in another project where I had a character walking through rooms full of smoke. As they got closer to the fire the smoke would become denser, and less so as the walked away. I used the floor texture of each room to determine it's smoke density, and the room's smoke density affected a global smoke density. But, I just smoothly ramped between different values like this, and it was virtually unnoticeable:

Code:
 
if(room_smoke_density > current_smoke_density)
{
current_smoke_density += .01;
}
if(room_smoke_density < current_smoke_density)
{
current_smoke_density -= .01;
}



I put this inside a while() loop.

Thanks, Ron

Re: Is this a candidate for physics? [Re: vrkaya] #17788
10/05/03 07:39
10/05/03 07:39
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Ramping is nice.

Essentially it's an outside interpolation routine controling the smoke. You can definitly smooth the motion out, but my original warning was just the genral idea that if you nodes are too small (whether node is a certain smoke density or a river segment) then you won't be able to interpolate and jerkiness ensues.

All teh same, marcos ideas seems the best! It avoids having to make constant Trace_Texture calls. Much nicer!



Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1