Babylon3D: Standard Edition

1 favourites
From the Asset Store
12 unique hits, slashes and spells in transparent PNG sequences
  • The vertex morphing can only be used with the new created meshes because the meshes that are loaded inside a scene have their matrices locked by the 3D editor, I will add examples later

    so that means, if i clone a material and morph that one the vertices should work with morphing with that one?

    also i noticed, if i clone a box for example, i played with the last example myself also, the one with the wall, and i cloned a box from there, i took the one with name Box and cloned it 10 times on scene loading, everything worked perfect, but ...

    when i tried to modify their scale size it didn't work for the clones, i can alter their position or colors by calling them all Crates collectively that means every Crate object wold do the changes, just the new ones, dont rescale they just react to position and color change... do i need to enable them or something? also i did enabled the mesh after creation so should work, but sadly it doesn't. am i missing something?

    also if i try to pick the new clones by the name Box since their a clone of the initial crate with mesh name Box, they are not picked, are they getting a sequence number or something when created? or are they set on default to Box001?

    take your time, the progress so far is amazing, i cant wait to get some Audio Analyser Demo done with it, its already taking shape hehe reacts awesome to music beat rates. and Performance is just incredible i dont brake under 60FPS no mater what i do. its perfect.

  • You should follow a certain method in order to clone objects, well I forgot to mention that all the plugins can be used together in a single project , let me explain :

    To clone a mesh, you need two things , your mesh (Can be New Mesh , Obj-Js Mesh or a loaded scene Mesh ) and a loaded scene Mesh.

    1- The loaded scene Mesh will serve as a container for our clone, so you should give it the name of your clone .

    2 - Then you add the function Clone Mesh and you set the name parameter as the same of your loaded scene Mesh.

    3 - Every behavior that the loaded scene Mesh has will apply to the clone.

    In other words your clone will be the loaded scene Mesh which was emply first.

    You can also use the Mesh Array plugin instead of the loaded scene Mesh one when you wanna make dozens of clones, but the C2 behaviors will not work , only the Babylon ones will be applied. You will need to set :

    global var boxcount = 0
    For from 0 to 50 with index = boxcount
    Clone mesh [Box] clone name "Box"&boxcount 
    End For
    [/code:1nkpan3q]
    The MeshArray should be Box[0-50]
    
    As for picking, the clones Pickable state are set to false by default, you should enable their Picking state.
  • X3M hi, i wanted to ask you, is it possible instead of doing all those cloning stuff, just to add a name input for the newmesh type?

    This is more of a request then a suggestion since only makes sense in having it and many i guess wold agree:

    like for instance... at the moment, if i want to create multiple newmesh instances, they all have the same name, and the name of them it only can be changed using the clone array, or by placing duplicates in the screen and change it manually, but ... wouldn't be much simpler to just add a expression ... set name? i mean that wold drop the need of cloning... plus cloning a mesh with the array has weird issues, you will have as you shown to run loops every tick in order to move them, which are very cpu intensive if you plan on hording around 200 objects and add some weird effects to them.

    hope you understand what im talking about!

    P.S the Set name parametter is already there - in the object settings left side ... you only need to place it inside the object.expression so we can call it with conditions, to our needs.

  • The library does not allow having several meshes with the same name, the names should be different.

    Even in C2 you don't get any control over clones sprites for example, so I would be more than happy if there was a simple way to clone instances and at the same time get a reference of them , at least it is doable with the method I've sent you. But does C2 have a better way ?

    P.S: If by name you mean the mesh name , there is the expression : Mesh.Name

    Waiting for your suggestion

  • P.S: If by name you mean the mesh name , there is the expression : Mesh.Name

    Waiting for your suggestion

    the image you are showing is again... about the Clone objects, im not talking about the Clone name...

    i am creating the same New Mesh using the System expression Create... while i do that the new mesh is created multiple times...

    but i cant rename their names... their names being the same as the one set in the settings

    i was saying the name from properties to be able to be changed... using Actions

    this wold cut off the hustle with cloning. you just create new sprites of the same instance basically and just rename them ... same as you wold normally do if we wold drag and drop the same object and rename the properties value.

    you get me?

    look at the following image i just placed the same object manually in the screen by hand... and renamed each of them by hand... changing their properties name... now what im asking is ... can the properties name be set form the expressions? that wold cut off the cloning process using the mesh.array or other placeholder.

  • How are you going to the change the name of something that is not returned ? System->Create Object does not give any clue about the new instance.

    I understand what you're trying to do, that can be easily done with the Mesh->Clone Mesh , you just have to pass the name, like in your example :

    var count = 0

    Repeat 100 Times

    {

    /////////////////////////New name, X , Y , Z

    Mesh->Clone mesh(count,count*100,0,0) // Put clones at X interval of 100

    System->Add to(count,1)

    }

    You get me ? Your clones are named 0 , 1 , 2 etc...

    How is System->Create object is going to give you a reference to the created mesh ? Since you want to change its name

    But of course I will add that possiblity in next version

  • simple duplicating capx

    manual duplicating

    i understand that... the thing is ... you already have implemented the SetMesh Name... in the properties... is it possible to just add that as a expression?

    for example

    this is my 100 loopcount  condition :  
                    Action -  Systemexpression   create newmesh at x y
                    Action - NewMeshObject - Set: NewMesh.Name to "box"&loopindex[/code:3ifs3ic6]
    
    same as you wold do for the clone array... but for the self NewMesh.Name
    
    i think i need to record a video so you can understand properly or show it to you via skype or something. all the expressions i want is there... its a matter of enabling the properties name into a expression input
    
    why im asking this is because
    
    if you clone the mesh... the new named mesh you have to run a loop so you can pick them and make them do something
    
    while if you only change their name directly ..when its duplicated... then its acting like a family object.. and its reacting to everything u tell it to do, without having to run a loopindex to pick them up... which has its own limitations, and eats a lot of resources.
  • Do you mean a Function or an Expression :

    • Expression means : Alert(Mesh.Name)
    • Function means : Set mesh name to ("Box")

    Yes whatever that is I will add it.

  • Do you mean a Function or an Expression :

    - Expression means : Alert(Mesh.Name)

    - Function means : Set mesh name to ("Box")

    Yes whatever that is I will add it.

    Yea i meant Function... if that is the one that alters the Mesh Name.

    something like the bellow image... i just cloned a function in the action common.js just its not linked to anything so errors all over the place.

    the above image should change the bellow value

  • aw snap! that looks nice!

  • > Do you mean a Function or an Expression :

    > - Expression means : Alert(Mesh.Name)

    > - Function means : Set mesh name to ("Box")

    >

    > Yes whatever that is I will add it.

    >

    Yea i meant Function... if that is the one that alters the Mesh Name.

    something like the bellow image... i just cloned a function in the action common.js just its not linked to anything so errors all over the place.

    the above image should change the bellow value

    You had the same conversation with X3M that i had days ago requesting the same action and talking about the same things.

    I also requested be able to change the name of the mesh in that properties in the left tab using events, and in the same way i sent him some screenshots, but told me this was unable to do because something that how C2 manage that and is imposible change the name of a mesh in runtime.

    In one of this conversations was born the MeshArray to at least to pick coins in one event, instead to create a pick event for every single coin(Coin001, Coin002,etc...) like in one of the early templates.

    ---

    The big problem actually on Babylon3D is manage the duplicate/clone mesh objects and their instances that breaks totally the C2 workflow. Maybe we can't explain what exactly we want, or maybe the Babylon3D or C2 SDK plugin not allows the things we are requesting in the way we want, and this conversations always seems to go nowhere.

    So, I suggest ask for help to rexrainbow or R0J0hound that are possible the most experienced members doing plugins for construct to fix this problem once in the best possible way.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • matriax I am going to add the Change mesh name function, but be aware that the things you two wanna do are just not going to work.

    I'm talking from the point of view of a coder.

    Does C2 have a Sprite array plugin like the MeshArray ? I guess not ...

  • matriax I am going to add the Change mesh name function, but be aware that the things you two wanna do are just not going to work.

    I'm talking from the point of view of a coder.

    Does C2 have a Sprite array plugin like the MeshArray ? I guess not ...

    For us, we think like how C2 do the things with the sprite objects, their name, UID and the way that duplicate/clone and using family works, and the idea is have the same for 3D objects.

    If you say the change mesh name will not works, then we have to think in other way to solve that. We all want the same. For that i said ask help for users with big experience on plugins, to see if there is any way to solve this problem.

    In 2D if we duplicate the Sprite.Object in the C2 layout all they have the same name with different UID. In events if we said:

    On Hero Colides with Sprite.Object > do something . Will be applied to all the instances of that Sprite.object that have all the same name but different UID.

    But in 3D if we have 10 instances of the same object only will be applied to one Mesh.Object , the first one created because applies to the Mesh name in the properties. So we have to find a solution to manage 3D Mesh.Objects in the same way C2 do for Sprite.Objects.

    For us the first thing come to our mind is the action to change the Mesh.Name. Because we can have a family that have a Coin.Object and when start do some "for each" and change their names automatically and then use that family to apply an action to all the instances. BTW, this is still more a patch than a solution.

    The problem:

    Seems in 3D every mesh object need to have a different name, even for an instance of the same object to apply some action.

    Possible Solution

    Some way that the mesh name of the 3D object is the name of the Mesh.Object we create in the C2 layout. For duplicate objects Internally set the mesh name as "Object.Name"+"UID". So every 3D mesh in runtime will have a different name, but in the C2 layout we only see the name we set on top of the left tab, as we have for Sprite.Objects.

    And when we do an action on events related to a Mesh.Object this action will be applied to all instances of that Mesh.Object with their different UID.

    We don't know how C2 exactly do that for Sprite.Objects and how do the same for 3D, for this reason i think will be a good idea ask for help to rexrainbow or R0J0hound that maybe they know how to fix this problem.

  • i think now its a good time to give us some tutorials in screenshots or better in youtube, for step by step instructions (at least the basics ). it will promote the project better. And some tweets of the tutorials will give more publicity to your plugin and of course more incomes

  • matriax I am going to add the Change mesh name function, but be aware that the things you two wanna do are just not going to work.

    I'm talking from the point of view of a coder.

    Does C2 have a Sprite array plugin like the MeshArray ? I guess not ...

    no C2 has no mesh array like plugin, but C2 has the sprites like this ... take for example sprite1 is duplicated... right? you dont have to call each sprite by a index... u just call the name of it acting like a container for all. like all are part of a familly. which is what we mean by being able to change the name of newmesh. if u want to understand better play a bit with the sprite object C2 has ul see what we are meaning by it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)