2006-07-08

parse error at end of input

I got that error out of gcc 3.3.4 when I forgot a parentheses:


for (unsigned i = 0; i < troops.size(); i++) {
if (troops[i]->active) { troops[i]->update(timestep);
}


It gives the last line in the file as the line number, so it's not an easy one to track down.

2006-07-05

DVD Chapter markers in FCP + iDVD

I finally learned how to create dvd chapters in Final Cut Pro and iDVD (at least the 2006 version). Pressing the 'm' key, or the '`' key, or going up to the marker menu will add a mark, but you also have to make sure it adds a designation (anyway to do that by default?)- the easiest thing to do is press the '`' key and then the dialog that has a 'add chapter' button is right there, otherwise it takes additional steps.

iDVD, upon importing the exported video (and I think it can be exported as nearly anything in the quicktime export option and the proper markers will survive) will create a 'play movie' and also have a button for selecting chapters from a auto-generated screen full of chapters. You can then change what picture or clip of video is shown for that submenu, but it's not frame-accurate- trying to scroll with the mouse (especially for a longer video) or pressing the left and right arrow keys usually jumps many frames forward or back.

There's also the 'best quality' vs. 'best performance' option, I couldn't fit a 70 minute video with 'best performance' enabled so I had to change it from that default. I probably wanted 'best quality' all along anyway but I didn't know about it until it complained about the length of the video under the old option.


DVD Studio Pro

I have tried making a video with DVD studio pro, mainly to be able to create chapters before I knew the above steps, and also because an earlier version of iDVD was not exporting the 16:9 video correctly- it would look normal widescreen for five minutes and then it squeezed the video a little so there would be black vertical bars on each side. Strange...

DVDSP isn't that hard to use, but it has a major failing for me: it can only use HD video if a HD dvd is being made. iDVD will automatically recode most any video thrown at it, but here an additional very time consuming step is added, one has to export the video from FCP in a SD format ( I chose DV50), the 16:9 aspect ratio won't survive the export but in DVDSP there's an option to force the video back to 16:9. But it's a huge pain to have to do that extra export.

2006-06-08

osgClouds

Modified osgforest example to produce this simple cloud layer in osg:

image hosting by imagevenue.com

With this code (provided here under the GPL):


void ForestTechniqueManager::createTreeList(osg::Node* terrain,const osg::Vec3& origin, const osg::Vec3& size,unsigned int numTreesToCreate,TreeList& trees)
{

float max_TreeHeight = 15*sqrtf(size.length2()/(float)numTreesToCreate);
float max_TreeWidth = max_TreeHeight;

float min_TreeHeight = max_TreeHeight*0.3f;
float min_TreeWidth = min_TreeHeight;

trees.reserve(trees.size()+numTreesToCreate);

float ceil = origin.z()+900.0f;
float floor = origin.z()+300.0f;

for(unsigned int i=0;i {

Tree* tree = new Tree;
tree->_position.set(
random(origin.x(),origin.x()+size.x()),
random(origin.y(),origin.y()+size.y()),
random(floor,ceil)
);

float colorFactor = (tree->_position.z()-floor)/(ceil-floor);
colorFactor = 0.3 + colorFactor*(1.0-0.3);
int color = (int) ((1.0 - (1.0-colorFactor)*(1.0-colorFactor) ) *255.0);


tree->_color.set(
color, color, color,
255
);


tree->_width = random(min_TreeWidth,max_TreeWidth*(1.3f-colorFactor) );
tree->_height = random(min_TreeHeight,max_TreeHeight*(1.3f-colorFactor) );
tree->_type = 0;

//if (terrain)
if (0)
{
osgUtil::IntersectVisitor iv;
osg::ref_ptr segDown = new osg::LineSegment;

segDown->set(tree->_position,tree->_position+osg::Vec3(0.0f,0.0f,size.z()));
iv.addLineSegment(segDown.get());

terrain->accept(iv);

if (iv.hits())
{
osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(segDown.get());
if (!hitList.empty())
{
osg::Vec3 ip = hitList.front().getWorldIntersectPoint();
osg::Vec3 np = hitList.front().getWorldIntersectNormal();
tree->_position = ip;
}
}
}

trees.push_back(tree);
}
}

2006-06-04

HDV to DVD

Exporting 1080i video from FCP is not a good idea if the video is going to going to iDVD. iDVD doesn't deinterlace it itself even though it converts it down to standard definition.

I'm not sure about this, but I think it's best to make the sequence settings set to the resolution desired as well as selecting the right compression when exporting- this will ensure that the aspect ratios are correct and what you see in the output window is mostly correct.

Of course, exporting to HDV 1080i when the source is HDV 1080i is relatively fast, any conversion is not going to be speedy. While editing, it's best to have the timeline in the same settings as the source clips, otherwise FCP will try to convert it on the fly and give a poor quality RT preview or simply say 'unrendered'.

I've ran into a few glitches with this process: On one project, dropping the HDV 720p files into iDVD (from iLife '05) results in the proper anamorphic 16:9 'enhance for wide-screen tvs' type video. Previewing the video in iDVD and everything looks right- the video fills the entire 16:9 preview box. But after burning it, only the first 10 minutes or so is the proper format- although the video is still in 16:9 anamorphic, for some reason the video is squeezed horizontally by about 10%, leaving black bars on the side. This didn't happen on an edit or transition between different timelines, just right in the middle of a continuous shot. WTF?

Another problem, perhaps related to above, is that some text I thought would be on the bottom of the screen got chopped off- this I think is because the conversion from 1080i to 720p chopped some off, or that the glitch above not only squeezes the video horizontally but also stretches it vertically and then cuts off the botton.

So currently I'm googling for better processes to replace all this, one semi-promising one advises to export to DV50 at some point.

2006-05-19

Beast Please Be Still at Chop Suey

Beast Please Be Still (or here) call themselves "a nine piece instrumental landscape from Seattle. A collection of emotive story-telling, the music of this collabrative sounds like an orchestra of beautiful, post-everything."



There's a lot of shaky camera work I could have covered up with editing, while still preserving the sound of the entire set... but that would have been too much work.

The Chop Suey venue seemed decent, though for the size of this band the stage was crowded, I couldn't see a few people because the lights weren't on them or they were behind too many other people. The stage is also too recessed rather than jutting out into the crowd space, contributing to the difficulty in seeing the band.

youtube video from someone else of the same show. It's also edited down. I was scooped by a couple of days...