benbeshara Posted November 16, 2016 Share Posted November 16, 2016 Hi all,I've been trying to get Steve Lundmark's Awesomium resource running in T3D 3.9 but I've encountered two problems - Firstly, the shapes don't seem to render anything, they just appear black. Secondly, if I try to interact with the shapes, I error out with a GetMatrixFromUpVector > Vector is not normalised.Getting the code to compile was trivial - just replacing both instances of AwDataSource::OnRequest (int id, const Awesomium::WebString &path)withvoid AwDataSource::OnRequest (int id, const Awesomium::ResourceRequest& request, const Awesomium::WebString &path)got it compiling beautifully.Any help with where to get started on this would be great - I'm lost in the code at the moment. I know there's been a lot of rendering changes since T3D 3.5 - could this be the root of the problem?Thanks,Ben Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 16, 2016 Share Posted November 16, 2016 GetMatrixFromUpVector > Vector is not normalised. Ran across that one mself: http://forums.torque3d.org/viewtopic.php?f=10&t=314&p=2658#p2658. fix this end was:https://github.com/GarageGames/Torque3D/blob/c152ae86f3f09b3c1d736954b352723d274582f1/Engine/source/ts/tsCollision.cpp#L1633 to // slerp Point3F divSafe = (max - min); if (divSafe.x == 0.0f) divSafe.x = POINT_EPSILON; if (divSafe.y == 0.0f) divSafe.y = POINT_EPSILON; if (divSafe.z == 0.0f) divSafe.z = POINT_EPSILON; Point3F s = ( (max - min) - (facePoint - min) ) / divSafe; On the black screen... sounds familiar... Got https://github.com/StefanLundmark/Torque3D_Awesomium/pull/1/files rolled in from his latest? ****do note, using a different solution this end, so educated guesses. Quote Link to comment Share on other sites More sharing options...
benbeshara Posted November 18, 2016 Author Share Posted November 18, 2016 Thanks for the response :)I'm running against the latest head of 3.9, the GetMatrixFromUpVector error still occurs with the fix applied. The error doesn't occur on release builds, only debug, so I'm wondering if it'll be a big deal - I won't know until I get it working though lol.I managed to get the AwGUI to render properly by changing &GFXDynamicTextureProfile to &GFXDefaultStaticDiffuseProfile - for my game this is mostly all I need, but I'd still like to help get to the bottom of this for others sake :)Thanks,Ben Quote Link to comment Share on other sites More sharing options...
benbeshara Posted November 18, 2016 Author Share Posted November 18, 2016 It looks like AwTextureTarget::getTexture() is never called :/ and neither is AwContext::copyToTexture()I think the problem may either be in AWShape or perhaps the way Torque maps texture targets has changed? I'll keep looking into it. Quote Link to comment Share on other sites More sharing options...
benbeshara Posted November 18, 2016 Author Share Posted November 18, 2016 Okay, so it looks like *AwManager::findTextureTargetByMaterial(BaseMatInstance *mat) isn't returning a material instance... Quote Link to comment Share on other sites More sharing options...
benbeshara Posted November 18, 2016 Author Share Posted November 18, 2016 Because AwTextureTarget::onAdd isn't being called at all Quote Link to comment Share on other sites More sharing options...
benbeshara Posted November 18, 2016 Author Share Posted November 18, 2016 Okay! The black screens were my fault, the targets.cs file wasn't executing. All running smooth now! Thanks for the help Azaezel, I feel like I've wasted peoples time now lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.