Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Open source Cut-Scene creator [Take-1]

Author
Message
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 12th Apr 2011 15:33
I brought this over from the thread that Diggsey had started about his video plugin.

Quote: "Frankly I was hoping a few people might want to get involved but the lack of interest from people wanting to help has left me just getting on with it on my own. Also I might be re-thinking the style of the game I'm making the editor for slightly which reduces the need for the 3D part of the editor somewhat. I'll probably be finishing "Take-2" first which will be an editing suite for adding effects etc."


I know how you feel about being "left holding the bag" on projects. I've had that happen to me many times, and by close friends too. My advice to you is to stay focused and forge ahead on your own. Who knows? You might see and influx of help later on.

As far as my video plugin goes...

I actually hesitated about saying anything because right now my plugin is in very very early development. Some of this is still involving thorough research into the resources needed. One of those being DirectX. I'm fairly new to using it directly. The whole goal of this project is to teach myself something new more than anything else.

My thoughts at the moment are that the plugin is going to be for free once I release it. I'm using pre-existing resources which to my knowledge doesn't require any special liscensing to use. Other than the plugin itself, you wont be required to load or install anything else unless you wish to add more video codecs to your system. It will also be very simple to use.

I wont be taking any feature requests nor will I be giving any "play-by-play" updates to my developments at this time.

Here is another dll for writing avi files:
http://www.studiox64.com/blitzavi.php

I believe it does require a liscense to use it. It does video compression, but no audio.

There are a few examples of how to use it floating around here in the forums. Just do a forum search for it.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2011 15:43
Thanks D Ogre!

Quote: "Here is another dll for writing avi files:"

Yeah I saw that one too. I'll stick with the free / uncompressed version for now. Compression could be achieved using third party software easily enough anyway...

Let me know if you finish / need Beta testing on your plugin

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 12th Apr 2011 15:51
Actually, uncompressed video would be best during the production phase for optimal video quality. Once the editing is all done, use compression for the final release.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2011 16:11
Yeah, I'll save compression for "Take-2" (the video editing component)

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 16th Apr 2011 04:08
@ baxslash

I think I have most of the research for my AVI plugin finished, and I did a few small tests. I believe I'm ready to actually begin development.

Possible feature support:

1. Screen Capture

You will have the ability to quickly grab a snapshot of the display and write it out to an open avi file. You will be able to specify the capture area (similar to get image, but hopefully much faster) and set the window focus for capturing.

2. Video Compression

During program execution of the plugin open avi file command, you will get a compression dialog window where you can select compression types. The type will depend on which codecs are installed on your system.

3. Audio Support

I don't exactly have all the details worked out. My objective is to have this feature at least work with .wav files, either from memory or from file, or possibly both.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Apr 2011 22:39
Quote: "I think I have most of the research for my AVI plugin finished, and I did a few small tests. I believe I'm ready to actually begin development."

Great!!

Quote: "similar to get image"

That could be useful in many ways...

Quote: "During program execution of the plugin open avi file command, you will get a compression dialog window where you can select compression types. The type will depend on which codecs are installed on your system."

Sounds very well thought out

Quote: "Audio Support"

That would be great but I think it'll be fine without to start with as most sound could be edited in using other software anyway (Take 2?)

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 24th Apr 2011 00:41 Edited at: 24th Apr 2011 00:58
The screen/window capture, as of right now, doesn't work exactly like get image. It makes avi compatible DIBs, and it's designed for optimal performance doing so. This function most likely will be internal and exclusive to my plugin.

Audio support is actually not that hard to implement. I already have from file supported. I still have a few small details to work out for wav data in memory, but I should have that part done soon. The data just has to follow the WAVEFORMATEX structure. Just as a side note, you can have multiple audio streams within an avi, but one is usually common.

I just thought of something to ask...

