← Back to team overview

phatch-dev team mailing list archive

Blender action

 

Hi Juho!

2009/6/22 Juho Vepsäläinen <bebraw@xxxxxxxxx>:
> I just prototyped the Blender action a bit.
Great! I felt it was better to answer to this on the phatch-dev
mailing list as it might be important for other people developing
action lists in the future. Also good for Dwarrel to follow for the
documentation.

> I created the
> .blend needed (renders at http://bebraw.googlepages.com/box.png and
> http://bebraw.googlepages.com/box2.png) and a couple of test scripts. The
> .blend is not the greatest but probably works ok for now.
I think the best is we take a cool reference image and polish it from
there. For the background it would be nice if it could be saved as a
transparent png with transparent shadow. Would that be possible?
>
> I also figured out how to render via command line and pass args (piece of
> cake as we discussed about this earlier). I am still not 100% sure about the
> specifications so if you could please answer these questions:
> 1. Where should I put the .blend file(s)?
In the data/blender folder I've just added.

> 2. Where should I put the .py file(s) provided for Blender to execute?
Also in the data/blender folder with the same name as the blend file
but with .py extension.

> 3. Should the box be scaled according to the given image or is it alright
> just to map the image to predetermined coordinates?
The proportions of the box should be the same proportions for the
image for the width and height. In the blender file, give the average
of the width and height a fixed value and calculate the width and
height from there. (Better would be to keep the diagonal constant with
our friend Pythagoras, but average is fine for now, I guess.) This is
to prevent that a really tall box goes out of the camera.

> Should "depth" of the
> box be configurable?
Yes, it has to be a pixel field, so that it can be proportional as well.

> 4. How to handle the blank side? A couple of possibilities: use majority
> color of the image, use provided image, use given color, others?
Same as with color to alpha: a specified color value or being able to
pick the colors from the corners. I'd like also the depth side to
display a text, but that is more a second step after the box script is
ready.

> 5. Should the background gradient colors be configurable?
Yes please.
> Same applies for
> the surface color.
Also.
> Are there other aspects that should be configurable?
>
> While answering 1. and 2. keep in mind that I would like to write the action
> so that it's easy to extend (ie. write tiny UI part, write py part provided
> to Blender, create .blend). It's not too much extra work handle it this way.
Hmm.. not so sure what you mean. I like to use the data folder for it
as that is where we have all the other data (highlights, masks,
watermarks, ...). So I don't know if that fits your purpose or not.

We should later polish the fields by hiding some optionally. For
example there could be a gradient boolean. I've added the same
technique yesterday for exiftran and for the save action if type is
<type>.

Thanks for your great work. It really feels cool to have Blender as a
'plugin' for Phatch ;-)

Best regards,
Stani

>
> Sincerely,
> Juho
>
>
>



-- 
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be