[ANN] Ephestos - Using and Coding Blender from inside Pharo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
Its far from production ready but I am too excited to keep to myself. I present to you Ephestos. 

Ephestos is a socket bridge that communicates with Blender the most popular and most powerful open source 3d application. 


The goal is to expose Blender coders to the power of Pharo and Pharo to the power of Blender. As you can imagine the potential is huge but I rather talk what Ephestos can do already. 

Even though Ephestos is in total less than 200 lines of code it can already communicate with blender and affect blender properties. Blender properties are basically instance variables for any kind of blender object, 3d object, material, textures etc So already you can affect a huge deal of blender .

Unfortunately Blender operators seem to crash Blender , probably I am doing something stupid that I will fix. Blender operators are for performing blender actions so they are very important.

I have made a simple video demo of it that can be watched here


To use it you need first the Blender addon which can be found here


The code should be inside a folder named "pyEphestos" and placed in Blender addons directory which is located for Macos in Application Support/Blender/VersionsOfBlender/scripts/addons and in Windows should be in App Data/Roaming/..... or you can place it inside the blender folder in similar sub directory

You also need the Pharo code which can be found here


As I said it is far from production ready , but it works. 

The good news is that the socket communication is blazing fast, at least compared to what I expected. I was able to perform 1000 connections under a second. And each connection carries a 1024 bytes messages , thats a lot of code. Should be possible to pass thousands of lines of code under a second to Blender. 

My only worry is blender itself since it tends to be very crashy in the areas I am pushing. 

By the way Always press esc after you enable Ephestos in Blender to close the socket or else it wont free it and next time you wont be able to open the socket and you will have to restart your OS. And do not make an error with the string passed . I need to add an exception for it so it wont crash blender.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

Sean P. DeNigris
Administrator
kilon alios wrote
The goal is to expose Blender coders to the power of Pharo and Pharo to the
power of Blender
Cool! I want this :)
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

Ben Coman
In reply to this post by kilon.alios
I don't have time to play, but this looks very very cool.  At a minimum,
its a great demonstration of Pharo/Smalltalk playing-well-with-others.

Some feedback on the video presentation, zooming in on the workspace to
make the text more readable in low-def video streams, then zooming out
just before it is executed would be useful.

cheers -ben

kilon alios wrote:

> Its far from production ready but I am too excited to keep to myself.
> I present to you Ephestos.
>
> Ephestos is a socket bridge that communicates with Blender the most
> popular and most powerful open source 3d application.
>
> http://www.blender.org/
>
> The goal is to expose Blender coders to the power of Pharo and Pharo
> to the power of Blender. As you can imagine the potential is huge but
> I rather talk what Ephestos can do already.
>
> Even though Ephestos is in total less than 200 lines of code it can
> already communicate with blender and affect blender properties.
> Blender properties are basically instance variables for any kind of
> blender object, 3d object, material, textures etc So already you can
> affect a huge deal of blender .
>
> Unfortunately Blender operators seem to crash Blender , probably I am
> doing something stupid that I will fix. Blender operators are for
> performing blender actions so they are very important.
>
> I have made a simple video demo of it that can be watched here
>
> https://www.youtube.com/watch?v=8igk9DoY6PU&feature=youtu.be 
> <https://www.youtube.com/watch?v=8igk9DoY6PU&feature=youtu.be>
>
> To use it you need first the Blender addon which can be found here
>
> https://github.com/kilon/pyEphestos
>
> The code should be inside a folder named "pyEphestos" and placed in
> Blender addons directory which is located for Macos in Application
> Support/Blender/VersionsOfBlender/scripts/addons and in Windows should
> be in App Data/Roaming/..... or you can place it inside the blender
> folder in similar sub directory
>
> You also need the Pharo code which can be found here
>
> http://www.smalltalkhub.com/#!/~kilon/Ephestos/ 
> <http://www.smalltalkhub.com/#%21/%7Ekilon/Ephestos/>
>
> As I said it is far from production ready , but it works.
>
> The good news is that the socket communication is blazing fast, at
> least compared to what I expected. I was able to perform 1000
> connections under a second. And each connection carries a 1024 bytes
> messages , thats a lot of code. Should be possible to pass thousands
> of lines of code under a second to Blender.
>
> My only worry is blender itself since it tends to be very crashy in
> the areas I am pushing.
>
> By the way Always press esc after you enable Ephestos in Blender to
> close the socket or else it wont free it and next time you wont be
> able to open the socket and you will have to restart your OS. And do
> not make an error with the string passed . I need to add an exception
> for it so it wont crash blender.


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

