Jump to content

Steve_Yorkshire

Contributor
  • Posts

    350
  • Joined

  • Last visited

Everything posted by Steve_Yorkshire

  1. Wooo! Look at those Torquescript gains!
  2. Flight and footslogger for variation surely. Also nice objectives gui.
  3. So, I've been playing around with explosions, player.blowUp(), etc and noticed the info in InitPersistant fields is a bit ... out of date and not very helpful. Here's what it says: addGroup( "Destruction", "Parameters related to the destruction effects of this object." ); addField( "explosion", TYPEID< ExplosionData >(), Offset(explosion, ShapeBaseData), "%Explosion to generate when this shape is blown up." ); addField( "underwaterExplosion", TYPEID< ExplosionData >(), Offset(underwaterExplosion, ShapeBaseData), "%Explosion to generate when this shape is blown up underwater." ); addField( "debris", TYPEID< DebrisData >(), Offset(debris, ShapeBaseData), "%Debris to generate when this shape is blown up." ); addField( "renderWhenDestroyed", TypeBool, Offset(renderWhenDestroyed, ShapeBaseData), "Whether to render the shape when it is in the \"Destroyed\" damage state." ); addField( "debrisShapeName", TypeShapeFilename, Offset(debrisShapeName, ShapeBaseData), "The DTS or DAE model to use for auto-generated breakups. @note may not be functional." ); endGroup( "Destruction" ); And we should be looking at "debris" line ~607-608 and "debrisShapeName" line ~611-612. "@note may not be functional." is the clue here as auto-generated breakups are a thing of the past. What actually happens is your debris model is a collection of mesh objects (with LODs) which are each centred on origin (or else they spin weird because origin is the spin point). "debrisShapeName" the dae/dts file that you have debris mesh objects in. "debris" needs to point to a datablock of "debrisData" to derive velcoity, spin, particles and other data from for "debrisShapeName" - NOTE: if this datablock has a shapefile mentioned then it will override the "debrisShapeName". HOWEVER: if there is no "debrisShapeFile" then NOTHING WILL SPAWN regardless of whether "debrisData" has a shapeFile. And without "debris" pointing to a "debrisData" nothing will spawn because no number of debris has been set. So, maybe change "debris" info (line ~608) to say something like: And "debrisShapeName" info (line ~ 612) to say something like: Anyhow, just muh thoughts in clearing up the outdated info.
  4. I made a text speed-o-meter based on the health text hud gui. 1: First up alter source/T3D/vehicles/vehicle.h so we can get some data returned for the speed hud. This is actual speed (eg: length of velocity) and throttle control. Throttle is pretty much just full power using the keyboard but can be incremented using a gamepad stick. //.... //for returning values to the guiSpeedTextHud F32 getThrottle() { return mThrottle; }//yorks F32 getSpeed() { return getVelocity().len(); }//yorks DECLARE_CONOBJECT(Vehicle); }; #endif Next up we create our new cpp file for the speed text to dsipaly which will reference getSpeed and getThrottle. Call it guiSpeedTextHud.cpp and then save it to your game's source folder and add an fps folder for it to go into. Then add it to your solution in Visual Studio. It gets the player, then what they are mounted to, and bails it it's not a vehicle, or proceeds to get the speed and throttle values. // ---------------------------------------------------------------------------- // A gui control that displays Speed as a numerical value. // ---------------------------------------------------------------------------- #include "platform/platform.h" #include "gui/core/guiControl.h" #include "console/consoleTypes.h" #include "T3D/gameBase/gameConnection.h" #include "T3D/shapeBase.h" #include "T3D/rigidShape.h" #include "T3D/vehicles/vehicle.h" #include "gfx/gfxDrawUtil.h" class GuiSpeedTextHud : public GuiControl { typedef GuiControl Parent; bool mShowFrame; bool mShowFill; bool mShowThrust; //bool mShowTrueSpeed; LinearColorF mFillColor; LinearColorF mFrameColor; LinearColorF mTextColor; LinearColorF mWarnColor; F32 mWarnLevel; F32 mPulseThreshold; S32 mPulseRate; F32 mValue; public: GuiSpeedTextHud(); void onRender(Point2I, const RectI &); static void initPersistFields(); DECLARE_CONOBJECT(GuiSpeedTextHud); DECLARE_CATEGORY("Gui Game"); DECLARE_DESCRIPTION("Shows the Speed or speed level of the current\n" "PlayerObjectType control object as a numerical text display."); }; // ---------------------------------------------------------------------------- IMPLEMENT_CONOBJECT(GuiSpeedTextHud); ConsoleDocClass(GuiSpeedTextHud, "@brief Shows the Speed or Speed value of the current PlayerObjectType control object.\n\n" "This gui can be configured to display either the Speed or speed value of the current Player Object. " "It can use an alternate display color if the Speed or drops below a set value. " "It can also be set to pulse if the Speed or speed drops below a set value. " "This control only works if a server connection exists and it's control object " "is a PlayerObjectType. If either of these requirements is false, the control is not rendered.\n\n" "@tsexample\n" "\n new GuiSpeedTextHud()" "{\n" " fillColor = \"0.0 0.0 0.0 0.5\"; // Fills with a transparent black color\n" " frameColor = \"1.0 1.0 1.0 1.0\"; // Solid white frame color\n" " textColor = \"0.0 1.0 0.0 1.0\" // Solid green text color\n" " warningColor = \"1.0 0.0 0.0 1.0\"; // Solid red color, used when damaged\n" " showFill = \"true\";\n" " showFrame = \"true\";\n" " showTrueValue = \"false\";\n" " showThrust = \"false\";\n" " warnThreshold = \"20\";\n" " pulseThreshold = \"10\";\n" " pulseRate = \"500\";\n" " profile = \"GuiBigTextProfile\";\n" "};\n" "@endtsexample\n\n" "@ingroup GuiGame\n" ); GuiSpeedTextHud::GuiSpeedTextHud() { mShowFrame = mShowFill = true; mShowThrust = false; //mShowTrueSpeed = false; mFillColor.set(0, 0, 0, 0.5); mFrameColor.set(1, 1, 1, 1); mTextColor.set(0, 1, 0, 1); mWarnColor.set(1, 0, 0, 1); mWarnLevel = 20.0f; mPulseThreshold = 10.0f; mPulseRate = 0; mValue = 0.2f; } void GuiSpeedTextHud::initPersistFields() { addGroup("Colors"); addField("fillColor", TypeColorF, Offset(mFillColor, GuiSpeedTextHud), "Color for the background of the control."); addField("frameColor", TypeColorF, Offset(mFrameColor, GuiSpeedTextHud), "Color for the control's frame."); addField("textColor", TypeColorF, Offset(mTextColor, GuiSpeedTextHud), "Color for the text on this control."); addField("warningColor", TypeColorF, Offset(mWarnColor, GuiSpeedTextHud), "Color for the text when Speed is low."); endGroup("Colors"); addGroup("View"); addField("showFill", TypeBool, Offset(mShowFill, GuiSpeedTextHud), "If true, draw the background."); addField("showFrame", TypeBool, Offset(mShowFrame, GuiSpeedTextHud), "If true, draw the frame."); //addField("showTrueValue", TypeBool, Offset(mShowTrueSpeed, GuiSpeedTextHud), "If true, we don't hardcode maxSpeed to 100."); addField("showThrust", TypeBool, Offset(mShowThrust, GuiSpeedTextHud), "If true, display the speed value rather than the Speed value."); endGroup("View"); addGroup("Alert"); addField("warnThreshold", TypeF32, Offset(mWarnLevel, GuiSpeedTextHud), "The Speed level at which to use the warningColor."); addField("pulseThreshold", TypeF32, Offset(mPulseThreshold, GuiSpeedTextHud), "Speed level at which to begin pulsing."); addField("pulseRate", TypeS32, Offset(mPulseRate, GuiSpeedTextHud), "Speed at which the control will pulse."); endGroup("Alert"); Parent::initPersistFields(); } // ---------------------------------------------------------------------------- void GuiSpeedTextHud::onRender(Point2I offset, const RectI &updateRect) { // Must have a connection and player control object GameConnection* conn = GameConnection::getConnectionToServer(); if (!conn) return; ShapeBase* control = dynamic_cast(conn->getControlObject()); if (!control || !(control->getTypeMask() & PlayerObjectType)) return; //now get the vehicle we are mounted to if there is one, else quit Vehicle* cab = dynamic_cast(control->getObjectMount()); if (!cab) return; if (mShowThrust) { F32 thrust = cab->getThrottle(); //mThrottle is a float mValue = thrust * 100;//set it to 0-100% } else mValue = cab->getSpeed(); GFXDrawUtil* drawUtil = GFX->getDrawUtil(); // If enabled draw background first if (mShowFill) drawUtil->drawRectFill(updateRect, mFillColor.toColorI()); // Prepare text and center it S32 val = (S32)mValue; char buf[256]; dSprintf(buf, sizeof(buf), "%d", val); offset.x += (getBounds().extent.x - mProfile->mFont->getStrWidth((const UTF8 *)buf)) / 2; offset.y += (getBounds().extent.y - mProfile->mFont->getHeight()) / 2; LinearColorF tColor = mTextColor; // If warning level is exceeded switch to warning color if(mValue < mWarnLevel) { tColor = mWarnColor; // If the pulseRate is set then pulse the text if Speed is below the threshold if (mPulseRate != 0 && mValue < mPulseThreshold) { U32 time = Platform::getVirtualMilliseconds(); F32 alpha = 2.0f * F32(time % mPulseRate) / F32(mPulseRate); tColor.alpha = (alpha > 1.0f)? 2.0f - alpha: alpha; } } drawUtil->setBitmapModulation(tColor.toColorI()); drawUtil->drawText(mProfile->mFont, offset, buf); drawUtil->clearBitmapModulation(); // If enabled draw the border last if (mShowFrame) drawUtil->drawRect(updateRect, mFrameColor.toColorI()); } And that's it. You have to add it via the GUI Editor to the PlayGui.gui obviously, and it remains hidden until you mount a vehicle. Change the warning level in the editor to get it display green at smaller numbers, default is 10.
  5. Call the volume directly rather than a function to alter the volume - which seems a bit odd but hey ... soundEmitterID.volume=0.5; And apologies for not mentioning this months ago ;)
  6. *squints* Tries to ID the tank ...
  7. Apologies for late reply. You can disable the console in game/main.cs by changing setLogMode from 6 to 0. // Default to a new logfile each session. if( !$logModeSpecified ) { if( $platform !$= "xbox" && $platform !$= "xenon" ) setLogMode(6); } However a client could just turn it back so probably best to remove it and set it to zero in C++ (search for wherever setlogmode gets logged). If the client is seperate from the server they shouldn't be able to access server-side functions as is.
  8. Just to note I had the issue with the DAE exporter adding a "phantom" duplicate armature again recently. I fixed this by parenting the meshes to the armature (without parent via deform) and keeping the armature modifier. This seemed to resolve everything and the exporter did not add a duplicate armature.
  9. Just to note I had the issue with the DAE exporter adding a "phantom" duplicate armature again recently. I fixed this by parenting the meshes to the armature (without parent via deform) and keeping the armature modifier. This seemed to resolve everything and the exporter did not add a duplicate armature.
  10. Alien (Mantis Man) Art Pack https://drive.google.com/file/d/1qedTnm7NaD7dlRbTAobsfrjlLEq8VkHH/view?usp=sharing Also if you're using Blender my how-to tutorial on exporting the zombie FBX files via Blender and into Torque https://forums.torque3d.org/viewtopic.php?f=18&t=1237
  11. Way back in 3.5.1 ... your project/source/torqueConfig.h file should look like this: So first up enable dso compiling flag, then run your project for the DSOs to compile, then disable the flag again. Remove all cs and dae files, let your game read only the compiled files dso and cached.dts ( that way no one can see how bad your scripts are ;) or reuse your collada files) Set the relevant flags for shipping, player etc. As I remember, you have to add the player build flag above the debug flag to disable debug which in turn selects release build. Also manualy set shipping. Also seem to remember that game/main.cs had to be included and NOT the dso of it. This might have been fixed since then as I did mention it to GG but that doesn't mean anything happened and I can't remember off the top of my head. #ifndef _TORQUECONFIG_H_ #define _TORQUECONFIG_H_ //----------------------------------------------------------------------------- //Hi, and welcome to the Torque Config file. // //This file is a central reference for the various configuration flags that //you'll be using when controlling what sort of a Torque build you have. In //general, the information here is global for your entire codebase, applying //not only to your game proper, but also to all of your tools. /// What's the name of your application? Used in a variety of places. #define TORQUE_APP_NAME "Airship Dragoon" /// What version of the application specific source code is this? /// /// Version number is major * 1000 + minor * 100 + revision * 10. #define TORQUE_APP_VERSION 1660 /// Human readable application version string. #define TORQUE_APP_VERSION_STRING "1.6.6" /// Define me if you want to enable multithreading support. #ifndef TORQUE_MULTITHREAD #define TORQUE_MULTITHREAD #endif /// Define me if you want to disable Torque memory manager. #ifndef TORQUE_DISABLE_MEMORY_MANAGER #define TORQUE_DISABLE_MEMORY_MANAGER #endif /// Define me if you want to disable the virtual mount system. //#define TORQUE_DISABLE_VIRTUAL_MOUNT_SYSTEM /// Define me if you want to disable looking for the root of a given path /// within a zip file. This means that the zip file name itself must be /// the root of the path. Requires the virtual mount system to be active. //#define TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP //Uncomment this define if you want to use the alternative zip support where you can //define your directories and files inside the zip just like you would on disk //instead of the default zip support that treats the zip as an extra directory. //#define TORQUE_ZIP_DISK_LAYOUT /// Define me if you don't want Torque to compile dso's //#define TORQUE_NO_DSO_GENERATION #define TORQUE_PLAYER//yorks add this and for player! // Define me if this build is a tools build #ifndef TORQUE_PLAYER # define TORQUE_TOOLS #else # undef TORQUE_TOOLS #endif /// Define me if you want to enable the profiler. /// See also the TORQUE_SHIPPING block below //#define TORQUE_ENABLE_PROFILER /// Define me to enable debug mode; enables a great number of additional /// sanity checks, as well as making AssertFatal and AssertWarn do something. /// This is usually defined by the build target. //#define TORQUE_DEBUG /// Define me if this is a shipping build; if defined I will instruct Torque /// to batten down some hatches and generally be more "final game" oriented. /// Notably this disables a liberal resource manager file searching, and /// console help strings. #define TORQUE_SHIPPING//yorks on /// Define me to enable a variety of network debugging aids. /// /// - NetConnection packet logging. /// - DebugChecksum guards to detect mismatched pack/unpacks. /// - Detection of invalid destination ghosts. /// //#define TORQUE_DEBUG_NET /// Define me to enable detailed console logging of net moves. //#define TORQUE_DEBUG_NET_MOVES /// Enable this define to change the default Net::MaxPacketDataSize /// Do this at your own risk since it has the potential to cause packets /// to be split up by old routers and Torque does not have a mechanism to /// stitch split packets back together. Using this define can be very useful /// in controlled network hardware environments (like a LAN) or for singleplayer /// games (like BArricade and its large paths) #define MAXPACKETSIZE 1500//yorks on /// Modify me to enable metric gathering code in the renderers. /// /// 0 does nothing; higher numbers enable higher levels of metric gathering. //#define TORQUE_GATHER_METRICS 0 /// Define me if you want to enable debug guards in the memory manager. /// /// Debug guards are known values placed before and after every block of /// allocated memory. They are checked periodically by Memory::validate(), /// and if they are modified (indicating an access to memory the app doesn't /// "own"), an error is flagged (ie, you'll see a crash in the memory /// manager's validate code). Using this and a debugger, you can track down /// memory corruption issues quickly. //#define TORQUE_DEBUG_GUARD /// Define me if you want to enable instanced-static behavior //#define TORQUE_ENABLE_THREAD_STATICS /// Define me if you want to gather static-usage metrics //#define TORQUE_ENABLE_THREAD_STATIC_METRICS /// Define me if you want to enable debug guards on the FrameAllocator. /// /// This is similar to the above memory manager guards, but applies only to the /// fast FrameAllocator temporary pool memory allocations. The guards are only /// checked when the FrameAllocator frees memory (when it's water mark changes). /// This is most useful for detecting buffer overruns when using FrameTemp<> . /// A buffer overrun in the FrameAllocator is unlikely to cause a crash, but may /// still result in unexpected behavior, if other FrameTemp's are stomped. //#define FRAMEALLOCATOR_DEBUG_GUARD /// This #define is used by the FrameAllocator to align starting addresses to /// be byte aligned to this value. This is important on the 360 and possibly /// on other platforms as well. Use this #define anywhere alignment is needed. /// /// NOTE: Do not change this value per-platform unless you have a very good /// reason for doing so. It has the potential to cause inconsistencies in /// memory which is allocated and expected to be contiguous. /// ///@ TODO: Make sure that everywhere this should be used, it is being used. #define TORQUE_BYTE_ALIGNMENT 4 /// This #define should be set if the engine should use a 32-bit format for /// 24-bit textures. The most notable case is converting RGB->RGBX for various /// reasons. // CodeReview: It may be worth determining this at run-time. Right now I just // want to wrap code which forces the conversion from 24->32 in a common // #define so it is easily turned on/off for the problems we are encountering in // the lighting. [5/11/2007 Pat] //#define TORQUE_FORCE_24_BIT_TO_32_BIT_TEXTURES /// This #define is used by the FrameAllocator to set the size of the frame. /// /// It was previously set to 3MB but I've increased it to 16MB due to the /// FrameAllocator being used as temporary storage for bitmaps in the D3D9 /// texture manager. #define TORQUE_FRAME_SIZE 16 << 20 // Finally, we define some dependent #defines. This enables some subsidiary // functionality to get automatically turned on in certain configurations. #ifdef TORQUE_DEBUG #define TORQUE_GATHER_METRICS 0 #define TORQUE_ENABLE_PROFILE_PATH #ifndef TORQUE_DEBUG_GUARD #define TORQUE_DEBUG_GUARD #endif #ifndef TORQUE_NET_STATS #define TORQUE_NET_STATS #endif // Enables the C++ assert macros AssertFatal, AssertWarn, etc. #define TORQUE_ENABLE_ASSERTS #endif #ifdef TORQUE_RELEASE // If it's not DEBUG, it's a RELEASE build, put appropriate things here. #endif #ifdef TORQUE_SHIPPING // TORQUE_SHIPPING flags here. #else // Enable the profiler by default, if we're not doing a shipping build. #define TORQUE_ENABLE_PROFILER // Enable the TorqueScript assert() instruction if not shipping. #define TORQUE_ENABLE_SCRIPTASSERTS // We also enable GFX debug events for use in Pix and other graphics // debugging tools. #define TORQUE_ENABLE_GFXDEBUGEVENTS #endif #ifdef TORQUE_TOOLS # define TORQUE_INSTANCE_EXCLUSION "TorqueToolsTest" #else # define TORQUE_INSTANCE_EXCLUSION "TorqueTest" #endif // This is the lighting system thats enabled by default when the scene graphs are created. //#define DEFAULT_LIGHTING_SYSTEM "SynapseGaming Lighting Kit" #define DEFAULT_LIGHTING_SYSTEM "Basic Lighting" // Someday, it might make sense to do some pragma magic here so we error // on inconsistent flags. // The Xbox360 has it's own profiling tools, the Torque Profiler should not be used #ifdef TORQUE_OS_XENON # ifdef TORQUE_ENABLE_PROFILER # undef TORQUE_ENABLE_PROFILER # endif # # ifdef TORQUE_ENABLE_PROFILE_PATH # undef TORQUE_ENABLE_PROFILE_PATH #endif #endif #endif // _TORQUECONFIG_H_ If you're using Steam you need to ship the steam_api.dll in your game folder and of course have the necessary links to #include and probably achievements and hookup stuff in app/mainLoop.cpp. Sure I wrote a tutorial on this somewhere. :?
  12. *Changes bookmark to read @JeffR master builds, because I can never remember his github username* ... squints at Az for same reason ... :evil:
  13. Just to note; after more faffing around in Blender I discovered that you can actually "apply all transforms" via the object and it will automagically set it's position, rotation and scale to default, once you have rotated and repositioned the armature to your liking, with just the click of a button (and the same for each mesh) - thus saving all the faffing around of manual rotations. You can also export a T-Pose straight from makeHuman under their "Pose tab", but you will still have to make the 1 degree change midway up the spine to get the armature perfectly straight.
  14. Kork and Elf girl reunited! Just need Space Ork, Boombot and Forge guy (did anyone really notice him?) for the full party. ;)
  15. There are some pre-compiled versions of Torsion out there. http://yorkshirerifles.com/downloads/Torsion_Precompiled.zip
  16. Just a few notes on using makeHuman, getting the model into Blender3D (2.82a) so that you can export it out to Torque3D. makeHuman is very useful for creating a base humanoid mesh and more importantly ---- avoiding the utter horrors of weight painting armpits and shoulders, I can never seem to get a decent deformation in this area so having it automated is a relief. Firstly, export from makeHuman as a Collada file - but even before that - make certain that "smooth" is turned off, or your mesh will export with a subsurf and be >100K tris. With smooth off it's a more manageable 26K tris for the main body with eyes, teeth and tongue meshes being seperate. You may also want to choose an skeleton without all the boens for toes, there are various armatures to select. As my character is female, I chose the "Unity with boobs and butts", which is the default game engine skeleton with additional boobs and butt bones featuring a simplified single toe bone for each foot. Now to import that Collada file into Blender. If you do not choose any option for the import then you will find a lot of very tiny bones, none of them linked together. This means that selection and manipulation becomes almost impossible. Image1: Tiny Bones. To prevent this open up the dropdown menu for options in the import dialogue (the cog symbol top right) and select all the armature options and bind info. Now when it imports the model most (but not all bones) will be large, connected to their neighbours and easy to select and manupulate for animations. Image2: Import Options. Image3 Big Bones. Now not all bones have resized, and you'll notice things like eyes, eyelids (and boobs and butts) are still tiny, and finger tips occupy the same space as mid-finger bones. The easiest way to resize or move hard to select bones is to select them via the object properties list. Select the armature, choose "edit mode" in the "3D Viewport". From the properties editor, select the bone on the armature before returning to the 3D Viewport and extruding a new bone. One large enough, select teh whole of this bone, and use it as a helper to drag the end (known as the tail) of the original bone out to a new position, thus making the whole of the bone larger - and thus easier for selection and animation. After the original bone has been enlarged and repositioned, you can delete the helper bone which you have just created. Image4: Helper Bones. Once all your bones are easily viewable and selectable we need to rename some. Torque likes to use the "Bip_01 Bone" system from 3DS Max especially for recoil animations. So rename the spinal bones as such using underscores for spaces or the named bone will not export correctly to Torque from Blender: hips - Bip01_Pelvis spine - Bip01_Spine chest - Bip01_Spine2 neck - Bip_01_Neck head - Bip01_Head Now the main problem with your new base model ... is that it's pointing the wrong way. The easiest solution is to select the armature and rotate it 180 degrees from above. However, if you are sharing animations between models in-game, there may be some rotation issues if the animations were exported from a model with different rotations. Just to be on the safe side, let's make the armature and all meshes stem from rotation 0,0,0. Now you'll notice that the default rotation is x 90, y 0, z 0. We want that to read 0,0,0 - but we need to change it via -90,0,180 to point the correct way for Torque. {EDIT} Note; if in makeHuman you export the Collada file with orientation Z up Face -Y, the imported armature will be facing the wrong way but x will be 0 and not 90. So this will save you at least one rotation alteration for the armature and meshes. Make a copy of the armature and any meshes - You can do this by duplicating the collection - and rotate this new armature to face the correct direction. We will use this copy to help realign our working mesh and armature. Back to the working objects. On the armature set the rotations to 0,0,0. Afterwards, unparent the working meshes from the armature (or this will cause animation issues later) using ALT P "clear and keep transformation" (or else you will have a scaling issue), and disable the armature modifier by selecting no object under modifiers->armature for each mesh object. Now select the armature and go into edit mode, select all bones and move and rotate them until they overlap your copy armature. Do this the same with each of the meshes. Image5: Unrotated Objects and Rotated Helper Objects. Image6: Correctly Facing Objects At 0,0,0. Make certain that your mesh and armature are central using the blue Z axis line in the 3D viewport. Use the crotch of the mesh for this, and the head (base) of the "hips" bone. Now you will notice that the upper body is not perfectly aligned for either the armature or the body mesh. Now change the armature modifier back to the original armature object for each of the mesh objects. After this you may want to fix the slight kink in the upper body - especially if you are going to use the mirror modifier for creating clothes later, as it will look slightly out the higher up the model you go. Image7: One Degree Spinal Changes - spot the difference! Make certain the armature is set to "pose position" and not "rest position". Select the armature and in "Pose Mode", rotate bone Bip01_Spine1 one degree clockwise (facing the front of the model). Now rotate bone Bip01_Spine2 one degree anticlockwise to straighten the shoulders. Back to Object mode and select the meshes and apply the armature modifier for each mesh. This will lock the mesh in that pose and remove the armature link. Back to the armature and in "pose mode" click the pose tab for the drop down and select "Apply Pose As Rest Pose" so that the armature will now default to this position. Image8: Default to the new pose. Hurray. Just a few more things. Finally you have all your objects at rotation 0,0,0 and facing the correct way for Torque. You may want to delete the extra meshes like tongue and teeth, incorporate the eyes into the base body mesh. The base body mesh could then also lose some extra polys such as the inside of the mouth and eyes - sewing up the lips so to speak, as not all character player models will need these things. One final thing you may wish to do is to create a T-Pose. Go into armature "pose mode" and move the following bones, remembering that a positive move on one side of the skeleton is a negative number on the other. shoulder(left/right) z 10 y 0 upper_arm(left/right) z 35 y 0 foreArm(left/right) z 5 y 35 Now for each mesh apply the armature modifier to set the pose and unlink it. Finally set the pose as the rest pose, and then readd the armature modifier to each mesh. Image 9: Finished in Blender (with base01->start01 empty node heirarchy for export) And that should set you up for a perfectly workable character model that can be added to and modified to be a unique player character, exported out the usual way. Infact if you simplify the mesh by sealing the mouth and eyes to the main body mesh the tris count will drop from ~26.7K to ~23.5K. Now simplify the feet to turn the toes into a solid block you can save a further 2K tris immediately, bringing the total to ~21K. Now you can add all the extra Torque necessary nodes like mount0, mount1, catEar_left, catEar_right, etc ... {EDIT} Oh and the last thing the armature scale defaults to 0.1 which should be the correct scale for the stock Torque3D player character. Image10: Exported into Torque3D using the classic base01->start01 empty node heirarchy, and forcing the import scale to 1, as it seems to default to 1000 which is huge! Cat-ears not included ...
  17. Update: Apparently @Bloodknight was having some issues with his workflow for importing FBX with collision meshes via assimp (Preview 4.0 Build 5) whilst he upgraded to the latest version of Blender. It appears that when importing FBX format naming is more required than when just using DAE. Anyhow I had a play around with exporting FBX from Blender and here's what I found. 1: It really likes the DAE heirarchy if you want working collision meshes when exporting FBX. :| 2: If you import as SingleSize your object meshes require trailingNumber LOD else the collision meshes will not work. :o Weird right? :? 3: It will import working collision meshes when using DetectDTS or TrailingNumber (even when you have no trailingNumber) without trailing numbers for LOD. :shock: Did I mention trailing number in that sentence at all? :? 4: FBX is HUUUUUUUUUUUUUUUUUGE. :o Importing at scale 0.01 is the same as importing a DAE at 1.0. It still feels like there are some sort of shennanigans going on with FBX - or at least FBX from Blender 2.8 but I'm not entirely certain what ... :ugeek:
  18. You should not "need" to register a company to trade under a name for "sole proprietor". If your country has a trade deal with the US you will need to telephone the IRS in America - fill out the W8-BEN form first - to register yourself as a "non-resident alien" --- you want to opt for an EIN (Employer Identification Number) rather than a TIN (Tax Identification Number) because you are the business. That way Steam doesn't withold tax. If you cannot get an US EIN in your country, you'll need to send receipts to your tax office to try and claim back US paid tax as a local tax credit (good luck with that!). More info https://partner.steamgames.com/doc/finance/taxfaq (though a lot of it is not that helpful). tl;dr - no you don't need to be a company but if you start making serious dosh it really helps. ;)
  19. Just a note on animations: I export the character model without any animations. Select the armature, set the TimeLine to 0, go into the Dope Sheet->Action Editor and hit "x" to disable/deselect the current action, in armature Properties->Object Data put it in the Rest Position, then from the Viewport select Pose Mode, select all bones, in Pose tab Apply->Apply Visual Transform To Pose, back to the Properties->Object Data and deseclt Rest Position by pressing Pose Position button, and then select all objects that I want exporting and export. This way the character model exports without an ambient animation. For export you only need selected the base01-start01-armature-bounds, no meshes, no LODs. For each animation, I select it in the Dope Sheet->Action Editor. In the Timeline select the start and end frames - this is new to Blender 2.8 and it will either cut off your animation if it is too short or add empty frames if too long. NOTE: keyframe 0 is the Rest Position, so animations start at 1. This helps with transforms, especially for blend animations. For a blend animation the root pose is 2, and the blend animation starts at 3. For cyclic animations like run, 0 is the Rest Position, 1 is the start of the loop animation and the last frame is a copy of this. In tsShapeConstructor the start and end frames are selected, so for looping animations the end frame is the last minus 1. So ehre's what the tsShapeConstructor looks like; note animations start at 1, thus missing the Rest Pose to help transforms, blends start at 2 to miss Rest Pose and Root pose reference, looping animations end at the frame before they finish so not to replay it, all other animations end at -1, the finish. There are no Death, Head, Headside, or Look animations because this is set up for a topdown character who only shoots forwards. singleton TSShapeConstructor(GunGirlPlayerDae) { baseShape = "./gunGirlPlayer.dae"; lodType = "TrailingNumber"; loadLights = "0"; }; function GunGirlPlayerDae::onLoad(%this) { %this.addSequence("./anims/gunGirlPlayer_landx.dae", "land", "1", "-1", "1", "0"); %this.setSequenceCyclic("land", "0"); %this.setSequencePriority("Land", "0"); %this.addSequence("./anims/gunGirlPlayer_fallx.dae", "fall", "1", "-1", "1", "0"); %this.setSequencePriority("Fall", "1"); %this.addSequence("./anims/gunGirlPlayer_sprint_backwardx.dae", "sprint_backward", "1", "24", "1", "0"); %this.setSequencePriority("sprint_backward", "2"); %this.addSequence("./anims/gunGirlPlayer_sprint_left_sidex.dae", "sprint_side", "1", "24", "1", "0"); %this.setSequencePriority("sprint_side", "3"); %this.addSequence("./anims/gunGirlPlayer_sprint_right_sidex.dae", "sprint_right", "1", "24", "1", "0"); %this.setSequencePriority("sprint_right", "4"); %this.addSequence("./anims/gunGirlPlayer_sprint_forwardx_static.dae", "sprint_forward", "1", "16", "1", "0"); %this.setSequencePriority("sprint_forward", "5"); %this.addSequence("./anims/gunGirlPlayer_backx.dae", "back", "1", "98", "1", "0"); %this.setSequencePriority("Back", "6"); %this.addSequence("./anims/gunGirlPlayer_side_leftx.dae", "side", "1", "50", "1", "0"); %this.setSequencePriority("Side", "7"); %this.addSequence("./anims/gunGirlPlayer_side_rightx.dae", "side_right", "1", "50", "1", "0"); %this.setSequencePriority("Side_Right", "8"); %this.addSequence("./anims/gunGirlPlayer_runx.dae", "run", "1", "98", "1", "0"); %this.setSequencePriority("Run", "9"); %this.addSequence("./anims/gunGirlPlayer_rootBase.dae", "root", "1", "60", "1", "0"); %this.setSequencePriority("root", "10"); %this.addSequence("./anims/gunGirlPlayer_heavy_recoilx.dae", "heavy_recoil", "2", "-1", "1", "0"); %this.setSequenceCyclic("heavy_recoil", "0"); %this.setSequencePriority("heavy_recoil", "11"); %this.setSequenceBlend("heavy_recoil", "1", "root", "0"); %this.addSequence("./anims/gunGirlPlayer_medium_recoilx.dae", "medium_recoil", "2", "-1", "1", "0"); %this.setSequenceCyclic("medium_recoil", "0"); %this.setSequencePriority("medium_recoil", "12"); %this.setSequenceBlend("medium_recoil", "1", "root", "0"); %this.addSequence("./anims/gunGirlPlayer_light_recoilx.dae", "light_recoil", "2", "-1", "1", "0"); %this.setSequenceCyclic("light_recoil", "0"); %this.setSequencePriority("light_recoil", "13"); %this.setSequenceBlend("light_recoil", "1", "root", "0"); } Now note I use sequencePriorities just to make sure things don't have to think too much about what should be playing. These are based on what the engine would expect to play in order. eg: if Land comes before Fall because if you have landed you are no longer falling, etc 0 Death, Land, Head, Headside, Look 1 Fall 2 Jump 3 Crouch_Back 4 Crouch_Side 5 Crouch_Right 6 Crouch_Forward 7 Crouch_Root 8 Sprinting_Back 9 Sprinting_Side 10 Sprinting_Right 11 Sprinting_Forward 12 (Standing_)Back 13 (Standing_)Side 14 (Standing_)Right 15 (Standing_)Run 16 (Standing_)Root 17 Light_Recoil 18 Medium_Recoil 19 Heavy_Recoil 20+ Others after this... So why export animations seperately? If you export a single ambient animation, either on it's own, or with the character model, Torque has to load the entire animation EVERY TIME you want to add or modify a single animation and this takes time, even on my i7 there are seconds of twiddling thumbs while it loads it EVERY TIME. By having smaller, more numerous animations it's over in an instant, and you barely see the "loading collada animation" popup. Secondly, if you have seperate animations you can reuse them for other character which have the same armature set up rather than loading the same files over and over again. Hopefully this helps and isn't too complicated. :?
  20. A note on exporting animations. The new (it's actually still the old 1.4.1) Blender3D 2.8 COLLADA exporter has a whole lot of new options. Some of these options work better than others ... Under the "Animation" tab, deselect "Include All Actions" as you only want a single "ambient" animation exporting, and tick "Keep Keyframes" or your animation isn't going anywhere. Under the "Extra" tab, select "Sort By Object Name" to prevent duplicate armatures appearing, and select "Keep Bind Info" to prevent the above mangling from occuring. And hopefully all will be well once it gets into Torque. :mrgreen:
  21. Catchick cosplays as Gun Girl, dual wielding twin pistols for that John Woo vibe. WTEHr8GqqxM Recorded in glorious 30fps so it's a little janky but my upstream internet is bad.
  22. Assimp could import .blend files pre-2.8 directly into Torque - which is what I thought you meant. I'm exporting collada out of blender and into Torque - as usual, but the setup has changed in Blender 2.8.
×
×
  • Create New...