[Solved]Character visibility

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
koreos
Halfling
Posts: 43
Joined: Fri Jun 20, 2014 7:05 pm

[Solved]Character visibility

Post by koreos »

I am doing character animation. Initially I have character as in attached image (screen.png). When I press key character start walking. Along with character, I moved camera too. But for some region in plane, character is seen as in attached image (screen1.png). I thought this is because of backface culling. But even after I turned off backface culling that doen't work. What is the solution for this?
Attachments
screen.png
screen.png
screen1.png
screen1.png
Last edited by koreos on Fri Oct 10, 2014 3:44 pm, edited 1 time in total.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5298
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: Character visibility

Post by dark_sylinc »

If the movement is caused by the animation only, the model will go out of its bounds; as the bounds are not updated along the animations.

There was a recent addition to Ogre, where calling Entity::setUpdateBoundingBoxFromSkeleton( true ) will automatically update the bounds based on its animation, for a small performance hit of course.
koreos
Halfling
Posts: 43
Joined: Fri Jun 20, 2014 7:05 pm

Re: Character visibility

Post by koreos »

Is that method available in ogre1.8? Because, I am currently using 1.8.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5298
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: Character visibility

Post by dark_sylinc »

No, like I said this addition is very recent.
koreos
Halfling
Posts: 43
Joined: Fri Jun 20, 2014 7:05 pm

Re: Character visibility

Post by koreos »

Is there any alternate solution for this problem in Ogre 1.8?
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: Character visibility

Post by spacegaier »

Probably not. You could try to down-port that change fro the new Ogre version to Ogre 1.8. If that works successfully, feel free to create a pull-request for it on BitBucket. Perhaps we will add it to 1.8 as well (although that has to be discussed first, since we usually only apply bug fixes to old legacy versions).
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Character visibility

Post by c6burns »

If the entity is the player character, you could set an infinite bounding box as a cheat. This means it will never be frustum culled. If it is not meant to always be visible, you can either backport the changes or update the bounding box/sphere yourself each frame using a few of your bone positions.
koreos
Halfling
Posts: 43
Joined: Fri Jun 20, 2014 7:05 pm

Re: Character visibility

Post by koreos »

setBoundingBox(Ogre::AxisAlignedBox::BOX_INFINITE) method is not working for Entity. Then how can I set this?
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Character visibility

Post by c6burns »

Code: Select all

Ogre::AxisAlignedBox aabb;
aabb.setInfinite();
ent->getMesh()->_setBounds(aabb);
koreos
Halfling
Posts: 43
Joined: Fri Jun 20, 2014 7:05 pm

[Solved]Re: Character visibility

Post by koreos »

Thanks a lot!!! Working!!! :D
Post Reply