-
Posts
293 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Shard
-
-
Hi Shard,
As I understand.. Daz has a new Eula which allows purchasing of a licence for Poser Characters for game use. They have developed a kit which reduces poly count and changes the quad polys to tris and makes multiple maps into a single one. It also includes an .FBX exporter. Havn't tried it but have seen videos of Poser Characters animated in Unity. Look ok too at around 5000 to 10000 ks. The only issue I can see is that Leadwerks doesn't support Morphs (Please change this Josh).
Whats a morph?
-
For our reloading animation, I need it to reload once per call, which means that it needs to play from its start frame of 0 to its end frame of 100 and then stop until the reload animation is called again.
So far, I haven't managed to figure out how to properly do the reload animation so that it starts and stops at the correct times.
The code I have below usually stops the animation at the right time, but sometimes it does it three or four times over before it stops. The animation also generally starts in the middle, around 30 or 40 and sometimes near the end like 95.
//Animation Code - Reloading Case
case reload: aniStart = weapon->reloadStart; aniEnd = weapon->reloadEnd; //DOF frameWork->GetRenderer().SetFarDOFRange(Vec2(0,50)); frameWork->GetRenderer().SetFarDOFStrength(200); frameWork->GetRenderer().SetFarDOF( true ); frame=AppTime()/30.0; frame=fmodf(frame,aniEnd-aniStart)+aniStart; if(frame <= aniEnd-1) { (bodyMesh,frame,1.0,0,true); } else wepState = idleUp; break; }
-
I'm looking into purchasing a 3D Character generation software (with animation) and I'm wondering how well LE supports these softwares.
Of course these softwares can output into multiple formats that can then be converted into gmf's but I know that our team has had problems with the way a model is skinned, etc.
Also, I tried to export an obj into a gmf, but the program disappeared (the process was still running but it just took up massive amounts of CPU time and did nothing, I had to end the process)
If someone could explain this quickly, as Smith Micro is having a deal on Poser till the 31st of this month (half price, $250 instead of $500) I would be rather grateful.
Edit: Has anyone had experience with such software? Would you recommend one over the others?
-
Unless you post a program that demonstrates the problem, we're all just speculating about what the problem might be.
We'll work on this.
Done.
Please note that I didn't include the solution files because I'm using VS2010 and I was unsure if you were using 2010. I have however included the the Main.cpp
Also, please note that the movement and camera controls are inverted. This is due to a bug in our art and no related to the disappearing model problem.
(Upload to LE failed twice): http://www.3rdinitiative.com/system/content/LE_Bug.zip
-
Did you notice that? Do you think that's the problem too?
This is a good possibility, but how did you fix it?
1. Maybe your model is not centered in your modeling app. I've seen this behavior before when I used models that are not centered, the engine/camera sometimes thinks the model is out of view when it's not.
2. If not, you could try a workaround of creating a transparent bounding box. (not a very elegant solution though)
-- Edit:
Your model is probably animated by the looks of it. It could also be the engine is just taking 1 frame of this animation into account, if in this frame the arms are down for instance, they might not show because the model is not in view during that single frame.
1. Possibility, I'll look into it.
2. How?
3. No, everything is visible in all the frames. It only disappears when its up too close.
-
int Global 0 = local space , 1 = global space
http://www.leadwerks.com/wiki/index.php?title=Entities#PositionEntity
Well I figured as much
As Andy says, so local is measured relative to the objects origin (0,0,0) where as global is measured releative to the scene's origin (0,0,0)
What about when parenting? And rotating? And moving? How does that work?
-
Could someone please explain global flags and what they are meant to do? The wiki says nothing about them.
Ex.
Get/Set Rotation
Get/Set Position
-
have you tried adjusting the camera near clip plane setting ?
Yes I set it to near zero (0.0000001) with no effect). Also note, its all rigid objects that disappear, if that has any relevance.
-
So I have a (large) problem with Leadwerks 2.31 and 2.32.
We have a player model, with arms and a gun and armor.
Unfortunately when I parent the camera to head and play the game, the gun doesn't show up.
So I did several tests to see if the gun would show up and it seems to show up if the camera is further away, but in some screenshots it doesn't show it when looking at specific places (generally at the horizon). The same goes for the armor, which seems to disappear and appear as I look around.
This issue came up with the update to Leadwerks 2.31 but at the time, I thought I was doing something wrong in code. After having gone back and tested all posibilities (with 2.3, 2.31 and 2.32) I firmly believe that its an issue with 2.32.
Has anyone had this issue? How have you solved it? How do I solve it?
Help?
//Init Code
EntityParent(bodyMesh,frameWork->GetMain().GetCamera()); RotateEntity(this->bodyMesh, Vec3(0,180,0)); TVec3 pos = EntityPosition(body); pos.X -= .125; pos.Y -= 2.125; pos.Z += .5; PositionEntity(bodyMesh,pos);
//Update Code
//Rotate camera camRotation.X = Clamp(camRotation.X + controller->GetViewY()/10, -90,60); camRotation.Y = camRotation.Y - controller->GetViewX()/10; RotateEntity(frameWork->GetMain().GetCamera(),camRotation); //Reset Mouse Position MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); float move = controller->Move(); float runSpeed = controller->Run(); //if(move > 0 && player->state != reload) move *= controller->Run(); //Update Player UpdateController(player->body,camRotation.Y,move*10,(controller->Strafe())*10, controller->Jump()*player->jumpHeight, 10000, 20); //Position the camera playerPos = EntityPosition(player->body); cameraPos = EntityPosition(frameWork->GetMain().GetCamera()); cameraPos = Vec3(playerPos.X,cameraPos.Y,playerPos.Z); cameraPos.Y = Curve(playerPos.Y+1.75,cameraPos.Y,2.0); PositionEntity(frameWork->GetMain().GetCamera(),cameraPos);
-
That's exactly the same as writing
if(0 >= AppSpeed()*60) {
And that's almost always going to be false. It will only be true when AppSpeed() returns 0 (since 0 * 60 = 0).
Thats kinda the point. You want this piece of code to only run once a second, there for running as the same time as all the other copies of the game on other computers. The engine is created so that the AppTime is done at a specific speed across all computers, which is one second per second.
My code will increment until reaches the one second mark which will be a result of AppSpeed * 60. Again if your monitor refresh rate is that high, the AppSpeed value is higher until it matches one second.
-
Or conversely maybe Josh could fix it and update the 2.32 download ... hows that for a radical thought
After all this has been pointed out many times before!
Failing that, if the functionality is simply un-useable due to the physics issue it would be better removed. People will continue to try to use it so long as it’s present.
As stated before, I don't need scaling of physics, just the mesh itself which I will parse in code, so that method works. For now.
-
So... how about a reply?
-
I think when you want to render picture to picture, you render the scene to a buffer and paste this on a 2 surface created by hand.
As for the extra window: I think this might be a problem with the EULA. Since you are not 'entirely' allowed to mkae your own editor/program with it. I have read something about that.
Are you sure about that? Pixel has created an AStar tool with Leadwerks.
-
Flip(1);
Flip simply flips the back buffer to the front buffer, effectively drawing all of the frame's updates to the window/screen. It must be included in the program loop every frame.Flip(0) - Won't use VSync so the framerate won't be limited by the monitor refresh rate. Make sure you use AppSpeed in all of your time dependent values such as movement, and you should use UpdateWorld(AppSpeed()) as well.
Flip(1) - Uses VSync to make sure the buffer is flipped at the same frequency as your monitor's refresh rate.
Flip(-1) - Uncaps the buffer update rate.
According to the wiki, Flip(1) just makes it refresh at the rate of the computer screen. What happens when someones monitor refreshes faster than others? And god forbid someone is playing on a 3D capable monitor at 120Hz
I would personally suggest doing something like this:
int value = 0; if(value >= AppSpeed()*60) { //Do Stuff value = 0; } else value++;
AppSpeed checks the refresh rate and returns a normalized value. So if the refresh rate is 120, it will return 0.5 if its 30 it will return 2. When multiplied by a multiple of 60 (one second) you get that many seconds. So if you want a refresh rate of every 2 seconds, do AppSpeed()*120;
-
This would be really nice to know for Leadwerks based tool creation.
Also, how does picture in picture work with multiple cameras rendering to the same screen?
-
What did google say about theora c++ library downloads then? I didn't check, but I would assume you need need to download theora to use theora, since it's not part of microsoft sdk.
Well I was told to download Theora and I did. I placed it in the Leadwerks SDK Folder and included them. Now I get this warning:
warning C4251: 'TheoraVideoClip::mName' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'TheoraVideoClip' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char>, 1> _Ax=std::allocator<char> 1> ]
Also, in LETheora.cpp, it can't locate
#include "lua.h" #include "lualib.h" #include "lauxlib.h"
Also, how am I supposed to link things non statically anyways?
Could someone just explain the process of linking the library?
-
I haven't tried but it may be you have not installed the Platform SDK which I think contains "GL/gl.h" ?
That includes fine. Its the #include "TheoraVideoManager.h" and #include "TheoraVideoFrame.h" that don't work because they don't exist.
-
Seems like I was mixing variable types: TFramework and Framework
Framework works but TFramework doesn't but the wiki makes references to it. :angry:
What is the difference between the two?
-
Ok so now my code has broken.
I had several pointers all over my code to Framewerk so that all the different classes could access it.
I changed all my Framewerk variables to Framework variables and I get several errors.
Compile Error
>d:\source code control\appiled project\current version\zero hour\zero hour\hud.cpp(66): error C2228: left of '.SetFarDOFStrength' must have class/struct/union 1>d:\source code control\appiled project\current version\zero hour\zero hour\hud.cpp(68): error C2227: left of '->GetRenderer' must point to class/struct/union/generic type 1> type is 'TFramework *'
VS2010 Underlining Error Message
Error: expression must have pointer to class type
My usage is as below
Main.cpp
Framework *frameWork = new Framework; frameWork->Create(); frameWork->SetStats(2);
Hud.h
TFramework *frameWerk; //this is set to point to the frameWork variable initialized in main
Hud.cpp
frameWork->GetRenderer().SetNearDOFStrength(.7);
With our project being this close to the due date, I might just have to revert to 2.31 which is a shame since I was expecting to do so much out of 2.23.
-
So when were we given notice that framewerk was going to be dropped?
We weren't. We were informed ex post facto. In the 2.23 release thread and the update log file.
However, it seems that it hasn't been dropped but rather integrated into the core engine itself.
-
So got a new question: how do I use it?
I looked at this post: http://leadwerks.com/werkspace/index.php?/topic/741-video-playing-example/page__view__findpost__p__6579 to see if I could use it as an example but Visual Studio says that it can't find the .h files. And rightly so, they aren't in the download.
So how do I include the stuff so that I can actually use em?
-
So what happened to Framewerk? I had several Framewerk pointers all over my code because several different classes needed access to it but its now gone. I think I read somewhere that it has been integrated with the engine. How do I access it now?
Edit: The log says that Framewerk has been integrated with the engine but not how to access it.
-
Cannot you do the inverse? That is: add a Level variable and an Activate method in the Trigger class and then if you can call an ActivateTriggerCallback method on Level variable passing "this" from Trigger.Activate()
Or also you could create a struct with Trigger and Level to pass to SetEntityUserData instead of trigger only.
Thanks for your suggestions. I took your idea and added a static Level pointer to the Trigger class. That solved all my problems.
On a lesser note, where did you get the images in your signature?
-
Since scaling is not support by the physics system, collision won't work properly if you scale an object.
I am adding a new geometry type based on the CSG brushes used in 3D World Studio, and it will be better for triggers and zones.
I don't need physics. I just need the model position, rotation and size (after scaling) so that I can parse those in my code and then create a physics body in code. Is there some way I can do this now? The project is due in two weeks >,>
[Reclosed] EntityCallbacks BROKEN
in Programming
Posted
For our trigger system I have created a fairly straight forward method.
A trigger object hold all the values that we need, like speech, music, scripts, etc.
I set the collision callback and when I collide it goes off successfully and correctly.
However the player is still colliding with it, causing it to go off again. And again. And again.
So I figured that I would free the collision body so that collision callback wouldn't occur.
This leads to a new problem: the collision callback still occurs but all GetEntityUserData returns garbage and the trigger still tries to activate with garbage data resulting in an error.
How do I stop collision callback once I'm done with it?
//Trigger
//Init
//Collision Callback
//Level::ActivateTrigger
Also, this thread should probably be moved to the C++ forums. >,>