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 / HELP !! How to insert a video to object?

Author
Message
Dispenser Ting
7
Years of Service
User Offline
Joined: 18th May 2016
Location:
Posted: 29th May 2017 06:04
Can i create a 3D object in the DBPro, then locate a video on the object and play the video? Help
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th May 2017 12:07
Not used Dark Basic in years, but I seem to remember it involving Play Animation to Image, with the object using that image as it's texture. It's definitely possible, I have used it in the past.

Q6600. Nvidia 260GTX. 8 Gig Ram.
zero32
7
Years of Service
User Offline
Joined: 28th Jul 2016
Location:
Posted: 29th May 2017 14:37 Edited at: 29th May 2017 14:38
i checked my backup folders and found an old example project that i got with my copy of dark basic pro, called 3D Video. it does what you want to make and some more stuff.
i've added it to this post.

Attachments

Login to view attachments
Dispenser Ting
7
Years of Service
User Offline
Joined: 18th May 2016
Location:
Posted: 14th Jul 2017 09:46
Thank you for Respond. DVader
Thank you for the example. Zero32


Below is my Coding for that.

load animation "media\1.mpg",1
play animation to image 1,5,0,0,352,240
make object plain 2,352,240
xrotate object 2,-45
position object 2,0,100,0
FIX OBJECT PIVOT 2

do
TEXTURE OBJECT 2,5
CONTROL CAMERA USING ARROWKEYS 0,5,5
sync
loop


But, the problem is the plain object is black screen but with audio playing. Very wired. I try many format, AVI, MPG, MP4, WMV. AVI, WMV and MP4 will play the video, but in another window (called active window). MPG play the audio, but the object remain black screen.

Dispenser Ting
7
Years of Service
User Offline
Joined: 18th May 2016
Location:
Posted: 14th Jul 2017 09:49
zero32, I already try the 3D video file that you had attached. The audio is fine, 3D environment is fine, but still the "object screen" is still blackout.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 14th Jul 2017 19:54
For one thing, you only need to texture the object once during setup, you dont need to call it every loop
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Jul 2017 19:00
@Dispenser Ting

I tested your code with an AVI file, a .WMV, a .MPG and a MOV file that I had lying around and they all worked with DBP Upgrade U77RC7 with some very minor changes to your code. Here's the code I used (although as Ortu noted you don't need to use TEXTURE OBJECT inside the loop}.

Which version of DBPro are you using?

Dispenser Ting
7
Years of Service
User Offline
Joined: 18th May 2016
Location:
Posted: 17th Jul 2017 09:57
@Green Gandalf

I use the latest version of the open source file. Is that the one that you are using? Since it is open source I face a lot difficulty. Just can't get everything right like previous purchase version. Especially the the example and tutorial in the previous version, which rely that a lot for my project. Now all gone! Sad Sad Sad.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th Jul 2017 22:22
No, I use the version from this thread:

https://forum.thegamecreators.com/thread/180294
Dispenser Ting
7
Years of Service
User Offline
Joined: 18th May 2016
Location:
Posted: 18th Jul 2017 07:53
@Green Gandalf

IT WORKS. Thank you for sharing link to download the U77 version.
https://forum.thegamecreators.com/thread/180294

I reason for my previous version (open source) from
https://forum.thegamecreators.com/thread/217979 cant play the animation in program.

All you need to do is download a free version of the DBPro from c-net ,
http://download.cnet.com/Dark-Basic-Pro/3001-2247_4-75622155.html

and install the U77 version.

Should be ok then.
credit to Green Gandalf

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Jul 2017 13:20
Glad I was able to help. Thanks for the feedback - and enjoy your coding.

Login to post a reply

Server time is: 2024-04-20 08:10:41
Your offset time is: 2024-04-20 08:10:41