[Bf-committers] collisions detection without gameengine

2012-04-18 Thread P2sta
Hello,

I'm working on my diploma work and I'm in need of detecting collision in 
blender without starting the game engine.

  I set a game logic to check for collisions, but I need to start the 
game engine to make the actual detection, which is unneeded.
  My teacher said to me I can edit the source code to make acces to the 
bullet physics directly without the game engine (I need just the 
collosions) so
  I get the binaries, but I'm pretty lost in where to start and what do 
I need to edit. I did searched through most of the bullet physics files, 
but didin't find anything yet. I'm new to c/c++ but I can learn fast.

I would like to keep it the way that I set the game logic and just call 
lets say bpy.ops.scene.detect_collisions() and I will get a list of 
colliding objects, if that's even possible.

So, I would like to ask if you have some ideas that could help me.


  Thank you in advance for any help!
  Zbynek Hlava

P.S. sorry for any grammer mistakes, English is not my nativ language
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] collisions detection without gameengine

2012-04-18 Thread P2sta
Thank you guys!

I checked the BulletDev and as Sergej said, there is nothing for 
collisions right now and it is something really different from what I 
think I need atm.

What I need is to check for collisions between objects without runing 
the game engine.
I make a python script for detecting collisions between boxed-looking 
bounding boxes, but it work slow and only it is accurate only for simple 
objects.
Now I need is to make a check between really complex objects. I did 
tried it to detect it in the game engine and it works really great, it's 
fast and accurate. But I need to start the game engine, which is not needed.

I would like to have a possibility to edit the binarier somehow, so I 
can do collisions detection without starting the game engine. I though 
it will be easy, just take few lines from the game engine and put them 
somewhere else. But I'm looking at the files for more then two weeks now 
and I can't find anythnig useful. I'm really new into C/C++ it may be my 
problem.

Have a nice day,
Zbynek


Dne 18.4.2012 17:54, Sergej Reich napsal(a):
> There is pretty much no API for collision detection in the BulletDev
> branch.
> The only thing you can do is setting up rigid body simulations.
>
> Adding it would be possible of course, but I don't think it would be
> useful right now except for a couple of fringe cases.
>
> If it's needed for the diploma we could add some collision detection
> functionality in a separate branch.
> It won't be completely straightforward though and would probably require
> a couple of hacks to work.
> I could look into it over the weekend when I get some free time if you
> want.
>
> Keep also in mind that the game engine and the rigid body simulation in
> the BulletDev branch are two completely separate systems, so reusing
> each others data won't be easy.
>
> Regards, Sergej.
>
> Am Mittwoch, den 18.04.2012, 13:09 +0200 schrieb Lukas Tönne:
>> Hi,
>>
>> You might be interested in the Bullet Integration branch by Joshua
>> Leung (aligorith) [1]
>> This implements Bullet physics, including all common collision shapes,
>> in the main Blender scene, without the need to use the game engine. I
>> don't know how complete the python API is though, better ask Joshua
>> himself about this.
>>
>> Cheers
>>
>> Lukas
>>
>>
>> [1]
>> https://gitorious.org/~aligorith/blenderprojects/aligoriths-blender/commits/BulletDev
>>
>>
>> On Wed, Apr 18, 2012 at 11:59 AM, P2sta  wrote:
>>> Hello,
>>>
>>> I'm working on my diploma work and I'm in need of detecting collision in
>>> blender without starting the game engine.
>>>
>>>   I set a game logic to check for collisions, but I need to start the
>>> game engine to make the actual detection, which is unneeded.
>>>   My teacher said to me I can edit the source code to make acces to the
>>> bullet physics directly without the game engine (I need just the
>>> collosions) so
>>>   I get the binaries, but I'm pretty lost in where to start and what do
>>> I need to edit. I did searched through most of the bullet physics files,
>>> but didin't find anything yet. I'm new to c/c++ but I can learn fast.
>>>
>>> I would like to keep it the way that I set the game logic and just call
>>> lets say bpy.ops.scene.detect_collisions() and I will get a list of
>>> colliding objects, if that's even possible.
>>>
>>> So, I would like to ask if you have some ideas that could help me.
>>>
>>>
>>>   Thank you in advance for any help!
>>>   Zbynek Hlava
>>>
>>> P.S. sorry for any grammer mistakes, English is not my nativ language
>>> ___
>>> Bf-committers mailing list
>>> Bf-committers@blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] collisions detection without gameengine

2012-04-18 Thread P2sta
Yes I need to do it without the game engine, it's requested by my leader.

