collisions (again...)

Sheesh, what do those few hundred vertices mean to the GPU anyways.

Just hurts a modeler’s eye :frowning:
Its like having few useless variables in the code that are never used. You wont loose FPS but would you keep them?

one tiny thing you missed. the sample’s maze file has vertex-colors which are responsible for the shading. if you remove those extra vertices you’ll lose that shading too. so you need to replace it with a textures.

aside from that a few more vertices for a whole less of ugly-long-thing-triangles is a good thing.
those kind of long streched triangles arent really … nice. they often cause weired lighting,produce intersection errors when animating characters, or sometimes cause texture-tearing at narrow viewing angles.

aside from that… it’s a single-mesh game… you could throw in 10k extra vertices. it would propably still run perfectly well even on an iphone.

One rule I’m trying to keep and follow is to use quads instead of triangles. I’m pretty sure I red somewhere that Panda prefer quads too.

To follow your idea of

Changing the circke holes by simple cubes would have been better :wink:

What?

Really? I made terrains like that should i stop?

otothecleaner.free.fr/tutorials/ … el2-3.html
Edit. Tho if you mean for smoothed models then its not a problem here.

Not a problem here

Whats that?

We could use a 2048x2048 texture, but why?

Wut?

@astelix: i exported an egg file from your blend file. When i ran your BallinMaze i got an error again. That probably means im not doing something wrong. I use Blender 2.49 and chicken 81

I us’em as well so DEFINITELY you’re doing something wrong. Just make a step back, try to study deeper my files (check comments in the .blend either) and focus just the important things (the polygons optimization thing is not) and with the help of the panda3d manuals youll easily succeed.

No I mean I dont change anything at all when I export to egg.pz, but I still get an error when running the game. So probably i have a corrupted chicken if you say it should work… What version of chicken did you use?

which is this error exactly?

this again:

you’re right Anon - I did a fresh export with chicken 81 on ubuntu and I had precisely your error. I’ll dig into ASAP - meanwhile try by yourself some former chicken version if you want, to see if you find some working for this feature and maybe report back here or - better - here.

Thomas is right. Look closely, your version lacks the baked-in ambient occlusion therefore it lacks eye-candy.

Same with 71. How about you?

ok Anon I got it - was a nasty pest that I ain’t an explanation on why and when came out but it is there - if you want to fix by yourself without to wait a chicken exporter fix I’ll hint you how to do it:
in the blender source check the outliner panel the tree group called ‘holes_collide’ and do as I say (best is to change view to SR:2-mode):

  1. select just all the childs named hole_collide0 … hole_collide5 and unparen’em with ALT+p
  2. with SHIFT pressed click the maze_object subtree and CTRL+p to parent the holes to it
    now you should have the holes directly parented to the main maze object.
    Now select the logic panel and do like this for each hole_collideX object:
  3. select the next hole_collideX from the outlines (i.e. hole_collide_0)
  4. click Add property button from the logic panel
  5. change from float to string
  6. write Collide in the first box and Sphere descend in the second one (case sensitive)
    do this for all the 5 holes and then click just maze_object, SHIFT+g then 1 to select all the tree objects and export with the last chicken. I did this and now it works.

wow
The reason why this topic started was I that I had similar error when trying to use a separate file for collision geometry.
I think the problem is the Logic panel.
That “Sphere descend”, “polyset keep descend”, “polyset descend”, where can I find out what they do?

the manual is always your best friend - keep it closer :wink:

OK, thanks, I get it now, but I still get that error.


THE CODE:

import direct.directbase.DirectStart
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *

# initialize traverser
base.cTrav = CollisionTraverser()

# initialize pusher
pusher = CollisionHandlerPusher()

#########

# load a model. reparent it to the camera so we can move it.
smiley = loader.loadModel('smiley')
smiley.reparentTo(camera)
smiley.setPos(0, 25.5,0.5)

# create a collision solid for this model
smileyCollision = loader.loadModel("collisionsphere")

#########

# load a model
frowney = loader.loadModel('frowney')
frowney.reparentTo(render)
frowney.setPos(5, 25,0)

# create a collsion solid for this model
frowneyCollision = loader.loadModel("collisionsphere")
frowneyCollision.show()

#########
# ADD THE COLLISION NODE TO THE TRAVERSER AND PUSHER

base.cTrav.addCollider(frowneyCollision,pusher)
pusher.addCollider(frowneyCollision,frowney, base.drive.node())

#########

# have the one ball moving to help show what is happening
frowney.posInterval(5,Point3(5,25,0),startPos=Point3(-5,25,0),fluid=1).loop()

# run the world. move around with the mouse to see how the moving ball changes 
# course to avoid the one attached to the camera.

run()

THE BLENDER SETTINGS:

THE ERROR:

EDIT: WRONG REPLY, DELETED POST

manual says

.
So it doesnt change much ( but I doublechecked).
Thats not the problem

yep - mine was a wrong reply in a hurry and just before to launch so you got to understand.
since I guess that sample I pointed you out before is far too complicated than needed I provided another very simpler here that seems to match a bit what you were trying to do. Check that out hereand let me know.

i don getit