Talk:Models on VGUI Panels

From Valve Developer Community
Jump to navigation Jump to search

How big of a footprint does this take over just rendering the model itself? I can think of some really nifty original things to do with being able to drop models in my VGUI but I don't wanna kill the system. Angry Beaver 23:33, 11 Mar 2006 (PST)

It is just rendering the model - so it's the same footprint. ---Ging 17:09, 13 Mar 2006 (PST)
*does a dance* This makes doing a feature I had planned so much simpler. All I need to do is figure out how to hack it together :) Angry Beaver 18:47, 13 Mar 2006 (PST)

Is this a single player Mod thing or is there any way to get it to work with HL2DM SDK based mods too? I know several Mods, including my own, that have wanted to use models in menus so I'd like to get this working. I did have some success but had to re-write some parts but couldn't get the latter part to compile at all. I assume it dependancies but I couldn't figure out what was missing exactly. -- Wunderboy 07:54, 12 Mar 2006 (PST)

Hidden: Source is a multiplayer mod—ts2do 11:26, 12 Mar 2006 (PST)
Hmm odd then because when I tried to implement this in my MP mod as quoted I got nothing but compiler errors and complaints about unknown classes.
this may be done in the skeletal SDK...it's not too hard to extract what you need from this tho:—ts2do 13:02, 12 Mar 2006 (PST)
    // Now draw it.
    CViewSetup view;
    // setup the views location, size and fov (amongst others)
    view.x = x;
    view.y = y;
    view.width = width;
    view.height = height;
    view.m_bOrtho = false;
    view.fov = 54;
    view.origin = origin + Vector( -110, -5, -5 );
    // make sure that we see all of the player model
    Vector vMins, vMaxs;
    pPlayerModel->C_BaseAnimating::GetRenderBounds( vMins, vMaxs );
    view.origin.z += ( vMins.z + vMaxs.z ) * 0.55f;
    view.angles.Init();
    view.m_vUnreflectedOrigin = view.origin;
    view.zNear = VIEW_NEARZ;
    view.zFar = 1000;
    view.m_bForceAspectRatio1To1 = false;
    // render it out to the new CViewSetup area
    // it's possible that ViewSetup3D will be replaced in future code releases
    Frustum dummyFrustum;
    render->ViewSetup3D( &view, dummyFrustum );
    pPlayerModel->DrawModel( STUDIO_RENDER );
    if ( pWeaponModel )
    {
       pWeaponModel->DrawModel( STUDIO_RENDER );
    }
Fair enough, I'll look at it again. Though why was the original article deleted? --Wunderboy 13:27, 12 Mar 2006 (PST)

The author feels that the content should stay on his userpage until it is complete...I know it's silly, but oh well—ts2do 13:58, 12 Mar 2006 (PST)

I'm waiting for Matt Boone to check it over before I put it up "officially", keeping it on my user page makes it easier for me to modify and saves people asking questions about an unfinished article. Again, simple politeness! ---Ging 04:19, 13 Mar 2006 (PST)

Alrighty—ts2do 06:41, 13 Mar 2006 (PST)

Sorted, the code is from the advanced sdk (as that's what I use) - but it shouldn't take too much to get it working in an HL2DM based mod. ---Ging 17:09, 13 Mar 2006 (PST)

I am having a problem where my 3d model is rendered oddly. It is not rendered on to the new imagepanel class. It is rendered based on its parent. When I move the parent panel the 3d model moves around. Though the 3d model is tiny rectangle too. When I move the parent down the model moves up, etc. Help appreciated. EDIT: Same behavior is exhibited when I try using the parent panels localtoscreen function --RomeoJGuy 16:02, 8 Jul 2006 (PDT)

the latest steam code update broke this code for me, still tracking down a way to fix it. --Stevenm64 05:57, 5 Aug 2006 (PDT) managed to repair the code and get it working correctly, Testing image. --Stevenm64 01:08, 10 Aug 2006 (PDT)

Faceposer scenes?

Can a faceposer scene be played with character models in a VGUI panel?--Mm3guy 19:03, 12 Jun 2008 (PDT)