Damien Cassou
In reply to this post by kilon.alios
On Tue, Jul 15, 2014 at 11:09 PM, kilon alios <[hidden email]> wrote:
>
> The goal is to expose Blender coders to the power of Pharo and Pharo to the
> power of Blender. As you can imagine the potential is huge but I rather talk
> what Ephestos can do already.

That's great kilon! I can't wait to see how far you could go with
that. I hope you plan to use Pharo syntax instead of plain string for
the messages. A message like this:

"bpy.data.objects["Cube"].location = (0.0, 0.0, 0.0)"

could be written like that:

(EphestosMessage bpy data objects: 'Cube') location: (EphestosLocation
x: 0 y: 0 z: 0)

or something similar

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
In reply to this post by Sean P. DeNigris
don't worry more is coming :)


On Wed, Jul 16, 2014 at 5:25 PM, Sean P. DeNigris <[hidden email]> wrote:
kilon alios wrote
> The goal is to expose Blender coders to the power of Pharo and Pharo to
> the
> power of Blender

Cool! I want this :)



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/ANN-Ephestos-Using-and-Coding-Blender-from-inside-Pharo-tp4767945p4768101.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
In reply to this post by Ben Coman
I am apologize about the video , I recorded it in 720p and forgot to increase the pharo font size. But worry not, Ephestos will come with an array of examples to help you understand the whole process and get you started. I will upload shortly the examples used in the videos. 


On Wed, Jul 16, 2014 at 5:53 PM, Ben Coman <[hidden email]> wrote:
I don't have time to play, but this looks very very cool.  At a minimum, its a great demonstration of Pharo/Smalltalk playing-well-with-others.

Some feedback on the video presentation, zooming in on the workspace to make the text more readable in low-def video streams, then zooming out just before it is executed would be useful.

cheers -ben

kilon alios wrote:
Its far from production ready but I am too excited to keep to myself. I present to you Ephestos.
Ephestos is a socket bridge that communicates with Blender the most popular and most powerful open source 3d application.
http://www.blender.org/

The goal is to expose Blender coders to the power of Pharo and Pharo to the power of Blender. As you can imagine the potential is huge but I rather talk what Ephestos can do already.
Even though Ephestos is in total less than 200 lines of code it can already communicate with blender and affect blender properties. Blender properties are basically instance variables for any kind of blender object, 3d object, material, textures etc So already you can affect a huge deal of blender .

Unfortunately Blender operators seem to crash Blender , probably I am doing something stupid that I will fix. Blender operators are for performing blender actions so they are very important.

I have made a simple video demo of it that can be watched here

https://www.youtube.com/watch?v=8igk9DoY6PU&feature=youtu.be <https://www.youtube.com/watch?v=8igk9DoY6PU&feature=youtu.be>


To use it you need first the Blender addon which can be found here

https://github.com/kilon/pyEphestos

The code should be inside a folder named "pyEphestos" and placed in Blender addons directory which is located for Macos in Application Support/Blender/VersionsOfBlender/scripts/addons and in Windows should be in App Data/Roaming/..... or you can place it inside the blender folder in similar sub directory

You also need the Pharo code which can be found here

http://www.smalltalkhub.com/#!/~kilon/Ephestos/ <http://www.smalltalkhub.com/#%21/%7Ekilon/Ephestos/>


