Model position

Started by respawnrt, March 14, 2012, 12:24:34 PM

Previous topic - Next topic

respawnrt

Hello, there is this  problem which i don't seem to understand, and it has to do with the model position in the level.
Sometimes when i export my models with the whole level, they seem to be in weird positions often rotated wrong.
Pics:


So maybe someone can tell me the relation between the model pivot and why this happens in hammer ?

You can try the max file for yourself.
http://filesmelt.com/dl/play.max

wallworm

Good question.

Here are some tips and some caveats:

First, the bad news. At the moment, there are often problems with the positions of prop_physics. Very often, physics props are offest in the z-index. I have tried to fix this in a recent update but haven't really had time to test lately (an illness in the family has grabbed my time right now). I've gotten word from K@rt that it's still being offset... so I may have to continue looking at this.

On the other end... if you have the most recent updates, the position/rotation of static/dynamic models and proxies should be correct. (I haven't found any problems with them in any testing).

For models, the pivot point of the main mesh in your WWMT model is going to be the origin of the model. Generally speaking, an offset in prop_static and prop_dynamic means that you need to turn on the Use Local Origin option for that model (in the main WWMT rollout).

Also, you should never alter a Proxy's pivot point--and you should also never alter the pivot point of a WWMT model's mesh after you've exported it--if you do, you should re-export that model.

I will take a look at your file later in the day if I have time. Hopefully this info helps in the meantime.

wallworm

I couldn't resist and looked at the file.

I was able to compile everything just fine (didn't have the textures so those are missing):



I did notice a couple things: 1) the units in the file is centimeters--you should change that to inches. 2) the grid spacing was at 9 ... which you may want to change to 8, 16, 32, etc... fits better with Source.

But I don't think either of those would be the cause of the problem.

One thing I did do was select the WWMT helper for this model and then in Anvil chose the "prop_dynamic" for this prop. Still... I do not think this would cause the error you are seeing.

So my next best guess is that you may have compiled the model once... then moved/rotated/changed it... then exported the scene to VMF. Generally speaking, any changes to a model require you to recompile that model. For models tied directly to a WWMT helper, that can can lead to unexpected results.

Just remember that changes to a model need it to be recompiled (which is a separate step from exporting the VMF... ).

Note that if you make changes to a model (such as altering it's pivot point) then you may need to delete any WWMT proxies for that model and remake them.

Hopefully this sends you down the best path. Let me know if it makes sense and helps.

wallworm

PS... I also meant to ADD: changes that require re-compiling a model includes all changes to settings for that model inside WWMT. So if you check/uncheck an option like Use Local Origin, etc... the model needs recompiled to get those changes.

Recompiling a model will not always mean you need to re-export the VMF.

respawnrt

#4
HI, first sorry for you family and i see how much work you put in Worm Tools.Thanks for grid tips, and i fixed my problem by recompiling (silly me).
proxies and multiple skins.

wallworm

That's great! I am happy to finally see someone else (other than me and a couple close friends) using the proxies and skin functions. I'm sure there are people using them... but I haven't actually seen anyone mention them or show anything... which sometimes makes me wonder if it's worth my time documenting things (but then again... maybe lack of documentation leads people to not understand/use them :P )

I expect to add a few more optimizations in a  week or two... one being a func_detail tag. Feel free to share any input and certainly share screen shots of your progress.

And thanks for the kind words :)

wallworm

I am curious about how your work is coming along? Also, in case you happened to download the version that came out a couple days after your original post (WWMT 1.771), some VMF bugs were introduced pertaining to proxy orientations. I've fixed that in 1.772.

Also, so you don't get confused, please read this article on the Z-Rotation of exported models and their respective orientation in the exported VMF. I've changed the default orientation in the exporter and VMF to match what was previously used with the WWMT "Flip" option... which makes the default orientation of exported models match those in Source.

SMF spam blocked by CleanTalk