Game Development Community

Creation of Imposters Results in Unamed Material...

by Quinton Delpeche · in Torque 3D Professional · 12/16/2012 (11:18 pm) · 4 replies

Hi,

I have noticed that when you use the "Use Imposters" option inside the Torque3D Shape Editor and you save the shape, you start getting "[Material::mapMaterial] - Cannot map unnamed Material" alerts in the console.

I have run numerous tests and I am able to recreate this every time and it is definitely due to imposters. I have a 2 LOD object (in this example a Tree) set at LOD 512 and LOD 256. These work exactly as expected and when added to the level I get no material warnings or console errors.

I then load up the Shape Editor, load the Shape, and click "Use Imposters" and after the imposter dds files and cs file are created ... the warning starts appearing.

Remove imposters ... the warning goes away.


Now being the type of person I am ... I don't want to just ignore these warnings or remove them from the engine. So my question is as follows:

1). Do imposters require materials to be created for them? My initial thoughts say that based on that error ... they do.

2). What do I set the "mapTo" value for in the materials.cs file in order to get rid of this error? I have tried a few different iterations but to no avail.


Has anyone else experienced this? Does anyone have more information about imposters and whether they require materials?

Thanks

About the author

Gobbo Games is an Independent Games Development company operating from Durban in South Africa. We believe in creating high-quality cost-effective games that remain true to the belief of Independent Game Developers around the world.


#1
12/17/2012 (6:48 am)
Are you using dds textures with mip maps? Shot in the dark here, but perhaps it's whining because it has to create the mip map itself.
#2
12/17/2012 (6:52 am)
@Richard: I am using the auto imposter creation from the Shape Editor inside the Torque3D World Editor. It creates the DDS files automatically ... when I open the DDS file inside a graphic editor ... it has all the mip maps in it.

Not sure what else it could be.
#3
12/17/2012 (9:10 am)
Me either - and it's nice that it does that, but it's odd that it does not then add the created materials to the material.cs file. That should probably be happening but apparently a bug is interfering. Might be related to the issue that prevents material changes from being written sometimes.
#4
12/18/2012 (8:59 pm)
Oh well ... I have resulted in creating my own form of imposters inside the DTS object as a last LOD.

Basically I take a screen shot from the front - left - top inside Meshview ... and then slap those on to one of three planes inside the model.

Seems to work okay for me and there are no material issues.

*shrug* ... onwards and upwards I say. :)