-
Posts
2,282 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by SpiderPig
-
-
6 hours ago, Josh said:
z coordinate is the distance in front of the camera
Ah so it needs to be a float then.
-
6 hours ago, Josh said:
Yes, I always forget which is which. Maybe these should be ScreenToWorld and WorldToScreen?
Yeah, in one of my projects I made a wrapper for them. I called them CastToScreen and CastToWorld. Naming them to show what they do will help.
-
Also screen_position should probably be an iVec3 like is returned by window->GetMousePosition(), unless there's a need for it to be Vec3?
-
This may be silly but I'm constantly forgetting which function does what when it comes to the camera functions Project() & UnProject(). It might be helpful if the first argument of both commands were renamed to "Vec3 &screen_position" & "Vec3 &world_position" respectively. That way it be easy to identify what does what!
-
Hmm it crashes with an out of memory range error. My class inherits Object so the function is available and compiles.
void NotificationManager_UpdateHook(shared_ptr<Engine::Object> source, shared_ptr<Engine::Object> object) { } ... void NotificationManager::Init() { AddHook(HOOKID_UPDATE, NotificationManager_UpdateHook, Self()); }
-
Yup. It's not working with Steam.
-
Oh... wait. I don't think my paths are actually pointing to steam. One sec...
-
I'm using the latest steam version on the dev branch and get the error popup "Invalid function syntax fot hook ID 2". This is my code.
void NotificationManager_UpdateHook(shared_ptr<Object> object) { } ... void NotificationManager::Init() { world->AddHook(HOOKID_UPDATE, NotificationManager_UpdateHook, Self()); }
Based on the parameters for AddHook() my function syntax looks correct... and HOOKID_RENDER works.
-
Here's a few videos I've found on how to deal with animated objects in blender. Specifically transforming them to new locations, and scaling an armature with animations. (Like from mixamo)
In this video the only thing that needs to be done different for armatures with animation tracks, is instead of going "Ctrl+A->Apply Transformations". Go "Ctrl+A->All Transforms to Deltas". This will scale the keyframes for the animations as well.
- 2
-
Oh okay.
-
I recall you rotated six terrains to make a cube, then used a vertex callback to position all the vertices at a constant radius from the centre. Or has this changed?
-
Wouldn't this break the idea of making sphereical worlds?
-
I can convert the local matrix to a quaternion. I've been looking over the Leadwerks mdl exporter too, although half the stuff no longer works the same in blender 4.0.
-
There is a local matrix that has the bones position local to its parent. I've since disabled converting the matrices to Y up so I'm left with raw blender data. I think I understand what's going on now.... we'll see.
-
I don't quite understand the exactly what's needed in the bone data. I think that's the only issue I have left.
This is going to be hard to explain, so bare with me.
I understand that both bone position and rotation should be local to their parent.
What I was doing is getting the local bone position like this.
bone_local_pos = bone.global_position - bone.parent.global_postition
However that only works if the quaternions are left as this. I knew from the start this probably wasn't correct.
quat.x = 0.0 quat.y = 0.0 quat.z = 0.0 quat.w = 1.0
I think what I need to is rather than setting the bone position to the "yellow dot" relative to the "red dot." I need to calculate the "blue dot", and then the "quaternion will be the "orange angle".
The "blue dot" will basically be the normal the parent bone is pointing * the length of the child bone.
This is the only way I see Ultra being able to give the correct bone position with bone rotation. Am I on the right track or have I utterly confused you?
-
Standalone... I'm using build 663
-
No it appears to be random. I just clicked this Grass folder and it only generated three of six. It's not animated.
-
I'm seeing a few thumbnails not being rendered. From DDS, GLTF and MAT to MDL.
Here's one of the files (converted from fbxtomdl.exe) that does not have a thumbnail.
-
-
Updated.
- Improved speed when exporting large amounts of vertices.
-
Thanks. Bone positions the same? Local to parent?
-
@Josh I'm giving animation a go and just need to confirm a few things to help me debug;
In LoadBone(), is the bone position;
- Global coords
- Local to skeleton
- Or, Local to the parent bone
Is bone->quaternion;
- The rotation of the bone toward the position of it's child?
- For example, blender only stores the tail and head positions of bones when they are created. No matter the direction the bones are facing when they are created, they have a rotation of 0 on all axis.
E.g. All the bones in this shot have a rotation of 0 an all axis; Do I need to calculate what these rotations would be for Ultra?
You are correct. Animation is hard.
-
Okay, let me know when it's done and I'll get blender to export it.
-
Interesting! I havnt looked at embeded colliders yet. Is the data the same as the external collider? With the json then the binary?
Manging Texture Resolution in Game
in General Discussion
Posted
How do games mange the texture resolution that's used in game? In the options menu you sometimes have the ability to change the texture detail from Low to High. I guess all it's doing is using a different resolution per setting.
For example;
I'm wondering if it's possible for everything to have 4K textures, but maybe on game load / restart you could remove the higher resolution mip-maps via code depending on the setting? Surely they can't have 4 copies of each texture, that'd be an insane hard drive guzzler.