Re: Ocean Simulator: The research continues...

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

simonharvey
Posts: 0
Joined: Tue May 18, 2004 8:11 am

Re: Mmmmm

Post by simonharvey » Mon Dec 19, 2005 10:43 pm

djfuego wrote:Is this going to be added to blender before Xmas 05?
This is something that you would put under the "research and development" part of blender. That is that somebody (me) is developing something that hasn’t been done before that will probably not make it into the main tree for the reason that it was R&D. This is OK since I have made it plain from the beginning that I wanted to develop a new architecture that would be at no cost to the core developers and that the core developers has no ethical or moral obligation to include or review.

There is also allot more to develop:

* a 'Blender Object Model' that can allow python scripts to call C style functions without having a specially written wrapper AND C style functions that can call python methods without having any special methods or weird macro crud. This is also so that a blender developer only needs to write 1 implementation once and then everybody can use it regardless or programming/scripting language.

* A generic properties system, ie. a string paired with a small amount of data, ie. a float, int or other string, geometric object. etc...

* unloadable/ reloadable modules to maintain blenders low resources philosophy [this is almost completed by the way].

* a usable events system, i.e. with proper message passing [this has almost been finished].

* The interfaces for everything from the sequencer, renderer (for custom shaders) to UI interaction and file access.

* because the message passing, and BOM technologies are being developed separately there is still be some massaging required to get them integrated, without any rough stuff showing.


because these are still being designed, planned and coded AND because ton and the gang haven’t given it their blessing it would need to be reviewed first, and allot would change as their are things that I would change now. (this is one or the benefits of having something to start off with).

Because of these things the answer is no, it would not appear before Christmas, however you might get a usable version by about the middle of next year.

Kind Regards
Simon Harvey

an-toni
Posts: 0
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni » Thu Dec 22, 2005 12:45 am

there is a wiki page somewhere, by Campbell Barton / ideasman, drafting the property system design.

the python ctypes module can be used to use c libs directly from python, without any wrapping code. dunno if it can work with blender, 'cause blender is no c *lib*

python code can be sort of called from c always i think, with PyExec or something, but i dont know that too well yet. i guess we'll learn more when integrate python tools to Blender in near future.

dunno if some magic system bridging the two languages could exist, 'cause they are kinda in different levels .. as you probably know, python is c too..

for some other languages like Objective-C there indeed are bridges like the pyobjc module that just expose everything there is in Obj-C to Py (which is kinda cool considering that Mac OS X is written in obj-c ;)

may be that pyrex would be the most straightforward way to write blender py api, 'cause with (current) Blender there is often no way getting around writing custom c code to expose things. furthermore, as Blender behaves differently and has different data available in different modes, the api code has to deal with that .. and DAG updates etc. so making the API is not just exposing C, but designing how and what to hide of what the C part does, and what and how to show in the py API so that things would look and work nicely.

~Toni

simonharvey
Posts: 0
Joined: Tue May 18, 2004 8:11 am

Update

Post by simonharvey » Wed Jan 25, 2006 2:42 am

Hello,
I have been rather slow in my development of the latest version of modblender however the changes that I have been making will give rise to alot of promise.

Instead of hacking on the blender codebase I have been writing individual programs, writing blender API wrappers to allow it to be easily committed back intro the blender source tree. These programs, with their reasoning are:

1. An XML to C converter:
The current version of ModBlender has all of its structures stored in C header files. However the new version of ModBlender is going to have its interfaces, types and constants described by XML, which can be converted into C, C++, Python (and hopefully: Java), making blenders internal state and API much more accessable. Right now An XML package definition to C converter has been written (~80%) but not yet completed. It is hoped that once this is completed that the python bindings will also been completed once a binary api has been defined (using heuristics to determine structure packing, stack alignment, etc...).

2. A smart ID string subsystem:
Right now (in modblender-0.0.1) interfaces are stored as string/value pairs. In the newer version of modblender the ID strings will actually mean something:

ie. "blender/helloworld/demo;1a"
This string will refer to the "demo" interface (version 1A) in an XML description file called helloworld.xml in the interface/package directory called blender.

This is about 30% written.

3. A dynamic calling method:
When calling python methods as C functions a substutute C function is called that parses its stack (based on an XML description of what the API looks like) and then calls the approate Python function using the PyCall python API. Right now this is about 40% written.

This system allows C programs to call python methods with virtually no modification/nasty macros, and is very clean from a C programmers point of view.

There there is still alot more to do. However these things (once implemented) would allow for dramatic improvement in the extensibility of blender.

Kind Regards
Simon Harvey

snow
Posts: 0
Joined: Sun Jan 22, 2006 2:55 pm

Post by snow » Wed Jan 25, 2006 12:50 pm

Thank you Simon! I'm very happy to hear that this project is still going well.

Any news on what Ton and the gang think of the project?

I'm quite desperate for a plugin system for Blender. One should certainly not have to modify blender source in order to implement an external renderer (as I am).

Some advantages that I personally feel is relevant:

Stability - A bug in an external module doesn't necessarily take down the entire system. (or can be removed by removing the module)

