favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

Softbodies not visible #507

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Built 2.78 version both in Linux and Windows 7
2. Run the examples of softbody

What is the expected output? What do you see instead?
The examples of softbody simulations does not show anything. The mesh of 
softbodies is visible when the AABB is turned on but no texture is shown.

What version of the product are you using? On what operating system?
2.78 both for linux (Ubuntu 10.10) and for Windows 7

Please provide any additional information below.

I built the package with CMake in linux and with VS 2010 in Windows. The 
examples ran well, but the softbodies are invisible, any texture are viewed.

Original issue reported on code.google.com by wendellc...@gmail.com on 18 Apr 2011 at 5:50

GoogleCodeExporter commented 9 years ago
Are you using the updated Bullet 2.78 r2387? The rendering should be fixed.

Original comment by erwin.coumans on 18 Apr 2011 at 6:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, svn2387, from the Downloads page. I`m trying a fresh new installation on 
Windows 7, but previously a had the same issue on linux. In linux, I got the 
latest svn version running OK but in Windows it continues not showing soft 
bodies.

Original comment by wendellc...@gmail.com on 18 Apr 2011 at 7:26

GoogleCodeExporter commented 9 years ago
I ran the demo again and realized that the textures are shown with the option 
wireframe on, but not in normal mode.

Original comment by wendellc...@gmail.com on 18 Apr 2011 at 7:34

GoogleCodeExporter commented 9 years ago
It could be that the download of bullet-2.78.zip under windows uses the old 
(cached) version.

Can you make sure that Bullet/Demos/SoftDemo/SoftDemo.cpp has the following 
render method:

void    SoftDemo::renderme()
{
    btIDebugDraw*   idraw=m_dynamicsWorld->getDebugDrawer();

    glDisable(GL_TEXTURE_2D);
    glDisable(GL_LIGHTING);
    m_dynamicsWorld->debugDrawWorld();

    btSoftRigidDynamicsWorld* softWorld = (btSoftRigidDynamicsWorld*)m_dynamicsWorld;
    for (  int i=0;i<softWorld->getSoftBodyArray().size();i++)
    {
        btSoftBody* psb=(btSoftBody*)softWorld->getSoftBodyArray()[i];
        if (softWorld->getDebugDrawer() && !softWorld->getDebugDrawer()->getDebugMode() & (btIDebugDraw::DBG_DrawWireframe))
        {
            btSoftBodyHelpers::DrawFrame(psb,softWorld->getDebugDrawer());
            btSoftBodyHelpers::Draw(psb,softWorld->getDebugDrawer(),softWorld->getDrawFlags());
        }
    }
... etc

Original comment by erwin.coumans on 20 Apr 2011 at 6:37

GoogleCodeExporter commented 9 years ago
Yes, the render method is there as is. I observerd that the soft bodies are 
correctly drawn with the wireframe debug option on. Maybe a inverted logic 
somewhere?

Original comment by wendellc...@gmail.com on 11 May 2011 at 6:32

GoogleCodeExporter commented 9 years ago
It works fine here. Can you try to fix the issue on your side and share a patch?

Original comment by erwin.coumans on 11 May 2011 at 8:54

GoogleCodeExporter commented 9 years ago
How strange. I take the version 2.78 rev 2395 from svn today and it has this 
inverted behavior. With wireframe off, it shows no texture, wireframe on, the 
soft bodies textures is shown. Weird. I'll try to fix and surely share a patch, 
if I success. But that's very, very weird!

Original comment by wendellc...@gmail.com on 11 May 2011 at 9:00

GoogleCodeExporter commented 9 years ago
I encountered the some problem. I think the logic in 
if (softWorld->getDebugDrawer() && !softWorld->getDebugDrawer()->getDebugMode() 
& (btIDebugDraw::DBG_DrawWireframe))
was inverted.

Original comment by lemonriv...@gmail.com on 20 May 2011 at 1:14

GoogleCodeExporter commented 9 years ago
Does anyone have a fix/patch?

Original comment by erwin.coumans on 14 Jun 2011 at 6:41

GoogleCodeExporter commented 9 years ago
Should be fixed in latest trunk:

http://code.google.com/p/bullet/source/detail?r=2430

Original comment by erwin.coumans on 15 Sep 2011 at 1:20