Dne 18.4.2012 20:45, Mr Rasmus Lerchedahl Petersen napsal(a):
>> Now I need is to make a check between really complex objects. I did
>> tried it to detect it in the game engine and it works really great, it's
>> fast and accurate. But I need to start the game engine, which is not
>> needed.
> I understand that you do not need to start the game engine. But are you
> sure that you need to not start the game engine? If not, that would seem
> to simplify your task?
>
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] collisions detection without gameengine

2012-04-18 Thread P2sta
thanks man,


well I have made a python script that can detect oabb. But now I need to 
check collisions  between really complex objects. My diploma was 
originaly designed to make just python scripts, but  I don't think I can 
make it for such complex objects, so it will be better to edit api to 
use the bullet for the detection.

Dne 18.4.2012 22:13, Francesco Zoffoli napsal(a):
> Are performances a problem?
>
> Do you have very fast/small objects? (otherwise, tunnelling may be a
> problem)
>
> If no, i think it is simpler to just write a python script.
> I think you can set up a callback to be called each frame change.
>
> In this script you just check with a simple AABB collison
> checkwhich pair of meshes' bounding
> box collide, and then perform a vertex check
> for the two meshes(in this case, you can export the list of vertices of the
> 2 objects, and then feed them to a small program that just read them, sets
> up the bullet physic world, and run the bullet simulation. Or you can write
> it in python, but if you have convex shapes this can be a bit tricky.), and
> update the two vectors. The ammount of thing to learn should be less than
> changing blender code, especially since you don't know c/c++, but this is
> an hack, and wouldn't work for complex scenarios..
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] collisions detection without gameengine

2012-04-20 Thread P2sta
I got an idea yesterday, not really sure if it's easier or it's stupid. 
So please let me know what you think about it.
Well instead of getting the physics out of the game engine I think it 
will be enough to disable the rendering part of the game. So when I 
start the game it will detect the collisions, but it will make no visual 
change with the blender window. I have set a game logic that automaticly 
quit the game when the detection is done, so this could be the way to go 
in my diploma, not really sure tho.

I still think it will be a lot better to get the physics out, but I'm 
short on time and this could work as well (in my case)...I'm just not 
really sure if this is easier to make, so I would like to get some of 
your opinions about it.

Thanks, P2sta



Dne 18.4.2012 20:52, Tobias Oelgarte napsal(a):
> I would be more then happy if the physics part of the game engine would
> also be availabe inside the render part. There are really many scenarios
> that aren't possible with softbody and cloth alone, starting from a
> simple billiard example up to rag dolls. Setting up the game engine just
> to record the IPOs is an really awkward way to do such stuff.
>
> Tobias Oelgarte
>
> Am 18.04.2012 18:12, schrieb Tom M:
>> You might just look at using the bullet stuff that is completely external
>> to blender.
>>
>> I think erwin has a few code demos in the source somewhere.  Also that
>> allows you to use bullets opencl implementation etc.
>>
>> LetterRip
>>
>> On Wed, Apr 18, 2012 at 9:03 AM, P2sta   wrote:
>>
>>> Thank you guys!
>>>
>>> I checked the BulletDev and as Sergej said, there is nothing for
>>> collisions right now and it is something really different from what I
>>> think I need atm.
>>>
>>> What I need is to check for collisions between objects without runing
>>> the game engine.
>>> I make a python script for detecting collisions between boxed-looking
>>> bounding boxes, but it work slow and only it is accurate only for simple
>>> objects.
>>> Now I need is to make a check between really complex objects. I did
>>> tried it to detect it in the game engine and it works really great, it's
>>> fast and accurate. But I need to start the game engine, which is not
>>> needed.
>>>
>>> I would like to have a possibility to edit the binarier somehow, so I
>>> can do collisions detection without starting the game engine. I though
>>> it will be easy, just take few lines from the game engine and put them
>>> somewhere else. But I'm looking at the files for more then two weeks now
>>> and I can't find anythnig useful. I'm really new into C/C++ it may be my
>>> problem.
>>>
>>> Have a nice day,
>>> Zbynek
>>>
>>>
>>> Dne 18.4.2012 17:54, Sergej Reich napsal(a):
>>>> There is pretty much no API for collision detection in the BulletDev
>>>> branch.
>>>> The only thing you can do is setting up rigid body simulations.
>>>>
>>>> Adding it would be possible of course, but I don't think it would be
>>>> useful right now except for a couple of fringe cases.
>>>>
>>>> If it's needed for the diploma we could add some collision detection
>>>> functionality in a separate branch.
>>>> It won't be completely straightforward though and would probably require
>>>> a couple of hacks to work.
>>>> I could look into it over the weekend when I get some free time if you
>>>> want.
>>>>
>>>> Keep also in mind that the game engine and the rigid body simulation in
>>>> the BulletDev branch are two completely separate systems, so reusing
>>>> each others data won't be easy.
>>>>
>>>> Regards, Sergej.
>>>>
>>>> Am Mittwoch, den 18.04.2012, 13:09 +0200 schrieb Lukas Tönne:
>>>>> Hi,
>>>>>
>>>>> You might be interested in the Bullet Integration branch by Joshua
>>>>> Leung (aligorith) [1]
>>>>> This implements Bullet physics, including all common collision shapes,
>>>>> in the main Blender scene, without the need to use the game engine. I
>>>>> don't know how complete the python API is though, better ask Joshua
>>>>> himself about this.
>>>>>
>>>>> Cheers
>>>>>
>>>>> Lukas
>>>>>
>>>>>
>>>>> [1]
>>>>>
>>> https://gitorious.org/~aligorith

