Culling failing on duplicated objects

View previous topic View next topic Go down

Culling failing on duplicated objects

Post  iphoniac on Tue Jan 06, 2009 10:46 am

In my app, some duplicated objects arenīt shown and itīs due to an incorrect dst value after the call to sio2ResourceCull function. We click on Center New in Blender to avoid culling problems but this is impossible with duplicated objects.

Can thid be the problem on the dst calculation with duplicated objects? How can I simulate this Center New with code?

Iīm stuck in this so any idea will be very helpfull.
Thanks in advance.

iphoniac

Posts : 62
Join date : 2008-12-11

View user profile http://thecaveaniphonegame.blogspot.com/

Back to top Go down

Re: Culling failing on duplicated objects

Post  meteors on Tue Jan 06, 2009 4:24 pm

I don't totally understand your problem, but I thought I would mention that it's a very good practice to export your objects centered at the origin. Then do your translations in code.


Best,
-joshua
avatar
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

View user profile

Back to top Go down

Re: Culling failing on duplicated objects

Post  iphoniac on Wed Jan 07, 2009 1:33 am

Yeah, perhaps I didnīt explain it quite well. In my blender file I have an object centered at the origin. In the Iphone game itīs not in the camera range but I duplicate it periodically and change the position of that duplicated objects to be just in front of the camera.

Everything is allright until this point. Some of the duplicated objects are there but you canīt see it. Iīve been looking into this and Iīve found that the dst value calculation (in sio2ResourceCull) gives a wrong value (0.0) so the object is not rendered.

I was just asking myself (and the people in the forum Smile ) what could be the reason of this wrong value and wheter this could be related to the center to the origin thing.

I hope itīs clear now.

iphoniac

Posts : 62
Join date : 2008-12-11

View user profile http://thecaveaniphonegame.blogspot.com/

Back to top Go down

Re: Culling failing on duplicated objects

Post  iphoniac on Thu Jan 08, 2009 2:48 am

A deeper trace shows some memory leaks. Iīll try to fix it.

iphoniac

Posts : 62
Join date : 2008-12-11

View user profile http://thecaveaniphonegame.blogspot.com/

Back to top Go down

Fixed leaks but not the problem

Post  iphoniac on Thu Jan 08, 2009 5:19 am

Fixed leaks.. Now instruments doesnīt show memory leaks in my code.
Object culling is fine but I still donīt see the object Mad

Iīve debugged the code and itīs supposed to show, itīs running even texture rendering function but the object is not rendered. Itīs even invisible for physics so perhaps is a problem with rigid body but culling is calculated fine and object->dst value is correct. Suspect

iphoniac

Posts : 62
Join date : 2008-12-11

View user profile http://thecaveaniphonegame.blogspot.com/

Back to top Go down

Re: Culling failing on duplicated objects

Post  iphoniac on Thu Jan 08, 2009 7:55 am

This is weird. If I set all the objects state to DISABLE_DEACTIVATION, the objects does not move but are shown. If I set it to ACTIVE_TAG, the obejcts are moving but some of them arenīt visible for the camera and the physics. confused

Any idea?

iphoniac

Posts : 62
Join date : 2008-12-11

View user profile http://thecaveaniphonegame.blogspot.com/

Back to top Go down

Re: Culling failing on duplicated objects

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum