Yeap you can do that with Ephestos, or you will be able to do it shortly.
You can send data from pharo to blender but you cannot send data from
blender to pharo. But thats is just a matter of adding a small of piece of
code in python side so I will implement it probably today. So yes I hope
this week if not today pharo inspector to be able to inspect blender data.
I am not sure about the updating though, inspector update its display when
the data changes to display the latest data , that would require to keep
sending messages to blender to fetch the latest data, its not hard at all
just that inspector will have to be modified to do that.I am not familiar
with inspector internal so that is up to pharoers to do.   So you can now
change any model data inside Blender , not just geometry data but anything
like textures, materials, animation data and tons more. The Python API has
the same access to data structures that the Blender source has so in that
department Ephestos is extremely powerful.

I have not hooked Ephestos to the Blender Game Engine yet, again that
should not be more than an afternoon of work, so I will do it eventually.
It may not even needs a change , most likely it wont , just a case of
importing a python module.

Shared 3d model ? sure that is also doable, when I add to Ephestos the
ability to retrieve data from blender you will be able to create your own
3d model, your own pharo objects to wrap blender python objects. Generally
you will be able to do anything you can do with Blender from Pharo. The
only limitation is not expect the socket used by Ephestos to able to
retrieve  GBs or even MBs of Blender data in an instant, usually the kind
of data that is that big is only the geometry data itself that can be
millions of polygons. This is where a FFI solution would be better than my
solution using sockets. But then would you want to play with GBs of data in
pharo ? I think not.

Be warned that Ephestos maps 1 by 1 to the Blender API , that means you
have to learn the Blender API and if I implement support for Blender Game
Engine then you will need to know the Blender Game Engine API if you want
to create a game or a realtime interactive 2d or 3d demo of some sort. Some
knowledge , just the basic stuff , of python is desirable too. The only
difference is that instead of coding in python you code in pharo.

Ephestos has access to all python libraries, and by everything I mean
everything . So if you dont want to use the BGE  you can use another game
engine as long it supports cpython. Unity can work with ironpython from
what I read, Ephestos may not work out of the box in that case but with
minor modifications it should not be more than a hour of work to get Unity
working with Pharo. Again I leave that to anyone that is seriously
interested. Ephestos is super simple, very basic socket code, so its easy
to port around. The only tricky part is how I parse Pharo syntax to python
syntax using regex but I think the code is clear enough to be understood by
any experienced pharo coder. Probably it can be improve in many diffirent
ways too. The syntax parser however is limited to basic python syntax, like
accessing objects , global variables and calling methods and functions. For
more advanced stuff like defining python classes, functions, list
comprehensions etc you will need to use python syntax inlined inside your
Pharo code which Ephestos also offers as fallback. The parser could be
expanded to more advanced python syntax I may improve that area in the
future. But then I dont I have a problem writing some code in python from
pharo.

But as I said, the challenge is not using Ephestos but learning Blender and
its API which both have a steep learning curve because they offer a ton of
functionality. But then the same problem you will face using any of the
very powerful Game engines out there.

On Mon, Sep 15, 2014 at 12:30 PM, Hilaire <hila...@drgeo.eu> wrote:

> May be I wrongly expressed: imagine a 3D game whose model world is in
> Pharo then rendered in Blender (I guess model data need to be share between
> Pahro and Blender, but graphic only reside on Blender). Now you could use
> the Pharo dev tools like inspector & al. to play with your games.
> With DrGeo analogy: it will be more like a shared 3D model between Pharo
> and Blender, and controlled from Pharo.
>
> Le 15/09/2014 11:02, kilon alios a écrit :
>
>> It depends what you mean by control blender. Blender is 2 things a)
>> C/C++ source code that implements all features that users use b)  the
>> Python API that allows to use all features that a user can use. Ephestos
>> already allows full access to (b) . So for example if you wanted Dr Geo
>> to export its data to blender so Dr Geo can convert its geometry to 3D
>> and use all the nice features of blender you can do that already with
>> ephestos. But for modifying existing functionality you need to get your
>> hands dirty with the source. Implementing new fuctionality like
>> importers / exporters etc is also doable via API so its doable via
>> Ephestos. But cpu intense new fuctionality is done by modifying the
>> source.
>>
>>
>
> --
> Dr. Geo - http://drgeo.eu
> iStoa - http://istao.drgeo.eu
>
>
>

Reply via email to