-
Posts
31 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Articles
Docs
Gallery
Posts posted by newaged
-
-
output is
0_testmaterial
1_testmaterial
2_testmaterial
3_testmaterial
Names and vars can't start with numbers. Switch the names to testmaterial_[%i] and things will start going much smoother.
-
I never used them outside of the shape editor, but importing and playing the animations worked fine for me. Creating a new project using the dev branch could help, this isn't the first time someone has reported the prebuilt binaries doing things they shouldn't.
For future reference - torque does not support shape keys from what I recall, its probably best to disable those. Torque needs triangulated meshes but isn't the best at triangulation, its best to let the modeling program do that when exporting. Use translocrot when exporting with the stock exporter, not matrix.
-
Imported the cubeman dae and it seems to work just fine for me. What version of torque are you running?
-
hm... try resetting the scale/pos/rot of everything with shift a maybe? Also get rid of any shapekeys and use loc/rot/scale for keyframes.
-
-
This resource changes the shading on most objects, making them look like this http://i.imgur.com/slbN28E.png.
Changes:
shaders\common\lighting\advanced\vectorLightP.hlsl, line 203
float dotNL = dot(-lightDirection, normal);
to
float dotNL = clamp(smoothstep(0.4, 0.43, dot(-lightDirection, normal)), 0.2, 1.0);
shaders\common\lighting\advanced\pointLightP.hlsl, line 163
float nDotL = dot( lightVec, normal );
to
float nDotL = clamp(smoothstep(0.4, 0.43, dot( lightVec, normal )), 0.2, 1.0);
shaders\common\lighting\advanced\spotLightP.hlsl, line 99
float nDotL = dot( normal, -lightToPxlVec );
to
float nDotL = clamp(smoothstep(0.4, 0.43, dot( normal, -lightToPxlVec )), 0.2, 1.0);
A more difficult to install version that includes object outlines is currently in progress.
http://i.imgur.com/fjN6ebA.png
-
@deathbravo I believe that problem has been fixed in a recent blender release.
@HanaAnderson Yes, you can replace the default character. http://www.garagegames.com/products/torque-3d/fps#/4-characters/#Change_Player_Model . It does not need animations to work. If you were asking if you need to make your own, you probably will.
-
I would recommend going through a tutorial like this if you have a lot of questions http://www.garagegames.com/products/torque-3d/fps#/3-scripting.
It should help you figure a few things out.
-
Thought I should mention the alternative to editing the model in a modeling program. The shape editor lets you create nodes that are children of bones, so it is possible to add a correct mount point to an object after it is made.
-
@Duion Yep. Delay, fade time, repeat count and the variances of the first 4 mentioned groups as well.
-
@Duion It fixes the problem in the full template. The problem will still occur if a playlist has enough of its slots changed from their default values.
-
@Azaezel I should probably mention that the last comment was about lowering the hardcoded value, not about your idea of detecting filled slots. That would work fine if I knew how to do it.
Anyways, I am posting here again because I will probably do github stuff soon. Does anyone have an opinion on this being one of the prs? Its not a pretty solution to the problem, but it doesn't break networking like whats in the engine right now.
-
Went along with the lower precision idea for a bit, but my basic coding skills weren't enough to make something stable. I decided to use a bunch of flags until I get better at C++.
The code changes for anyone who wants them.
SFXPlayList::packData( sfx/sfxPlaylist.cpp line 366) ... FOR_EACH_SLOT stream->write( mSlots.mFadeTimeIn.mValue[ i ] ); FOR_EACH_SLOT stream->write( mSlots.mFadeTimeIn.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->write( mSlots.mFadeTimeIn.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->write( mSlots.mFadeTimeOut.mValue[ i ] ); FOR_EACH_SLOT stream->write( mSlots.mFadeTimeOut.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->write( mSlots.mFadeTimeOut.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->write( mSlots.mDelayTimeIn.mValue[ i ] ); FOR_EACH_SLOT stream->write( mSlots.mDelayTimeIn.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->write( mSlots.mDelayTimeIn.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->write( mSlots.mDelayTimeOut.mValue[ i ] ); FOR_EACH_SLOT stream->write( mSlots.mDelayTimeOut.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->write( mSlots.mDelayTimeOut.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->write( mSlots.mVolumeScale.mValue[ i ] ); FOR_EACH_SLOT stream->write( mSlots.mVolumeScale.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->write( mSlots.mVolumeScale.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->write( mSlots.mPitchScale.mValue[ i ] ); FOR_EACH_SLOT stream->write( mSlots.mPitchScale.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->write( mSlots.mPitchScale.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->write( mSlots.mRepeatCount[ i ] ); ... SFXPlayList::unpackData(line 408) ... FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeIn.mValue[ i ] ); FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeIn.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeIn.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeOut.mValue[ i ] ); FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeOut.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeOut.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeIn.mValue[ i ] ); FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeIn.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeIn.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeOut.mValue[ i ] ); FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeOut.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeOut.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->read( &mSlots.mVolumeScale.mValue[ i ] ); FOR_EACH_SLOT stream->read( &mSlots.mVolumeScale.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->read( &mSlots.mVolumeScale.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->read( &mSlots.mPitchScale.mValue[ i ] ); FOR_EACH_SLOT stream->read( &mSlots.mPitchScale.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT stream->read( &mSlots.mPitchScale.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT stream->read( &mSlots.mRepeatCount[ i ] );change that to this
SFXPlayList::packData ... FOR_EACH_SLOT if (stream->writeFlag(mSlots.mFadeTimeIn.mValue[ i ] != -1 )) stream->write( mSlots.mFadeTimeIn.mValue[ i ] ); FOR_EACH_SLOT if (stream->writeFlag( mSlots.mFadeTimeIn.mVariance[ i ][ 0 ] > 0)) stream->write(mSlots.mFadeTimeIn.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT if (stream->writeFlag( mSlots.mFadeTimeIn.mVariance[ i ][ 1 ] > 0)) stream->write(mSlots.mFadeTimeIn.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mFadeTimeOut.mValue[ i ] != -1 )) stream->write( mSlots.mFadeTimeOut.mValue[ i ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mFadeTimeOut.mVariance[i][0] > 0)) stream->write(mSlots.mFadeTimeOut.mVariance[i][0]); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mFadeTimeOut.mVariance[i][1] > 0)) stream->write(mSlots.mFadeTimeOut.mVariance[i][1]); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mDelayTimeIn.mValue[ i ] > 0)) stream->write(mSlots.mDelayTimeIn.mValue[ i ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mDelayTimeIn.mVariance[ i ][ 0 ] > 0)) stream->write(mSlots.mDelayTimeIn.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mDelayTimeIn.mVariance[ i ][ 1 ] > 0)) stream->write(mSlots.mDelayTimeIn.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mDelayTimeOut.mValue[ i ] > 0)) stream->write(mSlots.mDelayTimeOut.mValue[ i ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mDelayTimeOut.mVariance[ i ][ 0 ] > 0)) stream->write(mSlots.mDelayTimeOut.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mDelayTimeOut.mVariance[ i ][ 1 ] > 0)) stream->write(mSlots.mDelayTimeOut.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mVolumeScale.mValue[ i ] != 1)) stream->write(mSlots.mVolumeScale.mValue[ i ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mVolumeScale.mVariance[ i ][ 0 ] > 0)) stream->write(mSlots.mVolumeScale.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mVolumeScale.mVariance[ i ][ 1 ] > 0)) stream->write(mSlots.mVolumeScale.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mPitchScale.mValue[ i ] != 1)) stream->write(mSlots.mPitchScale.mValue[ i ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mPitchScale.mVariance[ i ][ 0 ] > 0)) stream->write(mSlots.mPitchScale.mVariance[ i ][ 0 ] ); FOR_EACH_SLOT if (stream->writeFlag(mSlots.mPitchScale.mVariance[ i ][ 1 ] > 0)) stream->write(mSlots.mPitchScale.mVariance[ i ][ 1 ] ); FOR_EACH_SLOT if (stream->writeFlag( mSlots.mRepeatCount[ i ] > 0)) stream->write( mSlots.mRepeatCount[ i ] ); ..... SFXPlayList::unpackData ... FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mFadeTimeIn.mValue[ i ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mFadeTimeIn.mVariance[ i ][ 0 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mFadeTimeIn.mVariance[ i ][ 1 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mFadeTimeOut.mValue[ i ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mFadeTimeOut.mVariance[ i ][ 0 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mFadeTimeOut.mVariance[ i ][ 1 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mDelayTimeIn.mValue[ i ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mDelayTimeIn.mVariance[ i ][ 0 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mDelayTimeIn.mVariance[ i ][ 1 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mDelayTimeOut.mValue[ i ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mDelayTimeOut.mVariance[ i ][ 0 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mDelayTimeOut.mVariance[ i ][ 1 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mVolumeScale.mValue[ i ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mVolumeScale.mVariance[ i ][ 0 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mVolumeScale.mVariance[ i ][ 1 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mPitchScale.mValue[ i ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mPitchScale.mVariance[ i ][ 0 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mPitchScale.mVariance[ i ][ 1 ] );} FOR_EACH_SLOT if(stream->readFlag()){ stream->read( &mSlots.mRepeatCount[ i ] );}I do realize I could have just changed the slot count, but it still would have sent out a large amount of mostly blank data.
-
SFXPlaylist's pack function outputs too much data for the bitstream to handle, so I am reducing the amount of data it sends. Some of its default values are -1, so I was wondering if writesignedfloat has any downsides when compared to writefloat. Secondary topic, is assigning 10 bits for general data too much or too little?
-
What changes do you need to make to custom materials / shaders that worked in 3.8 to get them to work here? They are always replaced with a white mat in the deferred branch. Can't share the shader code, I didn't write it.
-
@PaulWeston As far as I can tell. Something to note - it seems the default behavior of zooming in the texture on low settings was intended. I don't know if it behaved that way to fix a problem, or if that problem is still here. It could also just be a quirk of some old code no one really uses or pays attention to, so it might not be a big deal. The change works fine for me in any case.
-
Peeked at the engine code. Can't say I understand how most of the back end works, but I figured out a temporary solution.
In gfx/video/theoratexture.cpp at line 60
GFX_ImplementTextureProfile( GFXTheoraTextureProfile, GFXTextureProfile::DiffuseMap, GFXTextureProfile::NoMipmap | GFXTextureProfile::Dynamic, GFXTextureProfile::NONE );Change that to this
GFX_ImplementTextureProfile( GFXTheoraTextureProfile, GFXTextureProfile::DiffuseMap, GFXTextureProfile::NoMipmap | GFXTextureProfile::Dynamic | GFXTextureProfile::PreserveSize, GFXTextureProfile::NONE );and texture scaling will be disabled.
-
Turns out it might not be a model issue after all. After changing some quality prefs, my theora test object was zoomed in as well. Could be an engine problem that requires some dirty work to fully fix.
-
Posting here again because I haven't learned how to github yet.
I was going through some tutorials when an issue popped up. The camera position given by GameTSCtrl::OnMouseDown and %GameConnection.getCameraObject().GetPosition() were clearly different, and it was making the serverCmd provided by the tutorial behave oddly. I wasn't sure if that was intended or not, so I made a new method to use in its place.
DefineEngineMethod(GameConnection, getControlCameraPosition, Point3F, (), , "@brief Gets the true position of this GameConnection's camera.\n\n" "@see GameConnection::getCameraObject()\n\n") { MatrixF transform; if (!object->getControlCameraTransform(0.032f, &transform)) return {0, 0, 0}; return transform.getPosition(); }Stick that somewhere near the end of gameConnection.cpp. %GameConnection.getControlCameraPosition() will return the position of the camera the same way OnMouseDown would.
-
Collision for all of those things seem to work for me. I'm not using stock 3.8 though, the tests were done on a fairly recent build of the dev branch.
-
Updated the code - removed some pointless changes
@JeffR I'll look into posting these fixes on github. Should they be batched together or done individually?
-
Was it causing a crash? I stopped using the callOnChildren after it caused too much crash, also if I remember right it was not always working correctly when it wasn't causing crash...
Yeah, it was causing a crash before. I haven't used it enough to comment on the second problem.
-
Ran into another problem I managed to fix. If this isn't the right forums for posts like these, or if I should be doing this on github, please let me know.
Anyways, the simgroup/simset function callOnChildren wasn't working, so I changed
void SimSet::callOnChildren(simSet.cpp line 232) { ... ConsoleValueRef args[21]; args[0] = method.c_str();to this
ConsoleValue vals[2]; ConsoleValueRef args[21]; vals[0].init(); vals[0].setStringValue(method.c_str()); args[0].value = &vals[0]; vals[1].init(); args[1].value = &vals[1];
and things started to work again. Was that the right way to go about it?
-
Maybe it has something to do with the tolerance, maybe it doesn't, I don't know enough about the collision system to say. The changes I made do seem to work however, the default soldier still works fine even when scaled to 1/20th of his original size.

TorqueScript limitation - is perception reality?
in TorqueScript
Posted
The numbers thing is just how the language works. You can still easily generate prefixes with that limitation, just stick a random char or short string in front of the number