3D rendering in 5.x... what happened? menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    3D rendering in 5.x... what happened?

    For some reason, ever since the first MoP pre-patch, I have not been able to render 3D.

    My camera information is correct (including world, view, and projection matrixes). I spoke to Nesox and he is having the same issue. Does anyone know what happened? I'm sure it's something simple we are missing.

    Thanks in advance

    3D rendering in 5.x... what happened?
  2. #2
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    God knows, I've had this issue in the first public mop patch. It wouldn't appear until I opened and closed the Wow console.

    I'm not having any issues in the current patch though, I don't think I made any changes to my code, I'll look into it once I get home.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  3. #3
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    No problems for me...


  4. #4
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    It wouldn't appear until I opened and closed the Wow console.
    We had the same issue (with 2D drawings too). We managed to fix this by setting the COLORWRITEENABLE render state to 0xF - it fixed our issue with 2D drawings, but still no luck with 3D drawings; just FYI in case this ever comes up again.

    DarkLinux, mind sharing some code? I'm sure you'll recieve much love for it
    Last edited by Jadd; 09-28-2012 at 08:48 AM.

  5. #5
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Finally got it working, thx Jadd

    Attached Thumbnails Attached Thumbnails 3D rendering in 5.x... what happened?-p03y73pp-jpg  

  6. #6
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    What are you hooking to draw? I am using SetViewport...
    Last edited by DarkLinux; 09-28-2012 at 09:14 AM.

  7. #7
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DarkLinux View Post
    What are you hooking to draw? I am using SetViewport...
    You're hooking SetViewport...? I don't understand..

  8. #8
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I detour it to draw in 3d.. I can help you when I get off work..

  9. #9
    Thongs's Avatar Member
    Reputation
    10
    Join Date
    Oct 2006
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't experienced any issues with mine. I'm calling this from Endscene using D3D9;

    Code:
    CameraInfo cam = Helper.Magic.ReadStruct<CameraInfo>(camPtr);
    Vector3 eyePt = cam.Pos; Vector3 lookAtPt = cam.Pos + cam.ViewMat1; Vector3 upPt = new Vector3(0, 0, 1); Matrix matWorld = Matrix.Translation(target.X, target.Y, target.Z); Matrix matView = Matrix.LookAtRH(eyePt, lookAtPt, upPt); Matrix matProj = Matrix.PerspectiveFovRH(cam.FieldOfView * 0.6f, (float)(1.335), cam.NearPlane, cam.FarPlane); Device.SetTransform(TransformState.World, matWorld); Device.SetTransform(TransformState.View, matView); Device.SetTransform(TransformState.Projection, matProj); Device.VertexShader = null; Device.PixelShader = null; Device.SetRenderState(RenderState.AlphaBlendEnable, true); Device.SetRenderState(RenderState.BlendOperation, BlendOperation.Add); Device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha); Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); Device.SetRenderState(RenderState.Lighting, 0); Device.SetTexture(0, null); Device.SetRenderState(RenderState.CullMode, Cull.None); Result res = Device.DrawUserPrimitives(PrimitiveType.LineList, (vertices.Count() / 2), vertices);

  10. #10
    Master674's Avatar Elite User
    Reputation
    487
    Join Date
    May 2008
    Posts
    578
    Thanks G/R
    2/23
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We were hooking CWorldSceneRender::Render (thx to Bananenbrot) back in 4.3.

  11. #11
    abdula123's Avatar Sergeant
    Reputation
    14
    Join Date
    Feb 2010
    Posts
    46
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still use same EndScene, Present and Reset hooks as in 4.x

    only thing added in 5.0.4 is device.SetRenderState(D3DRS.COLORWRITEENABLE, RedGreenBlueAlpha)
    without this setting only 2d font drawing was rendered, but no 3d primitives.


    rendering, EndScene hook:
    Code:
            self.stateblock.Capture()
    
            self.device.SetVertexShader(0)
            self.device.SetPixelShader(0)
            self.device.SetFVF(D3DFVF.XYZ | D3DFVF.DIFFUSE)
    
            # ИЗ-ЗА ЭТОГО ГАДСТВА НИЧЕГО НЕ РИСОВАЛОСЬ.
            RedGreenBlueAlpha = 15
            self.device.SetRenderState(D3DRS.COLORWRITEENABLE, RedGreenBlueAlpha)
    
            z_disable = True
            if z_disable:
                self.device.SetRenderState(D3DRS.ZENABLE, D3DZB.FALSE)
                self.device.SetRenderState(D3DRS.STENCILENABLE, 0)
            else:
                self.device.SetRenderState(D3DRS.ZENABLE, D3DZB.TRUE)
                self.device.SetRenderState(D3DRS.ZWRITEENABLE, D3DZB.TRUE)
                self.device.SetRenderState(D3DRS.ZFUNC, D3DCMP.LESSEQUAL)
                self.device.SetRenderState(D3DRS.STENCILENABLE, 1)
    
            self.device.SetRenderState( D3DRS.SPECULARENABLE, 0)
            self.device.SetRenderState( D3DRS.LIGHTING, 0 )
            self.device.SetRenderState( D3DRS.CULLMODE , D3DCULL.NONE)
            self.device.SetRenderState( D3DRS.ANTIALIASEDLINEENABLE, 1)
            self.device.SetRenderState(D3DRS.FOGENABLE, 0)
    
    
            self.device.SetRenderState( D3DRS.ALPHABLENDENABLE, 1 )
            self.device.SetRenderState( D3DRS.SRCBLEND, D3DBLEND.SRCALPHA )
            self.device.SetRenderState( D3DRS.DESTBLEND, D3DBLEND.INVSRCALPHA )
    
            Viewport = D3DVIEWPORT9()
            self.device.GetViewport(byref(Viewport))
            Viewport.MinZ = 0
            Viewport.MaxZ = 0.94
            self.device.SetViewport(byref(Viewport))
    
            self.device.SetTransform(D3DTS.WORLD, byref(IdentityMatrix))
            self.device.SetTransform(D3DTS.VIEW, byref(ViewMatrix(cam)))
            self.device.SetTransform(D3DTS.PROJECTION, byref(ProjectionMatrix(cam)))
    
            try:
                #THERE IS MY RENDERING DONE
            finally:
                self.stateblock.Apply()
    init/deinit, Reset hook:
    Code:
    init:
            self.stateblock = POINTER(IDirect3DStateBlock9)()
            self.device.CreateStateBlock(1, byref(self.stateblock))
    deinit:
            self.stateblock.Release()

  12. #12
    Master674's Avatar Elite User
    Reputation
    487
    Join Date
    May 2008
    Posts
    578
    Thanks G/R
    2/23
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You cannot draw real 3D stuff with Z-Tests from EndScene...

  13. #13
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Master674 View Post
    You cannot draw real 3D stuff with Z-Tests from EndScene...

  14. #14
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    @_Mike
    Is that really from EndScene?

  15. #15
    BuloZB's Avatar Active Member
    Reputation
    20
    Join Date
    Nov 2008
    Posts
    263
    Thanks G/R
    26/4
    Trade Feedback
    17 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    guys this topic help me a lot, you dont know how much

    thx

Page 1 of 2 12 LastLast

Similar Threads

  1. What happened to the speech files?
    By Rickye in forum World of Warcraft General
    Replies: 2
    Last Post: 12-28-2006, 12:26 AM
  2. Gack! What happened?
    By Lukargo in forum World of Warcraft General
    Replies: 3
    Last Post: 12-24-2006, 09:49 AM
  3. This is what happens when....
    By TwiceoveR in forum World of Warcraft General
    Replies: 3
    Last Post: 12-20-2006, 02:44 PM
  4. What happened to "on top of if bank"? thread
    By phanice in forum World of Warcraft General
    Replies: 0
    Last Post: 10-25-2006, 12:43 AM
  5. What happened?
    By janzi9 in forum OC News
    Replies: 15
    Last Post: 05-30-2006, 07:28 PM
All times are GMT -5. The time now is 02:55 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search