As I said it is far from production ready , but it works.
The good news is that the socket communication is blazing fast, at least compared to what I expected. I was able to perform 1000 connections under a second. And each connection carries a 1024 bytes messages , thats a lot of code. Should be possible to pass thousands of lines of code under a second to Blender.
My only worry is blender itself since it tends to be very crashy in the areas I am pushing.
By the way Always press esc after you enable Ephestos in Blender to close the socket or else it wont free it and next time you wont be able to open the socket and you will have to restart your OS. And do not make an error with the string passed . I need to add an exception for it so it wont crash blender.



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

Esteban A. Maringolo
2014-07-16 12:16 GMT-03:00 kilon alios <[hidden email]>:
> I am apologize about the video , I recorded it in 720p and forgot to
> increase the pharo font size. But worry not, Ephestos will come with an
> array of examples to help you understand the whole process and get you
> started. I will upload shortly the examples used in the videos.

One suggestion about the edition of the video. Show some of the
results during the first 30 seconds, and then explain the whole
process to get there.
It's like the cooking shows, where they show the cake already made,
and then the whole process to make it.
Otherwise it gets longwinded, because you don't know when the "peak
moment" will take place.

Having said that. What you did is really cool. I used to 3D in the
past (with Caligari trueSpace), and back then I'd love to have
something like Pharo to program it (trueSpace started used Phyton
too).

Regards!

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
In reply to this post by Damien Cassou
yes the one I am considering as strong candidate is

(BPYObjects at: 'Cube' ) location : #( 0 0 0 )

I would try to simplify bpy ( Blender Python API) and make it a lot more pharo friendly. 

However plain python string will be kept as well, so you can copy paste existing python code. 

One thing to note here is that Blender python addons are a huge deal. Python addons are actually full blown python apps. Blender python is basically a regular cpython 3 which is by far the most popular python implementation , meaning not only that you can use blender api object but any python library you can find. As a pharo developer you also can tap into this power via Ephestos. 

something that I forgot to mention in the video, in the github repo there is a rawcode.py. This is a strip down version of the Blender code that will separate to its own project that I am naming "Atlas". 

The goal of Atlas, is to create a two way communication socket bridge between cpython (most popular python implementation) and pharo. Very similar to Ephestos but you will no longer need Blender. That means that pharo coders will be able to use python libraries from inside pharo and even mix python with pharo code. So you could make part of your application in python and part in pharo and still function as a single application. 

If I find the time I would like to expand Atlas to other languages too, so that pharo can take advantage of any library written in any language without the trouble of FFIs. But most likely I will stick to python and let others do the work.

But even with just python as you imagine python is extremely popular and quite friendly with the pharo way of thinking. Meaning that in python its all about live objects too. Pharo will be able to tap into thousands of powerful python libraries. 

I reserve some doubts to the amount of problems I will have to face to accomplish this and I am no way claiming it wont be a long process but so far through these very first steps the idea seems to go well in practice.


On Wed, Jul 16, 2014 at 5:55 PM, Damien Cassou <[hidden email]> wrote:
On Tue, Jul 15, 2014 at 11:09 PM, kilon alios <[hidden email]> wrote:
>
> The goal is to expose Blender coders to the power of Pharo and Pharo to the
> power of Blender. As you can imagine the potential is huge but I rather talk
> what Ephestos can do already.

That's great kilon! I can't wait to see how far you could go with
that. I hope you plan to use Pharo syntax instead of plain string for
the messages. A message like this:

"bpy.data.objects["Cube"].location = (0.0, 0.0, 0.0)"

could be written like that:

(EphestosMessage bpy data objects: 'Cube') location: (EphestosLocation
x: 0 y: 0 z: 0)

