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 / Rendering text on multiple cameras?

Author
Message
Skywriter
15
Years of Service
User Offline
Joined: 27th Aug 2008
Playing:
Posted: 22nd Nov 2014 10:38
Hi, is it possible to render text to multiple cameras? I tried "set current camera 1" but it doesnt do the trick. I want the text to render to camera 1 instead of camera 0 and then render this to image. There is my code:





Sky. It's at my fingertips...
Webpage at http://skywriter.comuf.com
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 22nd Nov 2014 11:24
I think you can do that (along with other drawing operations) by using set current bitmap -cameraId.
Notice that the bitmap number should be the negative camera id.

Skywriter
15
Years of Service
User Offline
Joined: 27th Aug 2008
Playing:
Posted: 22nd Nov 2014 14:22
Hi Rudolpho. Can you post a sample code for this?

Sky. It's at my fingertips...
Webpage at http://skywriter.comuf.com
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Nov 2014 15:18
Quote: "I think you can do that (along with other drawing operations) by using set current bitmap -cameraId.
Notice that the bitmap number should be the negative camera id."


Exactly. Here's a simple demo:





Powered by Free Banners
Skywriter
15
Years of Service
User Offline
Joined: 27th Aug 2008
Playing:
Posted: 22nd Nov 2014 15:44
Thanks guys, that works fine.

Sky. It's at my fingertips...
Webpage at http://skywriter.comuf.com
Skywriter
15
Years of Service
User Offline
Joined: 27th Aug 2008
Playing:
Posted: 22nd Nov 2014 15:59 Edited at: 22nd Nov 2014 16:42
I tried rendering .avi file to image and then texture object with that image. Why there is no sound?



Sky. It's at my fingertips...
Webpage at http://skywriter.comuf.com
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 22nd Nov 2014 20:33 Edited at: 22nd Nov 2014 20:33
Because you can only play images to an image?
You should separate the audio from the video and play that on its own (play sound / play music) if you want to play a movie animation to a texture with sound.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Nov 2014 22:39 Edited at: 22nd Nov 2014 22:46
Quote: "Because you can only play images to an image? "


What do you mean? That snippet works fine - including sound - for me.

Here's the version of that code that I used:



AVI file attached (from Civ2 ).

Edit @Skywriter Why did you put texture object inside the loop? It only needs to be set once - before the loop. Makes very little difference in this case but it should still be outside the loop.



Powered by Free Banners

Attachments

Login to view attachments
mr Handy
16
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 23rd Nov 2014 02:26
Guys if anyone knows how to use ffmpeg open-source library to play videos in DBP? Leaving media handling to Windows as is means that on some systems could be no sound or video.

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 23rd Nov 2014 21:59
Quote: "What do you mean? That snippet works fine - including sound - for me."

Really? To be honest I haven't used it in.... well I don't know how long, I just assumed that "playing an animation to a texture" would not include any sound stream that may or may not be present in the animation file. Sorry if I made my assumptions sound like facts.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Nov 2014 23:28
Quote: "I just assumed that "playing an animation to a texture" would not include any sound stream that may or may not be present in the animation file."


So did I till I tested it.



Powered by Free Banners

Login to post a reply

Server time is: 2024-03-29 02:33:41
Your offset time is: 2024-03-29 02:33:41