[Bf-committers] game engine without visual

2012-04-24 Thread P2sta
Hello,

I would like to know if it's possible to make the game run on the 
background (without any visual part). I mean when I hit start game 
button, I need only a physics to make collision detection, no rendering.

Can anybody help me wtih that or at least give me some tips how to get 
this done?

Thanks in advance,

Zbyněk
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] game engine without visual

2012-04-25 Thread P2sta
Thanks for answer,

uhm, can you please expline me the second possibility you wrote a bit 
more. I'm not really sure I do understand what to do.

Thanks,

Zbyněk

Dne 24.4.2012 22:06, Campbell Barton napsal(a):
> Hi. there are a few ways you could that this,
>
> we have headless build option for ghost. - in cmake its WITH_HEADLESS,
> this builds a blender which does not link with X11 (or do any
> windowing).
>
> You could look at enabling this build flag and then adding ifdef's in
> the BGE to comment out drawing code.
>
>
> Another way would be to use G.background (or some BGE variable
> initialized from G.background) and have the BGE check for background,
> this has the advantage that you wouldn't need  a custom build to take
> advantage of the feature.
>
>
> On Wed, Apr 25, 2012 at 4:26 AM, P2sta  wrote:
>> Hello,
>>
>> I would like to know if it's possible to make the game run on the
>> background (without any visual part). I mean when I hit start game
>> button, I need only a physics to make collision detection, no rendering.
>>
>> Can anybody help me wtih that or at least give me some tips how to get
>> this done?
>>
>> Thanks in advance,
>>
>> Zbyněk
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] game engine without visual

2012-05-02 Thread P2sta
Bump,

guys is here anybody that can expline me a little more what Campbell 
adviced me?
I'm sorry for being such a noob, but I really need this get done asap.


Thanks in advance,

Zbyněk

Dne 24.4.2012 22:06, Campbell Barton napsal(a):
> Another way would be to use G.background (or some BGE variable
> initialized from G.background) and have the BGE check for background,
> this has the advantage that you wouldn't need  a custom build to take
> advantage of the feature.
>
>
> On Wed, Apr 25, 2012 at 4:26 AM, P2sta  wrote:
>> Hello,
>>
>> I would like to know if it's possible to make the game run on the
>> background (without any visual part). I mean when I hit start game
>> button, I need only a physics to make collision detection, no rendering.
>>
>> Can anybody help me wtih that or at least give me some tips how to get
>> this done?
>>
>> Thanks in advance,
>>
>> Zbyněk
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] game engine without visual

2012-05-03 Thread P2sta
Hey,

Thanks for answer, I was trying to make the build but I didn't sucseed. 
Well I made the build as Campbell suggested, which was made without 
problems, but the game still renders when I start it. I guess i'm doing 
it wrong.

What I need is to make the game (when I start it in blender (pressing P 
button)) to not show up, just run without visual part( I need only 
physics), so no rendering will be visible when the game is started in 
Blender.

Sorry for being confusing, I'm not really good in explaining things.

Zbyněk

