FL and ZGE combination awesome and need to work out how to code it as quickly as possible .... fast track = set a problem and then code it ... e.g. take Ballz example and have daggers instead of balls where the daggers slowly morph into skulls which morph into cups.
I wanna write in App.OnLoaded.ZExpression:
var mshDagger:Mesh = new Mesh;
var mshSkull:Mesh = new Mesh;
var mshCup:Mesh = new Mesh;
mshDagger.meshImport = 'Dagger.3ds';
mshSkull.meshImport = 'Skull.3ds';
mshCup.meshImport = 'Cup.3ds';
var mshBase:Mesh = new Mesh; // base mesh used by model
mshBase.meshLoad(mshDagger); // load morph mesh 1
mshBase.meshLoad(mshSkull); // load morph mesh 2
and in mshBase.MeshExpression (since mshBase = new var, the meshExpression code must be inherited from a Mesh parent class Is this possible?):
// morph from Dagger to Skull
// change example code - replace circle algorithm with Dagger or Skull mesh
// be able to change runtime var that flags morph between Skull and Cup
mshDagger.unload; ?
mshBase.meshLoad(mshCup);
(can I write code like this in ZGE?)
I looked carefully at your good example and misread SphereMesh as MeshSphere and was thinking you were morphing between 2 loaded meshes - a sphere and a box ...... but you have 1 loaded mesh - the box and you are applying a circle algorithm in the MeshExpression, right? How would I morph between e.g. a dagger and a skull?
If this was done in a Shader, it would have to be in the geometry shader I think .... if I am reading correctly the Vertex Shader cannot change the number of existing vertices but can move them around ... the Geometry Shader can create primitives/vertices .... which would mean having to pass the 'morph-to mesh' to the shader and write an algorithm that could cope with different vertices count between to and from meshes, know how far it was between from and to, how to collapse/expand vertices count etc ...... possible with enough geometry primers?
Thanks!
Mic.