论坛

由用户创建的信息 Angr4m
17 July 2017 11:20
Ah, yes, that bug is caused by the 'view' function I am impementing. When the ray hit an object with no physics it logs as an error report. Today I'm going to commit the new version that has that semi-corrected. Now it doesn´t log the error. Now the ray controls if the object has physics and if it doesn't doesn't take it into account.

I will warn you when it is updated.
17 July 2017 00:38
Hahaha, well it still doesn't do anything special. Just jumping around. You can change the camera with 'V' but you will see the character just have a silly animation. I just learned how to bake the animation and went to do other things. Now I have just figured out how to use the ray_cast to 'see' the objects and I will try to learn how to eat. I have already some fruits to spare around and it is going to be fun. I t is going to be a survival game but it has a lot of work to do yet…. Surely you're the first one to walk that island aside of me. I am going to update it often so if you want to keep jumping around you will be able to do it. I will make a post soon so if you want to play you can. It is a little joke but I hope it will grow.
What does surprise me is that it worked in your system, I don't know if I will have to wait for an update.
Thanks again for the feedback.
16 July 2017 13:59
Hi Will, thank you for the response.

Well, I downloaded the file the 5th of July, the version in the version file inside the rar says just 17_06, is there other version? I'll try to download again.

Well, regarding the check modules thing, I can't see the post from that link, I don't know why but, I think I know what you mean, checking the modules from the project manager to update the files imports. Yeah, I tried that but it didn't work.

I've been working a little more since I wrote the post and I've seen the method that I use to bind the camera which is append_copy_trans from the constraints module I think it has been changed and the parameters are not the same like before.

I'm going to download the new file and see if it is really another version. I'm going to install it side by side with the old one and try to make it work. I would like to keep updating blend4web to get the new functionalities, it is a pity not to. But I think for this project the previous version were still working well I think it has everything I need for the project.

If you want to take a look at the project it is at GitHub but it is still the version that works in 17.04.

Thank you for the interest.

P.D.: Yesterday I've been seeing the video you have in the blend4web page, the one with the 3d glasses. Nice video. Maybe in a few years we all will see virtual reality as the normal way to browse, it is interesting.
Some time ago, I've been thinking of make a windows explorer with blend4web, you know, seeing the folders like rooms or some like that, I think it would be nice to walk inside the hard drive, something like Tron… With available teletransport of course…
15 July 2017 23:48
Hi there:

I have updated to the new version 17.06 and I am having quite a few problems with my existing projects. Maybe you can help me with some of it. I think I must not be the only one who have noticed it.

I was using a system for the cameras in a first person/third person shooter game I've been working on that involved moving the camera to the various positions using empties. And it stopped working with the new update. I have read the release notes and I've seen something has changed in the camera module, and in the constraints module too.

The problem is I was using append_copy_trans function of the constraints module to append the camera to the empties which in turn are parented to the physic body of the character using append_stiff constraints. It worked like charm in the 17.04 sdk but in the 17.06 sdk it doesn't.

All my intents to make it work in 17.06 were unsuccessful, I have tried with different constraints and without parenting to the empties but all I got was using an append_stiff_cam constraint, which is deprecated to append the camera to the character but it was working very badly, turning as it would have a lot of sensitivity, in turn with the recommended append_stiff function the frame rate would fall to only 7 frames per second I don't know why.

Then I got back to the 16.04 version but I was surprised with a strange behaviour in Firefox, which I've been using for time without a problem and I've seen the workers were getting disabled in the console as the app were being loaded. I don't know if this behaviour is caused by an update of Firefox or what. Previously it worked fine and the physics were logged as using their own thread, I remember.

So, Firefox were not allowing me even debugging which makes impossible to go on with the programming and I have had to change to Chrome. In chrome everything got back to normal, the physics thread working and the camera working right. Just fun again, thankfully.

Does anybody knows anything about this behaviours? I am surprised, mostly but the strange behaviour with the physics in Firefox. It was working with 17.04 until I updated Blend4Web and then when I redownloaded the 17.04 version it doesn't work anymore.

Hope someone can make a tutorial about the right way to use the cameras now as it seems to have changed quite a lot, until then it seems I'll stay with 17.04.
10 June 2017 20:52
Well, at last we can enjoy Petigor Goes To The Caribbean…


Just joking, It is a beggining I am gonna change the character tomorrow but for now…

