Another kind of stupid question :)

cobra8472

09-11-2007 18:30:10

I glanced through the tutorials and the wiki, and couldn't find anything on it. How does one actually define the textures to be used for the billboards?

I just tried a mesh I created in max (very simple material, colour and alpha). It showed up untextured with no alpha translucency.

This is probably documented somewhere, but I can't find it.



Thanks, and awesome work btw!

JohnJ

09-11-2007 18:45:00

The impostor billboard images should be generated automatically - there's no need to create them yourself. Are you saying that distant (impostored) trees appear as opaque, untextured square billboards? If so then there must be something wrong with the impostor renderer. Can you confirm whether or not this problem only appears in your application, or if it also appears in the included examples?

kungfoomasta

09-11-2007 18:47:34

very simple material, colour and alpha

It showed up untextured ...

You are using a texture in your material, right?

cobra8472

09-11-2007 22:11:39

The impostor billboard images should be generated automatically - there's no need to create them yourself. Are you saying that distant (impostored) trees appear as opaque, untextured square billboards? If so then there must be something wrong with the impostor renderer. Can you confirm whether or not this problem only appears in your application, or if it also appears in the included examples?

Yeah, I'm in the beginning stages of creating a cloudsystem for our project, so instead of trees, I'm using pagedGeometry for clouds.

Anyways, yeah, the distant clouds appear completely untextured. This does not happen in the examples provided.

an image;

cobra8472

09-11-2007 22:13:21

very simple material, colour and alpha

It showed up untextured ...

You are using a texture in your material, right?




material cloud2m
{
technique
{
pass
{
lighting off
ambient 1 1 1 1
specular 0 0 0 1 10
cull_hardware none
cull_software none
depth_write off
scene_blend alpha_blend


texture_unit
{
texture_alias Map #1
texture cumulus01.tga
}
}

}

}




Thats the material file.






Thanks for the help!

JohnJ

10-11-2007 22:08:30

I can't quite tell what's wrong from the picture you posted, but aside from what appears to be border lines around the cloud impostors, it looks fine. I'd try:

A. Using ImpostorPage::setImpostorBackgroundColor() (not sure if this is the exact function name :) ) to set the background color to white (or whatever color your clouds are) to eliminate the border.

B. Make sure you have all the lighting, etc. set up properly by the time you first render PagedGeometry, since this is when new impostors will be generated. If lighting isn't set up properly then, your impostors won't look correct.

C. Consider abandoning the use of PagedGeometry impostors for clouds. ImpostorPage was really designed for just one thing: displaying effecient impostored trees. Something as "unmaterial" as clouds will be very hard for the impostor system to render properly.

Personally, I wouldn't use PagedGeometry at all for clouds. PagedGeometry was designed for "solid" objects like trees, grass, rocks, etc., so you may encounter even more difficulties if you continue. It would not only be more efficient, but most likely much easier to create your own cloud rendering system from scratch (probably with the help of Ogre's BillboardSet or PagedGeometry's StaticBillboardSet). But if you want to try using PagedGeometry, I'll offer all the help I can, but I can't promise it will work out well for clouds.

cobra8472

11-11-2007 00:27:02

I can't quite tell what's wrong from the picture you posted, but aside from what appears to be border lines around the cloud impostors, it looks fine. I'd try:

A. Using ImpostorPage::setImpostorBackgroundColor() (not sure if this is the exact function name :) ) to set the background color to white (or whatever color your clouds are) to eliminate the border.

B. Make sure you have all the lighting, etc. set up properly by the time you first render PagedGeometry, since this is when new impostors will be generated. If lighting isn't set up properly then, your impostors won't look correct.

C. Consider abandoning the use of PagedGeometry impostors for clouds. ImpostorPage was really designed for just one thing: displaying effecient impostored trees. Something as "unmaterial" as clouds will be very hard for the impostor system to render properly.

Personally, I wouldn't use PagedGeometry at all for clouds. PagedGeometry was designed for "solid" objects like trees, grass, rocks, etc., so you may encounter even more difficulties if you continue. It would not only be more efficient, but most likely much easier to create your own cloud rendering system from scratch (probably with the help of Ogre's BillboardSet or PagedGeometry's StaticBillboardSet). But if you want to try using PagedGeometry, I'll offer all the help I can, but I can't promise it will work out well for clouds.



You are indeed, most likely correct. I've hit a brick wall to do with individual cloud culling with a bottom-darkening shader too, so I'll be using billboard sets for the clouds instead.

Thanks for the assistance. PagedGeometry is great. You can expect more noobish questions in the future ^^