or something similar

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
In reply to this post by Esteban A. Maringolo
I am a huge fan of Truespace and ZBrush, so sad to see it die :(

Another big love was Softimage XSI, dead too. I started using Blender as soon as Autodesk bought Softimage because I predicted that its days were numbered. 

I completely agree on the format of the video, next time I will have separate video for installation and another for features so it is shorter and to the point.  


On Wed, Jul 16, 2014 at 6:27 PM, Esteban A. Maringolo <[hidden email]> wrote:
2014-07-16 12:16 GMT-03:00 kilon alios <[hidden email]>:
> I am apologize about the video , I recorded it in 720p and forgot to
> increase the pharo font size. But worry not, Ephestos will come with an
> array of examples to help you understand the whole process and get you
> started. I will upload shortly the examples used in the videos.

One suggestion about the edition of the video. Show some of the
results during the first 30 seconds, and then explain the whole
process to get there.
It's like the cooking shows, where they show the cake already made,
and then the whole process to make it.
Otherwise it gets longwinded, because you don't know when the "peak
moment" will take place.

Having said that. What you did is really cool. I used to 3D in the
past (with Caligari trueSpace), and back then I'd love to have
something like Pharo to program it (trueSpace started used Phyton
too).

Regards!


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

sebastianconcept@gmail.co
In reply to this post by Esteban A. Maringolo
On Jul 16, 2014, at 12:27 PM, Esteban A. Maringolo <[hidden email]> wrote:

One suggestion about the edition of the video. Show some of the
results during the first 30 seconds, and then explain the whole
process to get there.
It's like the cooking shows, where they show the cake already made,
and then the whole process to make it.

+1 about using that format.

First and quick you show the what, then you take your time to show the how in all its details

Congratulations for achieving that, you’re doing a great job and there is huge potential in it!




Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

Damien Cassou
In reply to this post by Esteban A. Maringolo
On Wed, Jul 16, 2014 at 5:27 PM, Esteban A. Maringolo
<[hidden email]> wrote:
> Caligari trueSpace


I learned 3D with TrueSpace and loved it. The company doing it was
working in a neighbor city near Bordeaux, France.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

hernanmd
In reply to this post by kilon.alios

2014-07-16 12:31 GMT-03:00 kilon alios <[hidden email]>:
yes the one I am considering as strong candidate is

(BPYObjects at: 'Cube' ) location : #( 0 0 0 )


Why not BPYCube?

 
I would try to simplify bpy ( Blender Python API) and make it a lot more pharo friendly. 

However plain python string will be kept as well, so you can copy paste existing python code. 

One thing to note here is that Blender python addons are a huge deal. Python addons are actually full blown python apps. Blender python is basically a regular cpython 3 which is by far the most popular python implementation , meaning not only that you can use blender api object but any python library you can find. As a pharo developer you also can tap into this power via Ephestos. 

something that I forgot to mention in the video, in the github repo there is a rawcode.py. This is a strip down version of the Blender code that will separate to its own project that I am naming "Atlas". 

The goal of Atlas, is to create a two way communication socket bridge between cpython (most popular python implementation) and pharo. Very similar to Ephestos but you will no longer need Blender. That means that pharo coders will be able to use python libraries from inside pharo and even mix python with pharo code. So you could make part of your application in python and part in pharo and still function as a single application. 


I am interested in Atlas. Do you have a link?

 
If I find the time I would like to expand Atlas to other languages too, so that pharo can take advantage of any library written in any language without the trouble of FFIs. But most likely I will stick to python and let others do the work.

But even with just python as you imagine python is extremely popular and quite friendly with the pharo way of thinking. Meaning that in python its all about live objects too. Pharo will be able to tap into thousands of powerful python libraries. 

I reserve some doubts to the amount of problems I will have to face to accomplish this and I am no way claiming it wont be a long process but so far through these very first steps the idea seems to go well in practice.


On Wed, Jul 16, 2014 at 5:55 PM, Damien Cassou <[hidden email]> wrote:
On Tue, Jul 15, 2014 at 11:09 PM, kilon alios <[hidden email]> wrote:
>
> The goal is to expose Blender coders to the power of Pharo and Pharo to the
> power of Blender. As you can imagine the potential is huge but I rather talk
> what Ephestos can do already.

That's great kilon! I can't wait to see how far you could go with
that. I hope you plan to use Pharo syntax instead of plain string for
the messages. A message like this:

"bpy.data.objects["Cube"].location = (0.0, 0.0, 0.0)"

could be written like that:

(EphestosMessage bpy data objects: 'Cube') location: (EphestosLocation
x: 0 y: 0 z: 0)

or something similar

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

Jan Vrany
>     The goal of Atlas, is to create a two way communication socket
>     bridge between cpython (most popular python implementation) and
>     pharo. Very similar to Ephestos but you will no longer need Blender.
>     That means that pharo coders will be able to use python libraries
>     from inside pharo and even mix python with pharo code. So you could
>     make part of your application in python and part in pharo and still
>     function as a single application.
>
>
> I am interested in Atlas. Do you have a link?
>

This has been done some three years ago for OpenQwak :-)