Would you like the open dialog for video compression options be flag switchable? Meaning that your program can have selection control and not the user. I've been debating this and would like some input.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 24th Apr 2011 13:13
Quote: "Would you like the open dialog for video compression options be flag switchable? Meaning that your program can have selection control and not the user. I've been debating this and would like some input. "

It might be nice to have the option so that you could have an "Automatic" or "Manual" mode for the options.

Sounds like it's going to be a very useful plugin

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 25th Apr 2011 05:50
Hi baxslash, not many Cinema Editor Projects around heres. Sorry, about your TCS Blobby 101. I intend to develop a Cinema Editor similar to Unreal Matinee with the Super 3D Game Platform. I really enjoy using the Layer-based TimeLine UI. All Animation Editors I've tinkered with use one. Do you intend to use something similar in Take-1?

Also, I anticipate one would have to produce the scenes in real-time in order to the record video. So why not use that information to render scenes in Real-Time in any Game Engine? I've pondered over 1) A method of recording/playback for this information; 2) The development of a API that handle the Import, Binding, and Playback using Game's 2D/3D/Audio Resources.

I'm curious if you intend to use the animation data in real-time. I'm aware this is not part of the original idea, IMHO this data is extremely valuable and would integrate Cut Scenes seamlessly into the game. In fact, these Scenes could be part of the interactivity, like in a Rail-shooter.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Apr 2011 08:14
Quote: "I really enjoy using the Layer-based TimeLine UI. All Animation Editors I've tinkered with use one. Do you intend to use something similar in Take-1?"

Hi TechLord. Yes I was thinking along those lines but more for "Take-2" which will be the editing component. Take-1 will be a tool mainly for 'filming' scenes in 3D.

This will only be used to create AVI's and not to store animation data in some other way. I'm hoping to include physics, advanced lighting and many other effects to allow for fairly high quality animations which will no doubt run 'slowly' on some PC's but as it's only recording one frame at a time it won't matter if it takes 30 seconds to record a 15 second animation (for example).

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 25th Apr 2011 11:05 Edited at: 25th Apr 2011 11:06
Quote: "This will only be used to create AVI's and not to store animation data in some other way."
Are you sure about that? How do you save the scene data for continuous work?
Quote: "
Stage 1
I want to be able to:-
Load objects
Create and save "Actors"
Keyframe animation of characters
Place cameras
Place lighting
Record a simple scene"


baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Apr 2011 14:09
Quote: "Are you sure about that? How do you save the scene data for continuous work?"

Good point but what I meant is I won't be making it into a feature. I'll keep the format simple so that saved data can be used for other purposes in that case. I guess it wouldn't be too hard to use from a text file particularly if it's well commented...

Thanks for the idea!

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 27th Apr 2011 16:31
blaxslash, Im getting close to finishing the Avi plugin. I Just need to finish up a few things with the sound, and then I'll give it a go on testing.

If everything goes right, this is what we got right now:

OPEN AVI TO WRITE filename, ShowDialog, FPS, SoundID, hWnd, left, top, right, bottom

Parameters:

filename - name of the new avi file.

ShowDialog = True/False flag for compression dialog.

FPS - Video Frames Per Second for the avi.

SoundID - DBPro Sound you wish to add to the avi.

hWnd - Window Handle to the source output to capture frames from. The frame capture gets the client region of that window. Also provides the avi compression dialog the parent window.

left, top, right, bottom - area of client window region to capture.


How Use Pseudo-code:


The code above makes use of IanM's Matrix Utility.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Apr 2011 16:38
That looks very simple to use. I only have one slight problem as far as sound is concerned, I'm guessing I'd have to make one single sound clip that has all the sound for the scene already in it?

That would make it tricky to sync sound to action especially if you needed to make a change to the animation. Is there no way to use whatever is being sent to the sound card instead? That way we could add sounds interactively and to explosions etc and they would be picked up in the avi... just a question. Your way is OK but limits the use of sound quite a lot.

