HalfVector
@halfvector
New Member
Joined: Feb 15, 2024
Topics: 3 / Replies: 189
Reply
RE: Simple Mod memory issue

You could rotate the point without using matrices. That way the script will consume less memory: plugin simpleMod twist2 name:”Twist 2″ classID:#(0xa…

19 years ago
Forum
Reply
RE: A* Pathfinding help

If your cells are perfectly aligned, you could subtract the current point from the target point. If one of the components (x or y) is equal zero (or n…

19 years ago
Forum
Reply
RE: select by bitmap type?

This function should do the trick: fn selectByBitmapType bmType mapType:”diffuseMap” = ( local mtlFlags = #{} for nMtl = 1 to sceneMaterials.coun…

19 years ago
Forum
Reply
RE: FloatSwap

Great!. Yes, seems like the decimal precission for the number stored in memory is higher than the number shown in the maxscript listener. Greets.

19 years ago
Forum
Reply
RE: FloatSwap

I’m not sure you can do that directly in MAXScript. So one solution would be create a MAXScript extension with C++ using the SDK. That way you can re…

19 years ago
Forum
Reply
RE: Materials in arrays

You can get the map using its index. Just as you’ve said, using the maps array. An for the maps names, this function returns the name for each map ID…

19 years ago
Forum
Reply
RE: Materials in arrays

That’s happening because you are referencing the material and not copying. To append the copy of a material to an array just do something like this: …

19 years ago
Forum
Reply
RE: Create VRayPhysicalCamera from View?

Hi. Try this: macroScript Camera_CreateVRayPhysicalCameraFromView ButtonText:”Create VRayPhysicalCamera From View” category:”Lights and Cameras” in…

19 years ago
Forum
Reply
RE: Finding bi-normals/tangents

I think that when you make an snapshot or a xform reset, all the mesh vertices are transformed by the node’s current transform matrix and (in the case…

19 years ago
Forum
Reply
RE: Finding bi-normals/tangents

Hi. I forgot that when you clone an object using the mirror tool, the faces and normals must be flipped. So I’ve modified the two versions of the scr…

19 years ago
Forum
Reply
RE: Finding bi-normals/tangents

Oh, by the way. The function showTangentSpace I’ve shown you earlier renders all vectors, even if they don’t face the camera. So I’ve modified this an…

19 years ago
Forum
Reply
RE: Finding bi-normals/tangents

I forgot to multiply the binormal by the sign. So now the code looks like this: fn computeTangentSpace obj = ( local theMesh = snapshotAsMesh obj …

19 years ago
Forum
Reply
RE: Finding bi-normals/tangents

Actually, it is a simple function I’ve done for that. Also, I’ve modified a bit the computeTangentSpace function. Now uses an array of matrices where …

19 years ago
Forum
Reply
RE: Finding bi-normals/tangents

I’ve ported the code I use to calculate the tangent space to MAXScript. fn computeTangentSpace obj &tSpace = ( local theMesh = snapshotAsMesh o…

19 years ago
Forum
Reply
RE: [MaxScript] Length of a spline segment

Yes, you can use the function getSegLengths. It returns an array containing the length (fraction length and absolute length) for each segment of the s…

19 years ago
Forum
Page 7 / 13