I have been playing whit animated texture for a while now and for the moment the plan was just take the node, break it into geometry by going into every child this node have and then creat a new sptatial from that geom, set is material to be the animated material and then apply the whole thing inside the first node.
It work great for anything build using the xml.ogre file, but the j3o one have wierd result. The animated texture model is usely way too big, and very far from the first model
The j3o probably has a hierarchy of nodes with their own transforms and stuff. By taking the individual geometries outside of their transform hierarchy then you lose all of that. Local becomes world, and so on.
Either duplicate the hierarchy or make sure to put the copy of the geometry at the same world translation, scale, and rotation.
Indeed, thanks. I can use the child value to resize and replace. I still donāt untherthand tho : why do the J3o have all those wierds resizing on import?
Well, usually the model was WAY bigger (the local scale was something like 0.0625) and also far, far away from where it was supposed to be. I updated the method now, so it should not be a problem anymore, but I also just took the model and put every variable at 1,1,1 for scale and 0,0,0 for position and rotation and it look the same, just not facing in the same direction but it was not the right one to begin with.
Fact is I already have a resize done on the model when I put it in the game, because some of the assets are ogre.xml so I donāt really have the choice. It just felt weird to have a double resize/reposition every time.
I mean, I donāt know where your j3o came from that you are talking about is āmessed upā. j3o had to have been imported from something else. That something else had transformations in the hierarchy.
But then why donāt it simply assume everything is just at 1,1,1 ? Because tecnicly for im this is the normal size of the asset. I donāt see where this coordination on the resize could be usefull
Ok, letās say you have a robot. That robot is made up of a body. That body has children that are arms and legs. The arms and legs have children that are hands and feet.
Letās also say that the hands and feet are 100 units big normally but because the robot is human sized, they have been scaled down to fit. If JME automatically made those 1,1,1 then your robot would look really strange.
JME is not making these values up. They were in your scene. They are CRITICAL to the proper rendering of your scene⦠or they wouldnāt be there.
The scene graph hierarchies translation, rotation, and scale is fundamental. Itās possible to apply all of these transforms before exporting.
ā¦but blah blah⦠hand waving guess⦠blah blah⦠I donāt know where the original scene came from, what it looked like, what format it was, or anything necessary for me to remotely comment further.
What I can say for 1000000000000000000000000000000000000000% fact is that JME didnāt pull these values out of thin air just to make your life tougher. They existed in the original data. JME cannot make assumptions about throwing them away.
No i mean I underthand that, i know now its not creating anything, what i mean is why donāt JME actully pull new value yet assume the resize as he is in the file its importing from. meaning the model see imself as a 1,1,1 but in the back office its actully the 0,065,0,065,0,065 so that when we take the mesh on the model we donāt see something that never existed but the actual size its in the J3o file.
Looks to my like the model is out of center. Normally models have a zero-point quite in the middle of it and this is also the origin of scaling. So if the center-point is off-center, the scaling will in some cases look like āthe model gets further awayā.