Can't wait to try it out. If you need a Beta tester you know where to find me

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 27th Apr 2011 16:48
My idea was to allow you to add a premade soundtrack. Your right, it does limit the use of the sound feature. It may be possible grab the audio directly, I'm going to have to look into that... If it's possible, I'll make that happen instead.

Give me a little bit to research that feature and I'll get back to you.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Apr 2011 17:02
Quote: "Give me a little bit to research that feature and I'll get back to you."

If you manage it I think you'll be the second ogre I ever loved!

It would be great to be able to load and add sound dynamically in the editor!

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 27th Apr 2011 17:54 Edited at: 27th Apr 2011 17:55
Bad news! You can't capture the mixed output.

An application can create and start the buffers that need to be mixed, but it's up to the sound card driver to do the job. This is Kernal mode stuff that software at application level can't access. However, SOME soundcard drivers allow loop back to the record in, but we can't do it on the fly dynamically with syncronized results.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Apr 2011 17:59
That really is bad news... I guess I'll put sounds in so people can capture the sound stream however they want and put it back in afterward.

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 27th Apr 2011 18:12
Now wait a second, maybe we can approach the audio problem another way. We could make use of multiple streams within the avi. The trick is to know how many we need and deliver each audio source at the right time.

Let me ponder on this for a while...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Apr 2011 18:19
I see roughly where you're going with that. Sounds interesting. It would be more of a programatical approach in DBP than a change to how the plugin works if I understand you right?

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 27th Apr 2011 18:36
I see both. I would have to allow mutliple audio streams and we would need some sort of audio padding (mmioFOURCC('J', 'U', 'N', 'K') for each stream.

Maybe like prebuild the audio track with each sound before hand.

Open avi file to write
ADD SOUND prepadding, SoundId, postpadding
...
...
Then on to the video loop

Don't know yet. Just some idea I'm throwing out.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Apr 2011 18:35 Edited at: 28th Apr 2011 18:36
I got sick of not getting anywhere with this as I was getting hung up on flighty details like menus and effects. I've thrown all that stuff out for the time being and started on keyframing in ernest...

Here's a quick view of the keyframe editor which you can only edit the current frame on at the moment (it just displays which frame that is) but I'll be making the system for each object's position / rotation / animation next which will allow you to set each of these features per second. Any changes made to the object while keyframing is active will be saved and interpolated between the previous and current 'saved' keyframe.



To start with I'll be using direct interpolation but eventually I'm hoping to allow for curved interpolation so that camera movements can be smoothed out (for example).

Attachments

Login to view attachments
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 28th Apr 2011 22:08
I've been doing some serious digging on the whole audio capture problem. I've look at WASAPI for Vista and 7. It looks intriging, but I still want XP compatiblity also. I also looked into ASIO and Virtual Cable. I didn't want to get into the whole sound card driver thing either. The only thing that I can come up right now is possibly using WinMM to do the job.

The only problem is that WinMM only deals with integer samples. This means I can capture sound only at 2 channel stereo, 16 bits, up to 48 kHz sample rate.

I did a quick test with a demo audio capturing program using WinMM that produces raw wav files with a DBPro program that plays audio. It does capture the audio, but not without some distortion due to format resampling.

With that said. I can say we do have audio capture support for writing the avi files, but at the cost of audio quality.

What I may do is make this plugin be split into two categories to reduce the CPU load. One for audio capture, and the other for video capture. Then have the ability to combined the two.

Your program would generate the final avi by running the animation sequence once for the video, and the again for the audio. Each can be truely dynamic!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Apr 2011 00:50
Fantastic! That's great news D Ogre!!

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 29th May 2011 14:33
Hey, baxslash. Are you still working on this project?

I had to take a short break on my plugins myself... I think I was bleeding out my eyes looking at the code. I'll be picking back up this week sometime.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th May 2011 15:17
Hi D Ogre, yes still working on it when I get the chance!

Login to post a reply

Server time is: 2024-05-07 00:48:48
Your offset time is: 2024-05-07 00:48:48