http://squeakingalong.wordpress.com/2011/05/04/openqwaq-python-integration/

Best, Jan



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
In reply to this post by hernanmd
I do have some great news I solved the problem with  blender operators that means I now have full access to the whole API of blender. Everything in Blender API is basically operators and properties.There are still limitations to be solved of course.  First that I will tackle is how to communicate data from Blender back to Pharo. 

Also I have added example code for people to look at.  Just pull from my repo here http://www.smalltalkhub.com/#!/~kilon/Ephestos/

Ephestos is not something I am making for others to use, its primarily for my needs. 

Because I am very interested in interacting and integrating other Blender addons in my workflow I want to keep the Pharo API as close to BPY as possible. This will make it easy for me to port BPY code to pharo and talk to existing Blender addons. Blender addons are extremely important they implement tons of new functionality for Blender. 

A cube is not a separate object in BPY ,  a cube is basically a mesh object. So BPYMesh would make more sense. But in BPY its really a BPYObject. 

Additional I can be lazy and avoid documenting stuff since translating python calls to pharo is dead easy. Python has a very simple syntax, not as simple as Pharo but quite close. So its easy to go to Blender wiki BPY API and find all the information you want instead of me going through the pain of rewriting this huge documentation. There are also a lot of tutorials about making blender addons with python online, there is no way I can compete with that . So in the end if you really want to take advantage of Blender learning python and the blender api is mandatory. Pretty much every major 3d app uses Python and Python is a very popular language so there is nothing to lose by learning it. 

I would not put too much faith to me mapping alone the huge BPY API, the operators alone are 1500 or so I have been told, properties must be at least double that amount. Translating all that to Pharo objects is just an insane amount of work unless I find a cleaver way around it with some pharo parsing but still too much work for little gain. But I will map some basic stuff to decrease the need of writing python code. 

About Atlas here is the repo that I am going to post the code


For now I work on Ephestos and when I am happy with the progress I made with it I will port it to Atlas and make an announcement here. Its basically the same code minus the Blender stuff. 

PS: It may also make some of you happy that I plan to expand Ephestos to include besides BPY also BGE. BGE stand for Blender Game Engine , its a game engine offered by Blender that excels at any kind of interacting graphics, that means that you will have access to a very powerful game engine and a general engine for 3d interactive applications. BGE is a lower priority , but it should be easy to implement once the big limitations of Ephestos have been solved.  

More info about BGE can be found here http://wiki.blender.org/index.php/Doc:2.6/Manual

you can find finished games made with BGE here http://blenderartists.org/forum/forumdisplay.php?39-Finished-Games

A very good example is this http://deadcyborg.com/




On Thu, Jul 17, 2014 at 8:31 PM, Hernán Morales Durand <[hidden email]> wrote:

2014-07-16 12:31 GMT-03:00 kilon alios <[hidden email]>:

yes the one I am considering as strong candidate is

(BPYObjects at: 'Cube' ) location : #( 0 0 0 )


Why not BPYCube?

 
I would try to simplify bpy ( Blender Python API) and make it a lot more pharo friendly. 

However plain python string will be kept as well, so you can copy paste existing python code. 

