Jump to content

3dsMax request for parentId in instances


Pierre Glibert
 Share

Recommended Posts

Hi @Deltakosh,

I quickly tested your 3dsMax exporter and it's a really nice work !

But I have a request for you if it's possible :

Could you add the "parentId" of an instance in your .babylon please ?

I don't know if you remember, I did this for the import part of BabylonJs :

http://www.html5gamedevs.com/topic/24596-apply-parent-of-instance-with-babylon-file/#comment-142048

 

For us, it's important if an instance have an other parent with a different transformation.

What do you think ?

 

Thanks for your help ;)

Letsbro team.

Link to comment
Share on other sites

  • 3 weeks later...

Hi again @Deltakosh

I see something wrong with instance parentId in .babylon file ... 

Instances haven't "id" property. So if a mesh or instancedMesh have an instance like parent, the engine can't do the link : https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.mesh.ts#L2195

Is it possible to add an id to instances please ?

Thanks for your help.

Letsbrostudio team.

 

EDIT : 

In fact, it's the same thing with shadowGenerator > renderList > Array[id] .

Shadows can't work on instances because they haven't id ;)

Link to comment
Share on other sites

I have no time to do it but I can guide you :)

Do you have some C# skills? (really minimal).

If yes please just open this vs project: https://github.com/BabylonJS/Babylon.js/blob/master/Exporters/3ds Max/Max2Babylon.sln

for there you will be able to add ID to the instances around this line:

https://github.com/BabylonJS/Babylon.js/blob/master/Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Mesh.cs#L481

with something like:

instance.Id = instanceGameNode.MaxNode.GetGuid().ToString()

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...