Talking Books Help Required

General debates and discussion about the Guild of Writers and Age creation

Talking Books Help Required

Postby J'Kla » Thu Jul 19, 2018 10:33 pm

I know the first level option has to be available as this is just replacing a book animation with an audio clip.

First Level functionality:
That is I have a book in my age in place of having it open for reading I want it to play an audio clip.

The second level should work now I just could not get it to play (note static images not animated).

Second Level functionality:
The book has embedded images.

Third level is new, note I still want to turn pages and have different clips for different images on different pages.

Third Level functionality:
Clicking on those embedded images on pages plays an audio clip (in place of First Level functionality).

Fourth Level functionality:
Closing the book or turning the page stops the current audio clip.

The final level is a linking book. :)

Fifth Level functionality:
Clicking the image links to a new location.
User avatar
J'Kla
 
Posts: 1003
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: Talking Books Help Required

Postby J'Kla » Sun Jul 22, 2018 1:57 am

I have spotted there is a sound effect thats trigered when you open a book and what sounds like the same sound effect when you turn a page.

I am wondering if there is some way to trigger this to activate another sound clip?
User avatar
J'Kla
 
Posts: 1003
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: Talking Books Help Required

Postby Deledrius » Sun Jul 22, 2018 3:18 am

Unfortunately, it looks like the sounds in this case are hard-coded in the engine: https://github.com/H-uru/Plasma/blob/ma ... 1090-L1103

This means there is no way for an artist to specify them on a data level.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

Re: Talking Books Help Required

Postby J'Kla » Sun Jul 22, 2018 4:31 am

I suppose there was no harm in asking.
User avatar
J'Kla
 
Posts: 1003
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: Talking Books Help Required

Postby Sirius » Sun Jul 22, 2018 5:42 am

Hmmm, all of this is doable but not with the current system.
The Korman journal component is simply a shortcut that calls the xJournalBookGUIPopup.py python script. This script only supports standard text, static images and movies.
However with a custom Python script this should be doable. Myst V had talking books, and with a custom script you might even go as far as put one audio clip per page. But it would be complex to setup.
Clickable images is a bit simpler but then require a custom Python script too.

If you want static images or movies into your journal, check my tutorial (scroll down to "Plasma HTML" section), it might help you.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Talking Books Help Required

Postby Deledrius » Sun Jul 22, 2018 10:50 am

Sirius wrote:Hmmm, all of this is doable but not with the current system.

The talking book should be quite doable even with the current system. You just need to use the right markup, I think.

Sirius wrote:The Korman journal component is simply a shortcut that calls the xJournalBookGUIPopup.py python script. This script only supports standard text, static images and movies.
However with a custom Python script this should be doable. Myst V had talking books, and with a custom script you might even go as far as put one audio clip per page. But it would be complex to setup.
Clickable images is a bit simpler but then require a custom Python script too.

Building your own GUI replacement for a book should do it, too.

The only thing I was saying was not possible was changing the open/close audio when using a standard book.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

Re: Talking Books Help Required

Postby Sirius » Sun Jul 22, 2018 12:54 pm

Oh, I didn't mean to imply what you said was wrong, Deledrius. I was only saying some of the things in J'Kla's first post would be harder to do without a custom Python script.

Deledrius wrote:The talking book should be quite doable even with the current system. You just need to use the right markup, I think.

Markup ? I don't think Plasma HTML supports playing audio files, though ?
However, yes you could play a sound when the player clicks the book, and stop it when the avatar exits a detector region. Not really my preference but that would work :shrug:
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Talking Books Help Required

Postby Deledrius » Sun Jul 22, 2018 1:10 pm

Hmm, I think you're right about the audio. This is something that would require a lot of custom work to accomplish.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

Re: Talking Books Help Required

Postby J'Kla » Tue Jul 24, 2018 3:34 am

I am following your Tutorial Sirius.

Note this is being tested with a home LAN based dirtsand shard and this is the MOULa export from Blender Korman.

I have added three new objects to my age these are planes of the corrected aspect size for may document pages.

147 wide x 210 tall

I have named these Page01, Page02 and Page03

Each has its own Material with the Same Name

And is Textured with Named textures following this naming convention.

I have exported my age with these as three additional plasma objects.

I then used Prp Shop to find out what therse textures have been named and they are

Page01.dds
Page02.dds
Page03.dds

Now Page 01 is the cover and for my Journal I have used the image created for the journal cover as it appears in age as the pop up journal cover and as this allready works I figured I won't need to use Page01.dds

I am using the Localization Editor to edit the content of the journal and I am able to add page breaks center and align text.

The following code segment is the data I am adding to this journal I get blank pages but no graphics.

The texture is added from .png files that I have resized to 512 x 512 for import and they are unwrapped from view bounds to the objects and they appear to be ok in blender.

In Prp Shop viewing the dds files the textures appear as I would expect.

The reason we we can see GibsonCover01.dds is because I re-puposed this document to save time. Plus when I tried to make a new document it all went squirlly (wrong).

Code: Select all
<cover src="GibsonCover01.dds"><font size=18 face=Tahoma color=000000><margin left=62 right=62 top=48>

<pb>
<img src="Page02.dds" align=center>
<pb>
<img src="Page03.dds" align=center>
<pb>

<pb><p align=center>
WELCOME

TO
<p align=left>

The GREAT EXHIBITION of the NORTH

GetNorth2018


The page breaks appear to be working the cover is fine the text appears as expected just no graphics.

I was wondering if this is something to do with an alpha chanel although I tried this before and went through a number of changes and never managed to get an image on the page.

[edit]
I changed the cover to be Page01.dds and that worked fine so it looks like the texture part is ok it just is averse to aditional graphics pages as if there was a typo in the <img src=> part and that is just being ignored. :?
[/edit]

[edit2]
I tried removing the space between img and src and it posted the complete line as text in the journal so it looks like the line is beaing read.
[/edit2]

[edit3]
Tried loosing the quotation marks , no change.
[/edit3]
User avatar
J'Kla
 
Posts: 1003
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: Talking Books Help Required

Postby Sirius » Tue Jul 24, 2018 11:18 am

The planes themselves aren't used when opening the book - they just force Korman to export the texture so it's available by the book later. So they don't have to be any particular size, they just need to be out of view.
Keeping the texture resolution at a power of two is a very good thing too (although since the aspect ratio isn't controlled by the plane it's on like I said, you have to make sure it doesn't stretch).

As for why the images don't show up... I haven't faced this issue often so I only have a vague idea of what might be wrong.
  • The most common problem is the image is too big to be displayed in the book. Try setting the margins to 0. If that doesn't work, also try to scale down your textures to 256x256 (512 should still work, but I've seen cases where it doesn't)
  • It could also be an encoding issue. In this specific case it's a good idea to add an alpha channel to the texture (even if the texture itself has no transparent areas), and use "blend=alpha" in the journal source.
  • I don't know if it's actually useful (it might in fact be detrimental), but you could try adding "resize=no" (or maybe resize=yes) just before "blend=alpha".

If that still doesn't work, could you try clicking the texture in PrpShop and see what the "Texture Properties" are ? (bit per pixel, compression type, size and color space). This might give us a clue about what is wrong.

Hope that helps you.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron