WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Unit models (https://www.wowinterface.com/forums/showthread.php?t=31693)

nightcracker 04-04-10 01:55 PM

Unit models
 
RAAAAH!!!!

I got nice 3d unitmodels(not portraits, not that close up face-only bull****, but really FULL models) but there's one problem: some units and mostly totems show up VERY VERY zoomed. This is because I use :SetCamera(1). Now if I use :SetCamera(2) I can get everything nicely on one zoom, but an other problem arises: you see the model from above and I have no idea how to change that.

Please help!

BFSskepsis 04-04-10 04:07 PM

Might be easier if you could tell us the addon

nightcracker 04-04-10 04:12 PM

Quote:

Originally Posted by BFSskepsis (Post 184023)
Might be easier if you could tell us the addon

It's my own Lua code, for the next version of ncUI.

Saiket 04-04-10 04:46 PM

_NPCScan's 3D visual for its targeting button had the same issue where certain units were zoomed way out of proportion or were positioned half-way off the frame. The only solution I could come up with was editing the camera views by hand. I used the model returned by Model:GetModel as a key in the table to get at X,Y,Z, and Scale arguments for Model:SetPosition and Model:SetModelScale.

Sadly, there's no way to control the pitch of the camera, so your totem issue might not be solvable. Perhaps you can use camera 1 and SetModelScale simultaneously? I'm not sure if that would help, though.

If you do decide to use SetModelScale however, it has some quirks. One is that calling it before the model has been read into memory will show the model with a scale of 1 while Model:GetModelScale returns your value. This unreleased version of _NPCScan.Button.lua shows a workaround I figured out that waits for the model's mesh to load before adjusting the camera.

zork 04-04-10 05:44 PM

http://www.wowwiki.com/Widget_API#Model

Take a look at
http://www.wowwiki.com/API_Model_SetFacing
http://www.wowwiki.com/API_Model_SetModelScale
http://www.wowwiki.com/API_Model_SetPosition
http://wowprogramming.com/docs/widge...el/SetRotation

more...
http://wowprogramming.com/docs/widgets/PlayerModel

nightcracker 04-05-10 01:05 AM

Quote:

Originally Posted by Saiket (Post 184026)
_NPCScan's 3D visual for its targeting button had the same issue where certain units were zoomed way out of proportion or were positioned half-way off the frame. The only solution I could come up with was editing the camera views by hand. I used the model returned by Model:GetModel as a key in the table to get at X,Y,Z, and Scale arguments for Model:SetPosition and Model:SetModelScale.

Sadly, there's no way to control the pitch of the camera, so your totem issue might not be solvable. Perhaps you can use camera 1 and SetModelScale simultaneously? I'm not sure if that would help, though.

If you do decide to use SetModelScale however, it has some quirks. One is that calling it before the model has been read into memory will show the model with a scale of 1 while Model:GetModelScale returns your value. This unreleased version of _NPCScan.Button.lua shows a workaround I figured out that waits for the model's mesh to load before adjusting the camera.

Thanks, going to look at that. The totem issue is just the the extreme zoom, the pitch issue was an issue created by a possible solution :cool:

nightcracker 04-05-10 02:34 AM

Ok, that works! I still have to make a huge DB over time containing all the exceptions, but yeah... Can't get around it, can I?

Another problem arises: If the character/mob targetting has some kind of "glow effect" (enchant, glow effect on shoulders, etc) the enchants gets buffed up in the model. And with buffed up I mean that a little beastslayer enchant turns into a red apocalypse. I think it's caused by using scale, any info on this?

zork 04-05-10 05:18 AM

Try adjusting http://wowprogramming.com/docs/widgets/Model/SetGlow but not sure if there is any GetGlow() to get the current value. You need to pass a number value. If there is no getglow you could use getmodelscale as an indicator.

Grimsin 04-05-10 09:21 AM

ive been working on 3d models myself. The glow setting will adjust the glow effects for you. Any item or armor effects or spell effects can be adjusted via the glow setting.

Also note there is a pan and angle setting for the camera. Ill dig out the info on it when i find it agian lol. Im curious if what you were talking about on the scaling is the one problem i have... so i have animations and the position and all perfect at lest when you first load but the moment an animation fires your char size resets to some other scale.

Also note that yes the DB of adjustments is necessary, There are some things to think about though, ZMobDB keeps track as you go a long of new models and position settings, so did mazzle's 3d models. I have been studying both of those to get my method for doing them.

Ive noticed some of the get position functions and some garble i read that was hard to understand suggested that it is possible to do this without the database but you would have to do a whole lot more with the get positioning info and how it then reacts. In other words i think you would have to have the database already be able to see how all the various get positions for certain mobs vary then make category for all the mobs and rather then have a DB in the end you would have it to do a get position, it would recognize the position as being category blah blah blah and then adjust the angle/pan/zoom and all that accordingly.

anyhow the DB's are already mostly available via ZMobDB or Mazzle's 3d model code. You might be able to adjust either of those db's to match your model windows so you dont need to do so much running around and gathering of data yourself.

If you search for some threads i started about 3d models some of the links to some of the info i dug up are in the thread...

nightcracker 04-05-10 02:14 PM

Grimsim, I'm VERY interested in a way WITHOUT a database. I want to use these models for my unitframes. And I haven't looked at mazzle's code jet, but I didn't find a database in ZMobDB yet(am I blind?).

Also, could you give me a clear light what the range/scale is on :SetGlow()?

Thanks!

zork 04-06-10 03:34 AM

Maybe, if you could extract the modelsize (height/width) of the actual used model you could derivate the needed modelscale.

nightcracker 04-06-10 05:49 AM

Quote:

Originally Posted by zork (Post 184139)
Maybe, if you could extract the modelsize (height/width) of the actual used model you could derivate the needed modelscale.

I'll do some research with some MPQ extractors, and how the save format .m2 works. If I can extract the sizes of those models into a file it's not that hard with a little perl to get a lua formatted database of all the scales.

If I succeed I will ofcourse release it on WoWInterface ;)


All times are GMT -6. The time now is 10:03 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI