@normen : I hope you don’t feel hard about a stuborn , annoying boy like I was
Here is some screen shot of what I’m doing and I really need helps, I know you wrote almost the SDK codes …
So my questions are :
1) VisualAsset Plugin: What is the best way to retrieve a Collection of Image of Assets thumbanil?
I want to make a visual asset, the model, texture, sound… and all the things from AssetPack 'll shown in visual way (with thumbnail image for example)…
I want to genarate the thumnail for model, texture, sound… the first time the plugin run and add a tag
<file type=“thumb” …
to each of Asset in assetpack.xml
As I read “AssetPackLoader” already has function to load asset, but the just the “Model” type-Node are wraped. Texture, sound is not really implements, so I extends “AssetPackLoader” a little bit …!!! SO GOOD SO FAR!
Now what I really concern is about read all the models and generate the thumnails, because this job take a lot of time!
What should I do, or just “brute-force” the render of all Nodes at one time ?=> May cause crash to the SDK!
No need to rewrite all this, AssetPacks are already there, its only bout adding the metadata and improving the browser (display the thumbs etc. in the properties window).
@normen said:
No need to rewrite all this, AssetPacks are already there, its only bout adding the metadata and improving the browser (display the thumbs etc. in the properties window).
1)The thumb in the Property window will be 16x16 restriction...?? So what I want to do is to make another TopComponent for viewing.
2) As I play around with my solution for now, I take the AssetBrowserTopComponent 's rootNode and take the Dom Element from it,
But really in the code, we don't have the funtion that parse Sound and Texture... to Node (can load it but not parse to Netbean Node!!!!) => So I extends AssetPackLoader... (A lot of Hack but the result is quite enough now)
Yeah, thats the issue when you try to implement some function as it is in another editor, it just doesn’t fit to whats there… Rather see how you get along with not hacking stuff and see what you need to do yourself (e.g. caching previews etc).
yes but a lot of Models will cause a crash ,you know!
I know we can make a preview out of our SceneApplication for the “thumbnail” job but from time to time I really think about a light-weight renderer (application) who is in a separate thread should take care of the job?
OK, here is my scenerio when loading official “WorldForge” asset pack, 390MB of model and texture, my new ( i5 and 1G Graphics Card Computer) take 24s to generate all the thumbnails, cause a remarkable delay on the SceneComposer!!!
I will try the recommended solution above and tell you guys the result… Thank a lot and cheer
The reason I concern about make attach previewv to SceneApplication thread is, the preview will be render before the real scene which showing in the SceneComposerTopComponent ~ Cause the delay for it, which is ugly !
That why I want a light-weight renderer which should take care of the generation by it self, not affect the run-time component , I will try to plot my stragegy first , then ask more, because now I still not very clear about the low level renderer my self .
@normen said:
Still it should be based on nodes and properties, if you display it in that window or not.
Yes, my TopComponent take data out of the real AssetBrowserTopComponent, you can say it depend and take all the benefit from that component, I dont rewrite much of course, consider it a clone but with extra feauture for that Component because I want two of them live well together, as see in other netbean platform application.
P/s:
I use ,
getTopComponent("AssetBrowserTopComponent").getExplorerManager().getRootNodes() <= One line of code, then use it for my display purpose, not extends anything!