Creating Journals with 'sketches' - Help for new creators

Special tutorials, usually for the exporter plugin, but also general modeling tutorials.

Creating Journals with 'sketches' - Help for new creators

Postby boblishman » Mon Oct 22, 2007 5:00 am

EDIT: February 4th 2008:

If you wish to produce working journals and linking books for ages that will be distributed via the ULM Library, you will need to use the python Dynamic Book Template (found via this link) created by D'Lanor.

If you use the (Alcugs) uam method, your linking books will not work for other people (journals will however still work).

It is recommended that you use the Dynamic Templates as they will handle an infinate number of books and journals within your age and will work when distributed via the ULM client.

This tutorial is designed for the latest GoWPyPrp Plugin version 1.2.1 release 4th February 2008 (or later version)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

As I have been helped tremendously by other people on this forum, I wanted to be able to 'give something back' ...

So, I thought I would share the results of some experiments I have been doing regarding creating jounals with "sketches".

I have created the journal using the D'Lanor's scripts (see above) and the information supplied HERE for making the content of the journal in the *YourAgeJournals.py file)

Because of the improvements to Blender and the new plugin (make sure you are using the latest versions of both!) it is now possible to use transparant (alpha) images in your journals.

These are ideal for "sketches" which will make your journal look more interesting and 'real'... (As the 'sketch' is transparent, the page shows through underneath it, to make it look like it's drawn on the page, as opposed to a 'solid' picture)

Here is how it looks ...

Image


Here's what I've found:

1) Your 'sketch' does not have to be of the usual 128 x128 (or variations) in size. The image used in the journal above is actually 400 x 204 pixels (after trying different sizes I found this to be best for the layout of my journal...



There is a MAXIMUM size limit in the size of your image (or they will appear "invisible") :
Maximum width= 512 pixels,
Maximum height = 470 pixels.

Make sure your filename is UNIQUE: e.g. "drawing.png" and "Drawingnew.png" will be read the same by PBML and it will use the first one it finds - reading from the begining of the filename (which may be the wrong one!). PBML will simply find the first file that matches (the initial part) of the filename ... so this is important. Your python code will contain the filename without the extention but, for some reason (maybe the capatisation) in this example, if your code calls <drawing> , PBML will actually try and display Drawingnew, and if this texture file is higher than 470 pixels ... you'll end up with an invisible image!

Also, make sure you insert a line break (\n) or page break (<pb>) before your image, (depending on it's size and position on the page relative to the preceeding text. You may have to experiment with the layout of your text to get your picture looking correctly placed on the page.)

2) The sketch is created as a .png file with the bottom layer totally transparent, and the 'sketch' on layer 2 of the .png

3) Create a simple plane & uvmap the png file to it and hide it under a floor or wall in your Blender model (this will get the texture into your .prp file on export)

4) Set the setting in blender like in the following screenshot: (switch off Mipmap AND Interpol, and switch on Alpha AND UseAlpha)

settings v1.2.1.jpg
settings v1.2.1.jpg (50.97 KiB) Viewed 9299 times


5) Finally, the part of the code in your *YourAge*Journals.py python file (where you want the sketch to appear) that controls the image should read :

Code: Select all
<img src="yoursketchfilename" align=center resize=no blend=alpha>


where yoursketchfilename is the name of the image file without the .png extention

6) An image will force a new line in your journal, and will not allow any text in the same line as the image.
Because certain image file sizes may conflict with the font size and line spacing size you have set for your text, always prefix your image code in your *YourAge*Journals.py file with \n (line break) or you MAY have some of your text in the line preceeding your image "rubbed out" by the alpha layer in your image.

7) All the code for your journal must be on ONE (continuous) line in the *YourAge*Journals.py file

Thats it!

Have fun,

Bob
Last edited by boblishman on Fri Mar 14, 2008 7:20 am, edited 12 times in total.
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Re: Creating Journals with 'sketches' - Help for new creators

Postby Kedri » Mon Oct 22, 2007 9:44 am

Woah, neat! Once I start getting into the python, I'll definately put this to use. :)
Kedri: Modeller and writer. KI# 72427
ImageImageImage
NaNoWriMo '07!
User avatar
Kedri
 
Posts: 109
Joined: Wed Oct 17, 2007 6:26 pm

Re: Creating Journals with 'sketches' - Help for new creators

Postby Yali » Mon Oct 22, 2007 5:43 pm

Cool! Now, what Age is that in the background? It looks scrumptious! :o
User avatar
Yali
 
Posts: 168
Joined: Tue Oct 02, 2007 7:59 am

Re: Creating Journals with 'sketches' - Help for new creators

Postby boblishman » Tue Oct 23, 2007 1:00 am

Yali wrote:Cool! Now, what Age is that in the background? It looks scrumptious! :o


That is Paah'kweh ... athough the version thats is available at ULM at the moment does not have the journal, the crates or the new linking book ...
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Re: Creating Journals with 'sketches' - Help for new creators

Postby Pryftan » Tue Oct 23, 2007 10:46 am

Looks awesome, and now that I have a working copy of the UAM hack I'll definitely try this.

However, I am going to move this topic to tutorials ;p
.rilvoohee vehrehnehm vokan pam mahnshootahv rub voohee taygahnehm mahtahntahv
User avatar
Pryftan
 
Posts: 312
Joined: Fri Sep 28, 2007 10:17 pm

Re: Creating Journals with 'sketches' - Help for new creators

Postby boblishman » Fri Dec 07, 2007 2:45 pm

bump ... (because the tutorial has been updated)
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Re: Creating Journals with 'sketches' - Help for new creators

Postby boblishman » Sun Feb 03, 2008 4:30 am

bump ... (because the tutorial has been updated ... again!)
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Re: Creating Journals with 'sketches' - Help for new creators

Postby Trylon » Sun Feb 03, 2008 12:51 pm

Bob,
don't forget - by deselecting the INTERPOL button, you disable compression - evne in the "generate release" version
(that one is new since gow-pyprp-1.2.0

it saves the trouble of going throug the whole texture cache deleting proces
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Creating Journals with 'sketches' - Help for new creators

Postby boblishman » Sun Feb 03, 2008 12:55 pm

The "problem" with the new plugin (which is not really a problem any more) was not the compression ... it's the resizing. Before (as you can see from above) we were able to use ANY size graphic ... but now the 1.2v plugin resizes them to base 2. (This seems to stop them appearing in the journal). A 512 x 256 doesn't seem to get resized (or if it does, it resizes it back to 512 x 256 - I think- ) so they appear correctly.
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Re: Creating Journals with 'sketches' - Help for new creators

Postby Trylon » Sun Feb 03, 2008 2:51 pm

oh yeah - gimme a second
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests

cron