Development productivity - I think once coders don't to build Blender from scratch or have to deal with > 300,000 lines of code, contributor's development will skyrocket! (But, maybe that's just me). Also, it'll keep main source cleaner since only the main developers work on it.

Customisability - Blender users can easily add 3rd party plugins to their installation. Also, unnecessary modules don't have to be added to the blender distribution (increasing download size), since they can easily be downloaded separately.

The only problem I have with plugins is that it is not so good for portability, since the author has to compile for each platform (or at the very least, provide source) rather than just patching Blender. But honestly, I think it's neglible.

Of particular importance to me is the ability to add new materials, lights, shaders and render options. I think others will also find it very convenient to plug in modifiers and particle fields. Finally, it should be as easy as possible to make additions and\or modifications to the GUI.
Or, at least, these are my opinions :wink:

Very good job!
-Ren

LetterRip
Posts: 0
Joined: Thu Mar 25, 2004 7:03 am

Post by LetterRip » Wed Jan 25, 2006 1:30 pm

snow,

check orange, with the recode of the renderer ton made integration of external renderers much easier. Also 'make quicky' you only build your couple of files you changed.

LetterRip

simonharvey
Posts: 0
Joined: Tue May 18, 2004 8:11 am

Post by simonharvey » Thu Jan 26, 2006 3:38 am

snow wrote:Any news on what Ton and the gang think of the project?
I am not really sure of what they think of it.

There was some talk of one guy, (some guy had a wiki page) but I am more for coding: I have seen many people come on the blender.org forums, create alot of interest and enthusiam ...and then disapear, as if they suddenly realised how much work it was going to take. At least this way of doing it incrementally I can say to myself that I did actually do something (that in the end: worked).

If this does catch on it will be because it is so good that any team lead will be a moron to turn it down - this is how I like it, since the decision to adopt is based on merit and innovation and not because they just need something to fill the gap (i.e. an extra bullet point on the blender feature list).

Kind Regards
Simon Harvey

snow
Posts: 0
Joined: Sun Jan 22, 2006 2:55 pm

Post by snow » Thu Jan 26, 2006 3:07 pm

If this does catch on it will be because it is so good that any team lead will be a moron to turn it down - this is how I like it, since the decision to adopt is based on merit and innovation and not because they just need something to fill the gap (i.e. an extra bullet point on the blender feature list).
That's true - I agree fully! On the other hand, it's also nice the demand->supply way that Orange is causing blender to move forward right now.
If I were more familiar with Blender I would have offered to help, but I'm afraid I'm in over my head as it is. It's nice to hear that something is happening every now and then tho. Good luck!

Mohij
Posts: 0
Joined: Wed May 04, 2005 8:12 pm

Post by Mohij » Sat Feb 11, 2006 5:04 pm

snow wrote:Thank you Simon! I'm very happy to hear that this project is still going well.
I can only agree, this is such a great project. I hope that it will be integrated. :D
Keep the thing going!
Greetings,
Mohij
Even a fool is thought wise if he keeps silent, and discerning if he holds his tongue. Proverbs 17,28

Mohij
Posts: 0
Joined: Wed May 04, 2005 8:12 pm

Post by Mohij » Wed Apr 26, 2006 5:27 pm

The last post that is not from me is already three months ago. Aren't there any news regarding the ModBlender project? Is it on hold? It would be cool to hear something.

So if you are still alive, this is a great project and keep it going.

Greetings,
Mohij
Even a fool is thought wise if he keeps silent, and discerning if he holds his tongue. Proverbs 17,28

simonharvey
Posts: 0
Joined: Tue May 18, 2004 8:11 am

Post by simonharvey » Sun Apr 30, 2006 8:48 am

Mohij wrote:The last post that is not from me is already three months ago. Aren't there any news regarding the ModBlender project? Is it on hold? It would be cool to hear something.
Sorry for not updating, I have upgraded my machine from FC1 to FC4 and have only just recently rebuilt blender. I have also been coding my Forex strategy like crazy to get it trading as soon as possible. Ill do some more work on it.

Kind Regards
Simon Harvey

Mohij
Posts: 0
Joined: Wed May 04, 2005 8:12 pm

Post by Mohij » Sun May 07, 2006 6:32 pm

That's great :D !
And a big thank you...
Mohij
Even a fool is thought wise if he keeps silent, and discerning if he holds his tongue. Proverbs 17,28

simonharvey
Posts: 0
Joined: Tue May 18, 2004 8:11 am

Post by simonharvey » Mon Jul 24, 2006 12:26 pm

Hello All,

Unfortunetly the hard drive on my linux machine is no longer working, This would be the drive that contained most of the ocean simulator and XMLCOM stuff on it.

I have backed up most of my blender development stuff but not all of it.

I am now on my windows box that dosent quite have the same development capabilities as my linux machine.

I will have a go at developing on the windows machine, if it isnt then Ill just think about posting the code online (most of the sotware libraries were talored to working on Unix).

Kind Regards
Simon Harvey

epat
Posts: 0
Joined: Mon Feb 20, 2006 11:43 pm

Post by epat » Tue Jul 25, 2006 9:03 pm

Whoa! - you posted only yesterday, I thought this project was long dead!!! Sorry to hear about your hard drive problem (is it really not possible to recover the data off of it?), Your project reminds me of QNX, having a small core component and loading additional modules on demand. Anyway - keep on with the project and don't give up; I reccommend you slap a copy of linux back on as soon as possible, windows really isn't up to the job when it comes to development facilities!!... -epat.
'Regret for wasted time is more wasted time.'
- Mason Cooley

pirotecnico
Posts: 0
Joined: Fri Feb 09, 2007 12:25 am

Post by pirotecnico » Fri Feb 09, 2007 12:30 am

Hi, one question about "ocena simulation" for blender:

Is that "project" dead?
If not, can you say if it will be relased soon.

Thanks.

Post Reply