Not followed all this thread but...

In AWData class around line 242, the materials are set

var matBitmap:BitmapFileMaterial = new BitmapFileMaterial(resolvedP +line)

if you look at the file loaded you will see the materials are defined near the end of the file.

Its easy loading your own materials ( so don't bother with bulkloader ) but not so easy to overwrite AWD materials with the current way the AWData and BSPTree are set up as once the material is set on the BSPTree it is set on every face, there is a replaceMaterial method, but it assumes you know the CentralLibrary material used so that you can search and replace on every face to do the swap.

Take a look at my posts on the ghost material they may give you some ideas as was trying similar stuff.


Cheers

;j


On 22 Oct 2010, at 13:44, le_unam wrote:

thank you fabrice = )

i will try it as you say, my thoughts were that anywere must awdata be
told where to get the images, but now i think this is set by default
and only if you want to change something you have to add something, so
i can search my whole live for this ^^

well of course i tried the caching thing and it doesnt work ... the
preloader loads all images then hte 3d starts and all images come up
step by step again, so its double loaded. when i dont start the whole
3d after loading, but only call the _view.render after loading it
seems to work, but i cant be sure that the images are double loaded
too, in the background. i think they will, so i want to go a safe way.
i try to follow your explaination. i think i understand what you want
to tell me ... thank you very much.
and dont forget, i`m really very sorry ;-)

On 22 Okt., 14:32, Fabrice3D <[email protected]> wrote:
really really really last time :))

my problem is that i dont know where and how awdata defines a
material, cause in the as-file is nothing like bitmap

AWData is in loaders package, it has nothing to do with the as Prefab outputs. search in AWData class "BitmapFileMaterial" and reread (carefully) previous mail

in the as that Prefab output or in your project file,
just add a listener to start the render once your bulkloader as done its job

Again: have you tried feed your bulkloader with the urls (to be found in the awd file)
and simply start your project after that?
Chances are that all images are cached and will be displayed at init with zero code changes!

Fabrice

On Oct 22, 2010, at 1:55 PM, le_unam wrote:

thanks for spending so much time for me  ... well i dont want to get
the whole code for my problem, so i dont want to use copy and paste
and i can follow your instructions and i know what you want to tell
me. my problem is that i dont know where and how awdata defines a
material, cause in the as-file is nothing like bitmap or bitmapfile or bitmapfilematerial. im sure i have to look more behind, but some words like "parse" dont have any clear meaning for me, so its difficult for me. cant you tell me simple where the awdata defines the material? the
prefab code for this is everytime same isnt it? it would be really
nice and this really will be my last question for this thing. you
helped me very well with your informations, although it looks like you
didnt ^^

On 22 Okt., 11:52, Fabrice3D <[email protected]> wrote:
I do not recall speak about loaders anywhere.

Let me try one last time:

where AWData defines a material, it uses bitmapfilematerial

replace that with a normal bitmapMaterial
make a tmp bitmapdata like 16x16
pass it to material.

--> now you have replaced "load automatically the source image" by "I make a temp material with very tiny image"

Add after that your queue object or whatever name that is in the api you use

var queueItem:QueueItem =  new QueueItem(urlfile, material);
yourWhateverBulkLoader.addToQueue(queueItem);
you probably will have to import your class in awd for this.

--> now you have passed to your api, the url to load the image, and the material refference

in the event where your queueloader triggers per loaded image
somefunctionImageLoaded(queueLoaderEvent:QueueLoaderEvent):void
{
BitmapMaterial(queueLoaderEvent.data).bitmap = queueLoaderEvent.bitmapdata;

}

--> each time an image is loaded, you replace the 16x16 tmp bitmap by the right one that has just finished to load

In your main project:
yourWhateverBulkLoader.addONEverythingLoaded(startawd);

--> when all images are loaded, its time to start the 3d party. all materials will have the propper bitmap set

Again, do not copypaste or argue on methods name, its a speudocode principle to show you how to implement.
It will very on api and your project construct.

But if you simply load all your images first then start your project when all loaded as now, with zero changes the images to be loaded by awdata (already preloaded by the bulkloader) are probably cached and would be there instantly.

Fabrice

On Oct 22, 2010, at 11:16 AM, le_unam wrote:

well i`m sure for you its no problem, but im not a pro like you ^^
maybe you can help me when i give you some code.

as you know the awdata-line is the following:

_tree = BSPTree(AWData.parse(new BSPFile()));

i get access to the loaded images like this:

loader.getBitmap("filename.jpg");

what can i do with this? how can i change the awdata line :-/

im really sorry for my missing knowledge

On 21 Okt., 17:21, Fabrice3D <[email protected]> wrote:
as I wrote in previous mail, just alter the awdata where it generates the bitmapfileMaterial

you could have a tmp small bmd, to pass instead of using bitmapfilematerial, then when loaded asign it to the material predefined. dunno what these loaders api are doing, but building a loading queue is not rocket science. All you need is pass to queue item the ref to the material. This would require one or two lines changes in awdata to be fully working.

Fabrice

On Oct 21, 2010, at 2:05 PM, le_unam wrote:

how can i tell the _tree = BSPTRee(AWData.parse .... should get the
images from the library than from images-directory?

On 21 Okt., 12:33, Michael Iv <[email protected]> wrote:
That what I meant under "commercial project " :)

Sent from my iPhone

On Oct 20, 2010, at 2:45 PM, banal <[email protected]> wrote:

You probably misread the license then. It is free for commercial use, *except* for projects where you charge a fee from the users that are
using the product.
In the words of the author:
----
The code will be used in a commercial game, web site, component, or software product for which a usage/access/license/ microtransaction fee
is collected from multiple customers.
----

That's the only case where you need to buy a "commercial" license. In
most cases, this doesn't apply.

On Oct 19, 2:41 pm, Michael Iv <[email protected]> wrote:
You are absolutely right it is even better in some aspects than Bulk BUT it
is not free for commercial use.

On Tue, Oct 19, 2010 at 2:39 PM, banal <[email protected]> wrote:
Slightly off-topic, but if you like BulkLoader, have a look at
"LoaderMax" (https://www.greensock.com/loadermax/).
It's my new Bulk-Loader of choice :-)

On Oct 18, 12:58 pm, Michael Iv <[email protected]> wrote:
You may use open source BulkLoader (see gogle code) powerful lib for
managing multiple loads

On Mon, Oct 18, 2010 at 12:49 PM, le_unam <[email protected]> wrote:
what does bulk load mean? never heard about it = /

On 18 Okt., 12:34, Fabrice3D <[email protected]> wrote:
Just bulk load the images, once loaded you init the awd file

Fabrice

On Oct 18, 2010, at 11:48 AM, le_unam wrote:

Hey, i have finished my first bsp project and now i want to create
a
preloader cause it is not really nice, if the user has a white
screen
first and the textures show up step by step. so how to do a
preloader
when created a project with prefab? any tipps?

--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air
|3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp ://
www.meetup.com/GO3D-Games-Opensource-3D/
Tel:054-4962254
[email protected]
[email protected]

--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp ://www.meetup...
Tel:054-4962254
[email protected]
[email protected]

Reply via email to