If you want to see it live, without diffuse as I had some problem with the material…
Petigor goes to the beach
10 June 2017 19:52
Right, at last I have found the problem, it was the way I was spawning the character. I had to import the whole Petigor model and animations into my island. Changed the init of the app to load the Petigor model and rig but animations didn't work at first, same problem, so I went to check the javascript, changed this:
var spawn_character = function(spawner_name) {
	var spawner = m_scs.get_object_by_name(spawner_name);
	var pos = m_trans.get_translation(spawner);
	m_trans.get_rotation(spawner, _quat);
	console.log("Spawner rotation: " + _quat);
	m_phy.set_transform(_char_wrapper.phys_body, [pos[0], pos[1], pos[2]], _quat);
}

And simply let the character at coordinates center. And animation started working. It is just:
exports.init_character = function() {
	_char_wrapper = {
		/**char_phys_body: m_scs.get_object_by_dupli_name("GroupCharacterJim", "Character"),
		char_model: m_scs.get_object_by_dupli_name("GroupCharacterJim", "CharModel"),*/
		char_offset: [0.0, -3.0, -0.85], //[0.0, 0.0, 0.0]
		phys_body: m_scs.get_first_character(),
        rig:    m_scs.get_object_by_dupli_name('petigor', 'petigor_armature'),
        model:   m_scs.get_object_by_dupli_name('petigor', 'petigor_model'),
	}
	// I was adding the model to the physics body here, maybe it was here where it was failing
	// m_cons.append_stiff(_char_wrapper.body, _char_wrapper.phys_body, _char_wrapper.char_offset);	
	m_fps.enable_fps_controls(_char_wrapper.phys_body, null, move_cb);
       // This is when I was calling the spawn.
	// spawn_character("EmptySpawner1");
	m_anim.apply(_char_wrapper.rig, 'petigor_run');
    m_anim.set_behavior(_char_wrapper.rig, m_anim.AB_CYCLIC);
    m_anim.play(_char_wrapper.rig);
}


Well, even now I am not sure what was what messed up the thing. Maybe it was the offset that I was applying in the spawner method (using the physics library) or the way I was attaching the model to the physics body with the stiff constraint. The problem was I wanted to see the model from behind to see the animation. I was thinking of doing it first person view but just wanted to see the animations as I was animating, sooooo dumb!!!! Well at least I have learn a bit about the animation system internals, now I know where all the animation things are….

I am just going to learn how you spawn the golems in Petigor's Tale and stay with your way of doing it. Hope it help some people too.

Un saludo
09 June 2017 14:40
Hello again:

As I said, I have strip down the project to make it more manageable, now it has just a simple scene where I import the character with the animation.

Two things to say, I know the armature rig is minimal as I started a new armature when the one I had rigged started to mess up in the exported json/bin. Basically, the rig is the armature with just one arm rigged and one simple animation, moving left hand. If you open it in the fast preview it works ok, the scene doesn't have a light I remember, but you can see the animation working alright. If you open dev:project_ow.html is when the problem appears.

Aside, I have been studying the armature of the Petigor character and realized the original animations are kept in place with a fake user, today I am going to do some test to see if that is the problem as I just have the baked animation in the file.
08 June 2017 18:58
Hi,
If you want it the source is hosted in GitHub: https://github.com/MarcosCalvi/ProjectOW . I don't know if you would like to branch it. Anyway, I am going to do a smaller version and upload it here, I am willing to get a hint of what is happening. I am very happy with the rest of it, it has a pretty nice environment, an island with palmtrees and a nice sea, some vegetation et al. I like the wind and the way you can control the time of day, very good. I hope I can find the solution to the animation problem so I don't get stucked.

I'll post the simplified example soon
Cheers
08 June 2017 17:59
Hello again:

Well, I have created a new blender file and import the character without changing more than the lamp and camera types to work with the fps library (eye type for the camera). Imported the character from the other blender file and chage the javascript to load the new .json file. Everything loads ok but the result is the same, the character is completely messed up with the default animation activated. It is just a movement in one hand that is rigged with a inverse kinematics bone modifier. I don't know what can it be… The baking seems to be ok if I open the character file in the Scene Viewer so it is strange that it doesn't work with the exported .json. I don't know what to do now… Maybe I import the Petigor model and try to use the armature inside my app and start from there. It can be pretty tricky.

If someone can have a hint I'll be greatful.
07 June 2017 11:36
Hi, thank you for the answers.

Today, I think I'm going to try starting a new main file and importing the character to see if it works in a new from scratch project. I think it must be something in the main file I have changed because in the fast preview the animation plays ok.

I will tell you the results.