Baking internal project

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
macouno
Posts: 0
Joined: Tue Nov 18, 2003 3:37 am

Baking internal project

Post by macouno »

Hola folks.

Ok some of you may know I wrote the BRayBaker python plugin, which you can find here: http://www.alienhelpdesk.com/index.php?id=20

I came to the conclusion that a function like it is really needed in blender internal.

So since it doesn't look like anyone else is planning anything even remotely similar I decided to make a start myself.

I am doing some documentation here: http://www.alienhelpdesk.com/index.php?id=30

But I'm a complete C n00b so I'll probably need quite a bit of help.
Naturally I'll just bug the hell out of everyone at #blendercoders but I hope you won't mind me asking some probably very basic questions here.

If there's anyone out there that wants to be a bit more involved please let me know. I might need my own yoda ;) Also I've found working with more experienced programmers very educational.

Anyway.. pointers are very welcome... so is critisism.

Right now all I've basicly done is add a tab in the renderwindow with a Bake button... lovely... Don't expect a working version tomorrow, but I'm persistent and will get it done.

UncleZeiv
Posts: 0
Joined: Mon Aug 29, 2005 1:11 pm

Post by UncleZeiv »

Very interesting; another useful feature would be multiple UV channels, this way we could create lightmaps with blender.

macouno
Posts: 0
Joined: Tue Nov 18, 2003 3:37 am

Post by macouno »

yup that would be nice, but really all I'm suggesting now is rendering to an existing uv layout so that the result would be an image that can be used as a uv texture. I don't think I'll look into the bit of the code you're looking at.

macouno
Posts: 0
Joined: Tue Nov 18, 2003 3:37 am

Post by macouno »

ok question.

I've been looking at the code and have followed (with help) the render function through the files.

So now I have to determin a point at which I can for instance play with the camera angle and match that to the UV layout and such.

I'm looking hardest at the shadepixel function because that's the point where it seems easiest to get at the coords of the current rendered pixel.

Has anyone got any ideas about where a good point would be to adapt camera angle and such each time a pixel is rendered.

Hoehrer
Posts: 0
Joined: Wed Nov 02, 2005 12:36 pm

viewports?

Post by Hoehrer »

I just wanted to point out a new feature (viewports) in blender 2.41 that might be useful for this code (be it script or internal code):
http://blender.org/cms/Split_Screen_and ... 734.0.html

This 'might' speed up or unclutter the rendering process, no?

Werner

macouno
Posts: 0
Joined: Tue Nov 18, 2003 3:37 am

Post by macouno »

thanks mate that does look interesting.

But I had a word with Ton a while back and well it looks like doing major coding in the render bits of blender right now is not a good idea. He's doing masses of work in there now.

So for me... right now I'm working on other projects until perhaps the recode reaches a point where it might become practical to start work again.

I also heard that perhaps a more experienced coder is working on pretty much the same thing I was... So for now there's no progress...

Hoehrer
Posts: 0
Joined: Wed Nov 02, 2005 12:36 pm

Post by Hoehrer »

macouno wrote:thanks mate that does look interesting.

But I had a word with Ton a while back and well it looks like doing major coding in the render bits of blender right now is not a good idea. He's doing masses of work in there now.

So for me... right now I'm working on other projects until perhaps the recode reaches a point where it might become practical to start work again.
To bad, one more thing to wait for :-/
I also heard that perhaps a more experienced coder is working on pretty much the same thing I was... So for now there's no progress...
If you mean the patch created by theeth [1] i think he 'only' handles the vertex colors (-> "Vertex Color Baking"). I might be wrong here though and the patch does more... i haven't tried it yet... if i ever get cvs to work.

If you meant somebody else i can't find anything in both forums nor in the trackers.

Werner

[1] https://projects.blender.org/tracker/in ... 9&atid=127
(there is a forum thread mentioning this tracker, but i can't find it)

Brandano
Posts: 0
Joined: Mon Apr 19, 2004 6:03 pm

Post by Brandano »

I'd also look at the part of Blender that creates the environment maps for the renderer, as it ought to do several of the steps you actually go through for your baking script, like positioning a camera and rendering a view from that camera.

macouno
Posts: 0
Joined: Tue Nov 18, 2003 3:37 am

Post by macouno »

Hoehrer: Yeah well... theeth was looking into it a bit more deeply than that as well. But I spoke to him and like me he's rather stuck for time.

Also... as far as I can tell... the source hasn't really "stabilised" yet. At least last time I had errors compiling the cvs after update cause for instance they hadn't updated the makefiles yet.

Brandano: yeah that's actually a good idea where image compilation is concerned though I don't think much of the math is usefull here.

Thinking a bit further... if we're to try and really make something work in the best way we may need a slight change in the render API. Which means the coder (me maybe) will have to bug Ton a bit, since it's his baby. And as I understand his plans... the next month or so he's going nuts in project orange... then he'll have some time off after which he'll start documenting the new features. And that would be a good moment to bug him with questions perhaps. Thus... one certainty... I won't be doing any work till then (on this).

Post Reply