Skip to main content

a question about object shielded

6 replies [Last post]
chowchow616
Offline
Joined: 2007-01-09

First I am so sorry about my poor English.

I am a Chinese graduate student. Nowadays, I'm coding a program about parachute. I meet some problems.

When parachute land on the earth, the rope of the parachute is above the earth. So the rope can be seen. But, to my surprise, the part of the rope which intersect to the earth is covered by the earth. it cannot be seen. I don't know why.

IndexedLineArray is used of making the rope of parachute. Earth is simply a quadrangle, and texture of the earth is a picture of grassland from Internet.

The state of parachute is always erect. It doesn't deform after it land on the earth.

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pepe
Offline
Joined: 2003-06-10

oops. sorry for double post.

chowchow616
Offline
Joined: 2007-01-09

Hi pepe,

I think your advice may be right. But when I split the quadangle into 16 parts(a IndexedQuadArray with 25 points and 16 faces), the result didn't change.

At last, I transformed the shape to vrml model then loaded it, the problem was solved. The vrml model's geometry is as the same as the original model. It is a huge quadangle as you said.

zesharp
Offline
Joined: 2006-12-21

Hi,

I guess you have to program your parachute geometry to detect collision and deform itself. It is not an automatic thing, neither a easy task.

A possible approach, as Java3D supports CG and GLSL vertex and pixel shaders, is you using it to detect collision and deform your parachute.
Use Google to search for CG and GLSL shaders for mesh collision detection and deformation.
Some websites : Shadertech.com and CodeSampler.com

chowchow616
Offline
Joined: 2007-01-09

I didn't use any collision detection.

The program is not so difficult of your thought. Land is only a quadangle. Coordinate of the land is set when i code. And the movement of parachute is realized by Behavior Class.

The core algorithm is like this:
if(parachute's position==land's postion)
parachute stops move;

The scenegraph is:
root.addChild(movementBehavior);
root.addChild(parachuteTG);
root.addChild(landBG);

Is there possibly something wrong with appearance attributes of parachute's rope? or something wrong with my scenegraph?

pepe
Offline
Joined: 2003-06-10

Seeing your screenshot, i wondered if your ground was a huge quadrangle.
It seems that due to depth sorting, your ground is rendered AFTER your parachute. this ought not to be a problem, but it seems that the lines are not drawn with zbuffer on.
In a general case, avoid using huge polygons, because this will cause you big problems with sorting and sometimes they render bad.

Try to break it up in smaller parts and check why lines are not using depth buffer.

pepe
Offline
Joined: 2003-06-10

Hello.
My english is not better, so maybe a screenshot or two can help us understand your problem.

Can you please post some?