Blender Programming

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
ronbravo
Posts: 0
Joined: Mon May 14, 2007 11:12 pm

Blender Programming

Post by ronbravo »

Hi. This maybe a wild and unrealistic idea, but I was wondering a couple of things about Blender.

1) Is it possible to take Blender's calls to Open GL and route them to a game engine. So instead of Blender calling things like how to draw verticies, edges, faces, ect, I could have a game engine do it instead?

2) Is it possible to separate Blender code so that Python would not be the scripting language used? So if I needed I could modify Blender with other scripting languages.

I have not looked at the source yet, but I was planning on digging through it and was wondering how difficult this would be before I did this. Thanks.

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Re: Blender Programming

Post by stiv »

ronbravo wrote: 1) Is it possible to take Blender's calls to Open GL and route them to a game engine. So instead of Blender calling things like how to draw verticies, edges, faces, ect, I could have a game engine do it instead?
The game engine also uses opengl to draw. I'm not sure how this would be different.
2) Is it possible to separate Blender code so that Python would not be the scripting language used? So if I needed I could modify Blender with other scripting languages.
Conceptually simple: just embedd an interpreter for your favorite language and write all the binding code to interface with blender internals.

Actually doing this is left as an excercise for the reader. This task will be complicated by the fact that blender is an application and not a library which means there is no blender api to wrap.

ronbravo
Posts: 0
Joined: Mon May 14, 2007 11:12 pm

Post by ronbravo »

That's why I like Blender. If I need something not built in I can build it myself provided I have the expertise or resources to do so.

The game engine also uses opengl to draw. I'm not sure how this would be different.

I see. I'm trying to see if it would be possible to run Blender inside of a game engine, but also make it where it would be an engine of my choice that I could swap in and out with some other engine. So whatever engine I used I would only need to set it up to speak with Blender.

I figure if I separate the rendering from Blender's interface and data I can just route all the render calls to a game engine. Then I can have it build stuff as I need for a game with no need to export from Blender cause I'd already be building stuff within the engine using Blender tools. Kinda how the current in game Blender engine works but set for any engine of my choice. Wasn't there talk of making Blender's viewport render or game engine as a plugin so people could use whatever they wanted?


Conceptually simple: just embed an interpreter for your favorite language and write all the binding code to interface with blender internals.

Actually doing this is left as an exercise for the reader. This task will be complicated by the fact that blender is an application and not a library which means there is no blender api to wrap.
Hmmm....Interesting. I guess I could try it with some simple tests to see if I'm up to it.

I guess in the end I would want all the power and tools of Blender but with the option to use my game engine of choice as a render and use my scripting language of choice.

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing »

Check out the Blender External Engine Interface project at http://developer-alliance.org/index.php?site=beei

/Nathan

Post Reply