One thing to note here is that Blender python addons are a huge deal. Python addons are actually full blown python apps. Blender python is basically a regular cpython 3 which is by far the most popular python implementation , meaning not only that you can use blender api object but any python library you can find. As a pharo developer you also can tap into this power via Ephestos. 

something that I forgot to mention in the video, in the github repo there is a rawcode.py. This is a strip down version of the Blender code that will separate to its own project that I am naming "Atlas". 

The goal of Atlas, is to create a two way communication socket bridge between cpython (most popular python implementation) and pharo. Very similar to Ephestos but you will no longer need Blender. That means that pharo coders will be able to use python libraries from inside pharo and even mix python with pharo code. So you could make part of your application in python and part in pharo and still function as a single application. 


I am interested in Atlas. Do you have a link?

 
If I find the time I would like to expand Atlas to other languages too, so that pharo can take advantage of any library written in any language without the trouble of FFIs. But most likely I will stick to python and let others do the work.

But even with just python as you imagine python is extremely popular and quite friendly with the pharo way of thinking. Meaning that in python its all about live objects too. Pharo will be able to tap into thousands of powerful python libraries. 

I reserve some doubts to the amount of problems I will have to face to accomplish this and I am no way claiming it wont be a long process but so far through these very first steps the idea seems to go well in practice.


On Wed, Jul 16, 2014 at 5:55 PM, Damien Cassou <[hidden email]> wrote:
On Tue, Jul 15, 2014 at 11:09 PM, kilon alios <[hidden email]> wrote:
>
> The goal is to expose Blender coders to the power of Pharo and Pharo to the
> power of Blender. As you can imagine the potential is huge but I rather talk
> what Ephestos can do already.

That's great kilon! I can't wait to see how far you could go with
that. I hope you plan to use Pharo syntax instead of plain string for
the messages. A message like this:

"bpy.data.objects["Cube"].location = (0.0, 0.0, 0.0)"

could be written like that:

(EphestosMessage bpy data objects: 'Cube') location: (EphestosLocation
x: 0 y: 0 z: 0)

or something similar

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill




Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
In reply to this post by Jan Vrany
Does it work with Pharo ? I downloaded the documentation and is really well written. But I have no clue how to test with Pharo. 

Communication of languages and apps through sockets is nothing original or rare. 

I was actually considering expanding Atlas to not only talk to python but also talk to Pharo as well. My goal is to make pharo take advantage of multi core cpus. Each new instance of Pharo takes on core because this is how OS works with processes and Atlas could act as a net of communication between different instances of Pharo.  Possible its an idea I wont work on but its something I consider in the back of my head. But if its easy enough I may do it.


On Thu, Jul 17, 2014 at 9:06 PM, Jan Vrany <[hidden email]> wrote:
    The goal of Atlas, is to create a two way communication socket
    bridge between cpython (most popular python implementation) and
    pharo. Very similar to Ephestos but you will no longer need Blender.
    That means that pharo coders will be able to use python libraries
    from inside pharo and even mix python with pharo code. So you could
    make part of your application in python and part in pharo and still
    function as a single application.


I am interested in Atlas. Do you have a link?


This has been done some three years ago for OpenQwak :-)

http://squeakingalong.wordpress.com/2011/05/04/openqwaq-python-integration/

Best, Jan




Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
hi guys Ephestos has been moving forward and I am happy to report I can finally offer 100% accessibility to Blender Python API , meaning you can have access to any blender operator and property. 

Additionally Ephestos won't crash anymore in case of python error, instead it will display the error in the Blender GUI , remove the message containing the error and carry on like nothing happened. 

Ephestos now offers full access to python globals, meaning you can assign global variables in python to shorten your code and for all the known benefits of using variables. 

With the help of Damien I was successful in creating a parser for pharo to python syntax. Using pharo messages you can now construct automagically python strings and pass it to blender . This way you no longer need to type in python syntax to do python stuff. So a big thanks to Damien. Note this method of course is slower because of parsing and heavy usage of regex string matching. 