Dne 3.5.2012 10:05, Brecht Van Lommel napsal(a):
> I don't know if I understand this correctly, but do you want to do
> something like the "Record Animation" option in the Game menu? Where
> when you run it the physics is recorded to animation curves. It still
> showing the game then though, so you would need to disable that
> somehow. The main entry point into the game engine from Blender is the
> function "StartKetsjiShell".
>
> Campbell gave some hints about how to build Blender where it doesn't
> open any windows, just running in the console. I'm not sure if that is
> what was being requested?
>
> Anyway, you will need to dive into the code and ask more specific
> questions. If it's too difficult to understand the code at the level
> were you can be more specific, it will be very difficult to try to
> implement the actual changes.
>
> Brecht.
>
> On Thu, May 3, 2012 at 8:33 AM, P2sta  wrote:
>> Bump,
>>
>> guys is here anybody that can expline me a little more what Campbell
>> adviced me?
>> I'm sorry for being such a noob, but I really need this get done asap.
>>
>>
>> Thanks in advance,
>>
>> Zbyněk
>>
>> Dne 24.4.2012 22:06, Campbell Barton napsal(a):
>>> Another way would be to use G.background (or some BGE variable
>>> initialized from G.background) and have the BGE check for background,
>>> this has the advantage that you wouldn't need  a custom build to take
>>> advantage of the feature.
>>>
>>>
>>> On Wed, Apr 25, 2012 at 4:26 AM, P2stawrote:
>>>> Hello,
>>>>
>>>> I would like to know if it's possible to make the game run on the
>>>> background (without any visual part). I mean when I hit start game
>>>> button, I need only a physics to make collision detection, no rendering.
>>>>
>>>> Can anybody help me wtih that or at least give me some tips how to get
>>>> this done?
>>>>
>>>> Thanks in advance,
>>>>
>>>> Zbyněk
>>>> ___
>>>> Bf-committers mailing list
>>>> Bf-committers@blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] game engine without visual

2012-05-04 Thread P2sta
Hi,

thanks for answer, Sergej Reich already helped me to get this working :)

Thanks all for help especialy to Sergej!


Have a nice day,

Zbyněk

Dne 4.5.2012 10:13, Campbell Barton napsal(a):
> Hi, you say it still renders, even though you made some changes (ifdef
> or if(!G.background) some code) - obviously the calls are still
> running, suggest you add a breakpoint on some drawing call - break on
> `glBegin` once the BGE is running.
>
> Then repeat - you should be able to read the code which shouldn't be
> running, add breakpoints - check why it runs, ifdef the code and
> iterate on this. It shouldn't be especially difficult - though some
> thought needs to go into exactly what parts of the code to skip.
>
>
> On Thu, May 3, 2012 at 6:17 PM, P2sta  wrote:
>> Hey,
>>
>> Thanks for answer, I was trying to make the build but I didn't sucseed.
>> Well I made the build as Campbell suggested, which was made without
>> problems, but the game still renders when I start it. I guess i'm doing
>> it wrong.
>>
>> What I need is to make the game (when I start it in blender (pressing P
>> button)) to not show up, just run without visual part( I need only
>> physics), so no rendering will be visible when the game is started in
>> Blender.
>>
>> Sorry for being confusing, I'm not really good in explaining things.
>>
>> Zbyněk
>>
>> Dne 3.5.2012 10:05, Brecht Van Lommel napsal(a):
>>> I don't know if I understand this correctly, but do you want to do
>>> something like the "Record Animation" option in the Game menu? Where
>>> when you run it the physics is recorded to animation curves. It still
>>> showing the game then though, so you would need to disable that
>>> somehow. The main entry point into the game engine from Blender is the
>>> function "StartKetsjiShell".
>>>
>>> Campbell gave some hints about how to build Blender where it doesn't
>>> open any windows, just running in the console. I'm not sure if that is
>>> what was being requested?
>>>
>>> Anyway, you will need to dive into the code and ask more specific
>>> questions. If it's too difficult to understand the code at the level
>>> were you can be more specific, it will be very difficult to try to
>>> implement the actual changes.
>>>
>>> Brecht.
>>>
>>> On Thu, May 3, 2012 at 8:33 AM, P2stawrote:
>>>> Bump,
>>>>
>>>> guys is here anybody that can expline me a little more what Campbell
>>>> adviced me?
>>>> I'm sorry for being such a noob, but I really need this get done asap.
>>>>
>>>>
>>>> Thanks in advance,
>>>>
>>>> Zbyněk
>>>>
>>>> Dne 24.4.2012 22:06, Campbell Barton napsal(a):
>>>>> Another way would be to use G.background (or some BGE variable
>>>>> initialized from G.background) and have the BGE check for background,
>>>>> this has the advantage that you wouldn't need  a custom build to take
>>>>> advantage of the feature.
>>>>>
>>>>>
>>>>> On Wed, Apr 25, 2012 at 4:26 AM, P2sta  wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I would like to know if it's possible to make the game run on the
>>>>>> background (without any visual part). I mean when I hit start game
>>>>>> button, I need only a physics to make collision detection, no rendering.
>>>>>>
>>>>>> Can anybody help me wtih that or at least give me some tips how to get
>>>>>> this done?
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> Zbyněk
>>>>>> ___
>>>>>> Bf-committers mailing list
>>>>>> Bf-committers@blender.org
>>>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>> ___
>>>> Bf-committers mailing list
>>>> Bf-committers@blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>> ___
>>> Bf-committers mailing list
>>> Bf-committers@blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers