disapperaring models again

Blitz3D Forums/Blitz3D Programming/disapperaring models again

cash(Posted 2004) [#1]
I have posted similar to this before but am experiencing the same problem again fo some reason.

When I approach an animated enemy it is there okay, but as I turn the enemy models disappear. I have tried playing around with camera settings but it does not work.

I have an NVidia 128 Mb Card with latest drivers.
1,5Gb RAM
AMD 2.8 Ghz

help


Ross C(Posted 2004) [#2]
Are you using any code to hide them manually?


cash(Posted 2004) [#3]
No they reappear when I am in a certain yaw position bu disappear before they are fully out of camera view, it looks real strange.


Dreamora(Posted 2004) [#4]
sounds like the AnimMesh problem where childs disappear when their parent isn't in view anymore.


cash(Posted 2004) [#5]
I dont parent the enemies to anything,there are no chils entities.

If I export models to a different format does this fix the issue.
A lot of work


Tom(Posted 2004) [#6]
Polys of a mesh will disappear if its pivot/initial bounding box isn't in camera view, i.e, if the boned animation is moving the mesh away from the 'entity pivot', and you can see the mesh but the pivot isn't in the camera view...bye bye mesh!


jfk EO-11110(Posted 2004) [#7]
Thought this was fixed in one of the recent Updates. What Blitz Version do you use? I had the same problem too, but I didn't see it since a long time for some reason.

Also try to fix this with EntityRadius, you never know.

<b>disapperaring models again</b> sounds like the kate moss syndrom - j/k.


cash(Posted 2004) [#8]
I am using 1.87 latest.
I have tried changing radius but still no good.

Its annoying as this is the only thing affecting completing the first level.

When I am within a certain distance the enemy attacks.
Everything except the attacking arm is invisible at certain angles.


Neochrome(Posted 2004) [#9]
yeah. im haing this problem too! So its not just my models!
im using the 1.87..

if there is a fix, Mark should use EntityRadius on anim meshes to effect Camera view on these


AntonyWells(Posted 2004) [#10]
My guess is due to the dynamic nature of animated entities, Mark is only frustum culling the bounding box of the initial T-Shaped animated figure. So, obviously once animated the figure does not naturally extend to within that region, so you get unwanted culling. Or worse he simply does a point in frustum type check.

I guess it's pointless asking/making a feature request these days, but here's what I suggest.

1.Take original Model and load into a 3d app you used to EDIT/Modify the skeleton/whatever.
2.Find the anim frame that takes up the most 'spatial' space.
3.Find out the distance of the furthest vert from the centre/root node.
3.Add a dummy joint on each axis that is that distance from the centre.
But this joint shouldn't be visible, and it should NEVER move with the animation frames.

Now when b3d loads, it'll use a bigger bounding box because of these dummy joints, one that is big enough to surround the whole entity.

Of course, worse case scenario is mark is simply doing PointInFrustum checks, in which case I have no idea how to work around it.(Without access to b3d's source ;p)


cash(Posted 2004) [#11]
I am using b3d models exported from Milkshape.
Neomance, are you using the same format, if not i wont
bother trying different formats.

A real pain though.

I have tried what SpacedMan suggested ( I think) and it still
doesnt work.

Changing scale and entityradius has no affect. This is a real problem. Any other possibilities ?


AntonyWells(Posted 2004) [#12]
Did you attach a vertex to the dummy bones? In fact, you could just add dummy verts that arn't use in any tris.

If that doesn't work, it means mark grabs the bounds by going through the tris(Probably.), so you may have to do a dummy tri on a seperate surface, and alpha the dummy surface out.

If all that doesn't work, and he is using point in frustrum culling, I think it may be hard, perhaps impossible to work around. As there's no way to turn off per entity culling.


jfk EO-11110(Posted 2004) [#13]
I just tried it again, and here it works nicely. Using psionics Ant that is a hierarchy of child meshes and some bones, saved as B3D Animation. It also works with some .3DS animated Chars, taken from the Darkmatter CD and partially edited in 3dsMAX (tho the hierarchy wasn't edited).

Could it be that your top parent entity in the mesh hierarchy is a bone-pivot only (I mean in CFX)? Probably the top parent should also be connected to a mesh. Other than that I have no idea what the problem is since, as I said, it works ok here. I remember I had this problem too, some time ago, and maybe that char had an additional top pivot that was isolated from the meshes.


cash(Posted 2004) [#14]
I have now tried it with 3 different animated models and they all do the same. When the camera is face on the enemy is almost completely invisible, apart from a few bits.

When the camera is rotated about 80 degrees in either direction the enemy becomes visible again when almost out of view.

I have tried fixing a camera in different positions in the scene as well and the model still does the same. Strange thing is that the player is effectively a man infront of the camera, this moves with the camera and there is no problem with this player.

I have tested again the suggestions above but no joy.

The free "Zombie" model from turbosquid website also does the same.


Dreamora(Posted 2004) [#15]
Perhaps you are doing something else within your code that affects rendingering or the enemy


AntonyWells(Posted 2004) [#16]
I don't think it's something he's done himself, as every single character based game I've done in b3d has the same 'bug'/'problem', with psonic's zombies/ninja/soldier. Exactly same problems. Try the last cryo demo and look down at the legs, they disappear now and again at sharp angles.

I couldn't try my above suggestion, as i never did the media..but anyway.


Jeremy Alessi(Posted 2004) [#17]

When the camera is face on the enemy is almost completely invisible, apart from a few bits

When the camera is rotated about 80 degrees in either direction the enemy becomes visible again when almost out of view.



What? Post a screenshot. We need to see what you're talking about.


cash(Posted 2004) [#18]
This is the best I can offer.

Note the small rotation of the player.

http://www.tech-2.co.uk/


Jeremy Alessi(Posted 2004) [#19]
Where is the parent node for that model? In the head?

You said you're not using any sort of hide/show code right? This is just Blitz culling the model away because it's not within the camera projection?

Do a little test. Call a
CameraProject(camera, EntityX(zombie, true), EntityY(zombie, true), EntityZ(zombie, true))


and a

Text(ProjectedX(), ProjectedY(), "Zombie").


See where the projected position is ... if the zombie disapears and you see "Zombie" in the upper left hand corner of the screen ... then you know the zombie has been culled by Blitz's view frustrum. It'll also let you see the exact point on the zombie where it goes in and out.


jfk EO-11110(Posted 2004) [#20]
I totally agree :) it seems like the top pivot is offset.

you can also do this

c=createcube(zombie)

to see where your top handle position is, and if it's offset or something.

If I remember right, I had those problems too with models I exported using Milkshape.


Psionic(Posted 2004) [#21]
The parent bone is at ground level in my older models, it was used to keep track of the floor level when animating in cfx but when you walk up too close its out of view of the camera as some of you have already said and the whole model pops out of view :(


cash(Posted 2004) [#22]
Hmmm

Both of you seem to be right (JFK and Psionic). The cube appeared at the mans feet so I assume this is where the issue lies.

Now I think you know the next question..

Is there an easy way to fix this in Milkshape.

I purchased the Models for the figures as although I am reasonable at creating static items, buildings etc I cannot do people and things.

So any ideas on changing this, either at the model stage or even in the code ????


cash(Posted 2004) [#23]
Okay now I am really confused.

The problem is only apparent on animated models. Show the same model with no animation and its fine.

I contacted the person who created some of the figures and he assures me the parent bone is at the waist not feet.

I don`t really know what else to try as it has basically brought the app to a standstill.

I will try on another PC but it doesnt really help much.


Danny(Posted 2004) [#24]
(wild guess:) Have you tried lowering your camera-near value and see if that makes any difference? For example:

Camerarange camera, 0.001, 1000

?!
D.


cash(Posted 2004) [#25]
Latest update

If I create the enemies individually then it works fine.
If I use types with the copyentity function then the copied entities have the problem.

This is not good as I will need to apply AI etc for each individually loaded entity rather than to the types.


cash(Posted 2004) [#26]
Problem Solved

Upgraded from 128Mb NVidia to 256Mb FX5700 NVidia chipset.

Not ideal but works.