You can watch a video demo here


This time I go straight to the practical examples and the video is much higher resolution and I use smaller windows to make the text look bigger so it should be much easier to watch and better to view than the previous demo.  

As I said Atlas will be released probably in a week or so and then I will like to work with QT from python 


QT is a great framework for GUIs , with designers, Support for Opengl , cross platform, true native look and looking gorgeous. Easily one of the most popular GUI APIs out there. I will wrap it with Atlas very similarly to Blender and offer it as a library called , QTPharo. 

Of course there will be more improvements coming for Ephestos. 


On Thu, Jul 17, 2014 at 11:25 PM, kilon alios <[hidden email]> wrote:
Does it work with Pharo ? I downloaded the documentation and is really well written. But I have no clue how to test with Pharo. 

Communication of languages and apps through sockets is nothing original or rare. 

I was actually considering expanding Atlas to not only talk to python but also talk to Pharo as well. My goal is to make pharo take advantage of multi core cpus. Each new instance of Pharo takes on core because this is how OS works with processes and Atlas could act as a net of communication between different instances of Pharo.  Possible its an idea I wont work on but its something I consider in the back of my head. But if its easy enough I may do it.


On Thu, Jul 17, 2014 at 9:06 PM, Jan Vrany <[hidden email]> wrote:
    The goal of Atlas, is to create a two way communication socket
    bridge between cpython (most popular python implementation) and
    pharo. Very similar to Ephestos but you will no longer need Blender.
    That means that pharo coders will be able to use python libraries
    from inside pharo and even mix python with pharo code. So you could
    make part of your application in python and part in pharo and still
    function as a single application.


I am interested in Atlas. Do you have a link?


This has been done some three years ago for OpenQwak :-)

http://squeakingalong.wordpress.com/2011/05/04/openqwaq-python-integration/

Best, Jan





Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

Damien Cassou
On Sun, Jul 20, 2014 at 7:34 PM, kilon alios <[hidden email]> wrote:
> With the help of Damien I was successful in creating a parser for pharo to
> python syntax. Using pharo messages you can now construct automagically
> python strings and pass it to blender . This way you no longer need to type
> in python syntax to do python stuff. So a big thanks to Damien. Note this
> method of course is slower because of parsing and heavy usage of regex
> string matching.


are you sure you need to pass 'nil' everywhere? In
#doesNotUnderstand:, you could check for the number of arguments and
generate something appropriate based on that.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
well so far I don't know how to do this
for example is I sent

EphParser bpy data materials:'["Material"]' diffuse_color: '=(1.0,0.0,0.0)'.

bpy is sent to doesNotUnderstand: but data is sent to Object cause the debugger complains that Message(Object)>>messageNotUnderstood 

Another problem is that even if I get this to work how I know where the python command ends ? Where is the period that separate command statements ? Without knowing where the command statement end I cannot formulate correct python strings.  

The advantage of sending the whole thing as a single keyword message is that I know its one unit and its easy to parse it to a string since the whole thing gets passed to doesNotUnderstand message as argument. 

I am no expert on pharo so if anyone has better idea I am open to suggestions as I said also in the video. 


On Sun, Jul 20, 2014 at 10:06 PM, Damien Cassou <[hidden email]> wrote:
On Sun, Jul 20, 2014 at 7:34 PM, kilon alios <[hidden email]> wrote:
> With the help of Damien I was successful in creating a parser for pharo to
> python syntax. Using pharo messages you can now construct automagically
> python strings and pass it to blender . This way you no longer need to type
> in python syntax to do python stuff. So a big thanks to Damien. Note this
> method of course is slower because of parsing and heavy usage of regex
> string matching.


are you sure you need to pass 'nil' everywhere? In
#doesNotUnderstand:, you could check for the number of arguments and
generate something appropriate based on that.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

SergeStinckwich
In reply to this post by kilon.alios
On Sun, Jul 20, 2014 at 7:34 PM, kilon alios <[hidden email]> wrote:

