• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

3d model on game UI interface

Status
Not open for further replies.
Level 9
Joined
Sep 20, 2015
Messages
385
With the new fuctions to change UI frames is it possible to place some models in the UI?
I am asking this because of the autocast-on effect that appears on the icon. As far as i know the effect is a model, so my actual question is: the UI model can be moved in the position of the mouse cursor or somewhere else on the screen?

I am asking this because i don't understand JASS very well and it is quite har dfor me to test this possibilty.

Thanks in advance for the help
 
Level 1
Joined
Jan 2, 2019
Messages
3
native BlzFrameSetModel takes framehandle frame, string modelFile, integer cameraIndex returns nothing
Can anyone give an example of how to use this especially the cameraIndex.
 
One needs to create a Frame of type "MODEL" or "SPRITE", cause you want the frame to be animated you should use "SPIRTE". In both cases one should also add LayerStyle "IGNORETRACKEVENTS", so it won't block mouseclicks. But in my opinion the natives to control animation of such a frame model is not there/published. Or no one found out/ or did not share how to do it.

After one has such a Frame use that native to set the model.
 
Level 1
Joined
Jan 2, 2019
Messages
3
Code:
framehandle aHandle = BlzCreateFrameByType("MODEL", "Test", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), "", 0);
BlzFrameSetModel(aHandle, "units\\human\\Footman\\Footman.mdl", 0);
BlzFrameSetSize(aHandle, 0.2, 0.2);
BlzFrameSetAbsPoint(aHandle, FRAMEPOINT_CENTER, 0.0, 0.0);

I tried this and the whole screen turned black. Rofl.
 
I have the same problem. Units are show from the top and I can't show him in front. And some models like Flying Machine cover the entire screen with a grey glow.

If the unit has a camera with a different angle you can set the cameraIndex paramater in the BlzFrameSetModel native. If it doesn't, then you will have to edit and reimport the model.
 
Can you give me a tutorial link to do that? I've never edit a model.

And for the glow on the entire screen for the flying machine or the knight?
There is no tutorial on how to do it, but basically you make a helper bone and make it the parent of the root bone, then you rotate the helper bone in Mdlvis so your model faces upwards. To prevent the flying machine from covering the whole screen you have to scale it down a tremendous amount.

If what @TriggerHappy said about camera index works you may not need to do what I suggested, but if memory serves me right frame models doesn't show if they have a camera, so you will actually need to delete all the cameras.
 
Luckily it is very easy to fix.

Open the model in Magos' model editor (download it from our tools section). Go to Windows -> Model Editor. Drag select all of the vertices so that they become green. Go to Transformations -> Rotation, and then rotate it so that it has the proper facing. I don't remember which axis.

I can give you a more detailed guide if you want later. Just attach the model to attach (the weapon) to a post and then I can rotate it for you + give you pictures and a quick guide on how to do it manually. I'll probably be able to do it later on today or tomorrow. There should be a way to get it to look right through editing the attachment only.

I found that on a tutorial do you think it is the kind of actions I should do to my model?
 
There is no tutorial on how to do it, but basically you make a helper bone and make it the parent of the root bone, then you rotate the helper bone in Mdlvis so your model faces upwards. To prevent the flying machine from covering the whole screen you have to scale it down a tremendous amount.

If what @TriggerHappy said about camera index works you may not need to do what I suggested, but if memory serves me right frame models doesn't show if they have a camera, so you will actually need to delete all the cameras.

They show but have some odd bugs such as being unable to scale or position them properly.
 
Status
Not open for further replies.
Top