Are facet and vertex data not converted?

I tried to get random points by taking the matrix value of a specific model, which is a structure of several children, but
Due to parent-child scaling issues, I tried to write the value using facets instead of doing that. (I’m sure there was logic for parent-child scaling somewhere, but I couldn’t find it.)

So in conclusion
I want to redefine the change in position or rotation of the model as facets or vertex data, but what am I missing?

rotation ( line: 10 ~ line: 16 )

postion ( line: 10 ~ line: 17 )

ps.
As Link above, the position can be forcibly moved… but the question is whether it is possible to reallocate the conversion value more easily.

Hey! I’m not sure why you want to use the facet system as it is meant to sort the faces during rendering. Furthermore you are not calling getFacetPosition for instance but instead using direct mesh data.

But anyway :slight_smile: (to be honest I did not dig too much into the first part, I’m sure you have a good reason :))
If you want your boxes to be where the mesh is, you need to apply the world matrix to the positions as the mesh vertices data is always in local coordinates.

meshes library : MarbleTower.gltf | Babylon.js Playground (babylonjs.com)

1 Like

In the end, it was resolved with your method. :+1: :+1:

In the end, this was the method I used to achieve this result. Is there a cheaper way than the facet system to achieve the final result I was trying to achieve?
(In other forms, the implementation was not smooth because accurate values ​​were not obtained.)

additionally.
The hair on this bird’s head and feet sometimes falls off. Did I miss anything?

This is okay.

but…

Why using facets? You can get a very close result by simply using faces or do I miss something?

The overall process of my project can be unstable and ambiguous, for example there are trees for landscaping in the city. There is soil under the tree, the soil must be used and through that soil the tree must be planted on the surface of the soil.

This may be within the created model and may need to be displayed immediately after creation.

In conclusion, the required value is
The local position of the face of a specific model and the rotation level for that face (I can adjust it from min to max, but basically you have to start with a rotation that suits the relevant side.) are required.

Is there an easy way to achieve this even if it’s not a facet?

ps.

Since the rotation could not be resolved using method PG#12, the floor in my local project finally works in the form of the bottom.

There are no other conditions in the code and PG#15 is heightMap ground.
The bottom of my local project is a floor model created on a child structure.
image

First of all, the desired result was expressed.
What I need to do is manage only the ultimately adopted position and rotation separately and keep them separate in the creation list.

What about using face normals? but to be honest I’m not telling you not to use facets :slight_smile: If you are ok with the slight memory uptake this is all good!

1 Like