> hi guys Ephestos has been moving forward and I am happy to report I can
> finally offer 100% accessibility to Blender Python API , meaning you can
> have access to any blender operator and property.
>
> Additionally Ephestos won't crash anymore in case of python error, instead
> it will display the error in the Blender GUI , remove the message containing
> the error and carry on like nothing happened.
>
> Ephestos now offers full access to python globals, meaning you can assign
> global variables in python to shorten your code and for all the known
> benefits of using variables.
>
> With the help of Damien I was successful in creating a parser for pharo to
> python syntax. Using pharo messages you can now construct automagically
> python strings and pass it to blender . This way you no longer need to type
> in python syntax to do python stuff. So a big thanks to Damien. Note this
> method of course is slower because of parsing and heavy usage of regex
> string matching.
>
> You can watch a video demo here
>
> https://www.youtube.com/watch?v=yIE1LGjUDDA&feature=youtu.be

Really great work Kilon.

I was wondering if you could use such techniques in order to interact
with MORSE, a 3D open-source
robotics simulation engine based on top of Blender (mostly written in
Python): https://www.openrobots.org/wiki/morse
There is some information about how to build scenarios here:
http://www.openrobots.org/morse/doc/latest/user/builder.html
Might interest some people here.

Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Ephestos - Using and Coding Blender from inside Pharo

kilon.alios
Well in theory it should work. 

I am saying "in theory" because I have not tried MORSE.

What is Ephestos ?  Basically its a python application that creates a streamsocket server that listens byte data, then it takes the byte messages it converts them to strings and it executes them using exec() built-in python function. The end. See what I did here , I did not mention Blender at all. Actually Ephestos is implemented as Blender addon. So it gives you both access to Bpy and python libraries. A Blender addon is basically a python application + access to BPY + extra stuff to make it easy to select and enable in the Blender GUI. 

Now from what I see at first glance MORSE uses BPY and BGE. BGE , the blender game engine is a separate app essentially with its own API. So I need to wrap Ephestos for BGE but it will still be the same thing with added more code to be called by BGE. It should be fairly easy to do and I will do it.

I don't know if there are other implementation details  about MORSE but I don't think there will be a problem to make it work with Ephestos. 

Of course Ephestos has still got some big limitations a) does not receive data from Blender b) does not support of multiline python code. I don't know about b) it may work already if you add newlines in your python strings and whitespaces but I will have to test this and of course improve it to make it easier to use. Both of these features will be added since they are high priority goals.  


On Mon, Jul 21, 2014 at 10:17 AM, Serge Stinckwich <[hidden email]> wrote:
On Sun, Jul 20, 2014 at 7:34 PM, kilon alios <[hidden email]> wrote:
> hi guys Ephestos has been moving forward and I am happy to report I can
> finally offer 100% accessibility to Blender Python API , meaning you can
> have access to any blender operator and property.
>
> Additionally Ephestos won't crash anymore in case of python error, instead
> it will display the error in the Blender GUI , remove the message containing
> the error and carry on like nothing happened.
>
> Ephestos now offers full access to python globals, meaning you can assign
> global variables in python to shorten your code and for all the known
> benefits of using variables.
>
> With the help of Damien I was successful in creating a parser for pharo to
> python syntax. Using pharo messages you can now construct automagically
> python strings and pass it to blender . This way you no longer need to type
> in python syntax to do python stuff. So a big thanks to Damien. Note this
> method of course is slower because of parsing and heavy usage of regex
> string matching.
>
> You can watch a video demo here
>
> https://www.youtube.com/watch?v=yIE1LGjUDDA&feature=youtu.be

Really great work Kilon.

I was wondering if you could use such techniques in order to interact
with MORSE, a 3D open-source
robotics simulation engine based on top of Blender (mostly written in
Python): https://www.openrobots.org/wiki/morse
There is some information about how to build scenarios here:
http://www.openrobots.org/morse/doc/latest/user/builder.html
Might interest some people here.

Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/


12