Personal Website Made With Armory

Thank you very much @QuantumCoderQC for the added explanations about the tween rotation! I now understood it completely!
If not earlier I’ll try it first thing on Saturday! :slight_smile:

1 Like

Hello friends!
@QuantumCoderQC I’ve implemented your tween rotation advice and it now tweens stably.

https://rogper.github.io/

  • I had to make some duplication to have motion and rotation separated because the motion has to be in “Down” mode and rotation in “Started” mode for the 3 different inputs.
  • I had to include a “Get Object Location” node to define the original position on the tween rotation nodes

Bugs/unwanted things, caused by this:

  • Keyboard movement doesn’t understand diagonals (2 buttons pressed simultaneously) so just keeps the last one… which is acceptable I think;
  • Mouse and Touch work great when you press and release each time you want to go a new direction… :thinking: unfortunately if you keep the mouse/touch pressed while dragging the mouse to other rotations it has no way to know that it should turn to the respective side, so it just keeps the last position.

Is there a way to force the user to press once to go to each direction and as soon the mouse leaves the zone hot spot the charactor stops until it’s pressed again a new direction?

1 Like

I’m such an idiot :sweat_smile:
I have animated my walk cycle and I’m don’t make any idea how to play it on the armature :thinking:
I’ve made many attempts with the most promising node “Play Action From” but it just froze all the motion. I’ve tested it in several locations even directly connected to the keyboard output.

(still WIP, I’ll improve it later, it’s just to test the logic)

Ok, so questions:

  • Do I need to make a logic node tree for the armature too!?
  • Can’t I just do some node magic like: If motion is true then play the “rogper-Walk” Action on the armature “rogper”?

Awesome! Looks much better now.

Did you mean “Get Object Rotation Node”? I forgot to mention that in my previous post…

This becomes a bit complicated, since now you have to rotate the player 45 deg instead of 90. And look for all possible button combinations.

If such diagonal rotations are needed, I would suggest to go with @ knowledgenude’s method, since this give a more FPS like movement with easier diagonal movements

For this, you could use something like a state change detection. So what you can do (on mouse down) is to compare the names of the object on the frame before, and the current frame.

This is how the logic goes:

  1. On init → Set the value of a string variable to something like “blank”
  2. On mouse down → get the name of the object under the cursor and check if it is the same as that of the value in the string
    3a. If yes, do nothing. (this means the cursor did not move to a different “direction”)
    3b. If no, rotate the player and set the value of the string with the name of the new object. (this means the cursor moved to a different “direction”)

You may use “set variable” and “get variable” nodes to set the name of the object in he string variable.

1 Like

To animate the character, you need to have at least 2 animations to its armature. An idle animation (could be just a 2 key-frame animation) and a walk animation.

You have to play the walk animation when any of the four W, S, A and D keys are pressed and with Started and not Down. The Play animation from node must be called only once to start the animation. If it is used every frame, it restarts the animation every frame, hence the “freezing”

Once walk animation is started, you need to stop the character when keys are released. For this, you can play the “idle” animation when all of the 4 keys are released state. Then the character stops walking.

1 Like

Thank you very much @QuantumCoderQC, you’re awesome!
Yes, indeed I meant “Get Object Rotation” sorry for the mistake! :slight_smile:

If not sooner, next Saturday I’ll try to implement all your feedback!

I’ve tried to activate the animation, but I had no success yet… so I just added a tree and a Dynamic bench :laughing:


https://rogper.github.io

If not sooner, see you next Saturday! :slight_smile:

2 Likes

Hmm, I’m not sure what could be wrong. A few things to consider…

  1. Ensure that the animation is “pushed down” in the NLA editor. Also that the animation is not active in the dope-sheet when playing the game.

  2. Are there any errors in the Blender system console when you try to play the animation?

  3. Play the animation with “on init” node instead of keyboard nodes for a test. The “object” in the “play animation from node” should be the “armature” of the character.

1 Like

Hey @QuantumCoderQC, thanks for the follow-through!
I’ll try all your recommendations on Saturday!
I can reply to your points immediately :slight_smile: and I just discovered the origin of the problem thanks to you, it’s the number 1!

1 -> Ho! I didn’t knew that :astonished:! I don’t have the actions pushed down on NLA and I do have the stop/Idle animation active on the dope-sheet, so that the characters don’t play on T-Pose.

2 -> No, no errors at all!

3 -> Thanks! Will do just that!

Well :smiley: it walks! :smiley:
https://rogper.github.io

Thanks to @QuantumCoderQC tips :slight_smile:

  • Indeed the actions need to be on the NLA editor;
  • I’ve kept the “rogper-Stop” (the future Idle animation) action loaded on the Action Editor, because removing it gives compiling errors.

It’s still using last week tween rotation way …but I’ll have to switch for @knowledgenude, on Saturday, because this one is very easy to break :confused: in the several ways mentioned above and keeps appearing more.

@knowledgenude way is the way to go :slight_smile:

Other things to do:

  • walk animation needs to be improved, now his shoulders have a live by their own :laughing:
  • Idle animation needs to be created.

Best regards! :slight_smile:

2 Likes

If you long press the mouse and move it around the screen, the character moves in that direction but doesn’t look/face that direction.

Hey @Willbot_studio! Thanks for the bug report! :slight_smile:

Yeah, it’s a known issue and the same also happens with the keyboard, if you go Right and without release press Front once it keeps going sideways but turned to front :confused:

On Saturday I’ll replace the entire movement with a better approach!

Hello friends!
https://rogper.github.io/
I’ve attempted the @knowledgenude way, mentioned here, which does play a lot nicer! :smiley:
But I could only make it work for the keyboard inputs:

Bugs:

  • I’ve attempted to connect the mouse inputs to the same “motion” nodes but it just makes the character move forward when I click in any direction.
  • There are still some animation frozen moments when we suddenly change directions :thinking: Works great when we press and release the button before moving to the new direction, but if we keep the buttons pressed it just frozes the animation.
1 Like

The is some sliding effect with the walk animation and it made me think of the new nodes you were working on @QuantumCoderQC It made me wonder if they will be available in an upcoming release and are they functional yet?

Hello friends!
I got back to this project after a bunch of time and in the most recent armory I faced something rather strange :slight_smile:
This was what I had:


And now this is what I got:

:laughing:
I’ve attempted things like changing the render paths and the render presets and only gets darker.
I guess that it’s better to start again from zero, right!? :face_with_monocle:
In a new empty project (the default cube scene) all is good and all the shading looks perfect.

Hi, there seem to be some errors printed on the debug console there. Could you please share those error messages here?

You could either run the project on Krom with the Blender debug console open (as shown here), so you get the error messages.

Or run it on a browser with debug console open (usually ctrl+shify+i in browsers like Chrome). Just copy the message and put it out here, so we see what’s wrong.

Thanks @QuantumCoderQC
This is what the console reports when I lunch the game through Krom:

Read prefs: /home/rogper/.config/blender/2.93/config/userpref.blend
Running Armory SDK from /home/rogper/armsdk/
Proxy objects synchronized
Read blend: /home/rogper/Desktop/rogperIO/rogperIO.blend
Armory v2022.8 ($Id: 64befe1a38bc79094f87f9f2b788677fc1e1a1d6 $)
Blender: 2.93.7, Target: krom, GAPI: opengl
Exporting Scene
Exporting mesh Cube.004
Exporting mesh Cube.006
Exporting mesh Cube.008
Exporting mesh Cube.010
Exporting mesh Plane
Exporting mesh rogperMovement
Exporting mesh rogper-Geo
Exporting mesh Circle
Exporting mesh Tree
Exporting mesh Bench
Exporting mesh Circle.002
Exporting mesh rutperMovement
Exporting mesh rutper-Geo
Exporting mesh arturMovement
Exporting mesh Artur-Geo
Exporting mesh Ballon
Exporting mesh Tex
Exporting mesh sc_Down
Exporting mesh sc_Left
Exporting mesh sc_Right
Exporting mesh sc_Up
Scene exported in 0.269s
Exported modules: audio, physics, ui
Shader flags: _Deferred _ShadowMap _CSM _Sun _SMAA _SSAO _SSS
Compositor flags: _CToneFilmic
Khafile flags: arm_deferred arm_csm rp_hdr rp_renderer=Deferred rp_shadowmap rp_shadowmap_cascade=1024 rp_shadowmap_cube=1024 rp_background=World rp_render_to_texture rp_compositornodes rp_antialiasing=SMAA rp_supersampling=1 rp_ssgi=SSAO rp_sss
Using project from /home/rogper/Desktop/rogperIO
Running:  /home/rogper/armsdk/nodejs/node-linux64 /home/rogper/armsdk/Kha/make krom --ffmpeg /usr/bin/ffmpeg -g opengl --shaderversion 330 --parallelAssetConversion 4 --to build_rogperIO/debug
Using Kha (fatal: n, fatal: not a git repository: /home/rogper/armsdk/Kha/../.git/modules/Kha) from /home/rogper/armsdk/Kha
Creating Kha project.
Exporting asset 1 of 1 (ammo.wasm.js).
Exporting asset 1 of 1 (ammo.wasm.wasm).
Exporting asset 1 of 16 (Scene.arm).
Exporting asset 2 of 16 (rogperWorld_irradiance.arm).
Exporting asset 3 of 16 (rogperWorld_radiance.hdr).
Exporting asset 4 of 16 (rogperWorld_radiance_0.hdr).
Exporting asset 5 of 16 (rogperWorld_radiance_1.hdr).
Exporting asset 6 of 16 (rogperWorld_radiance_2.hdr).
Exporting asset 7 of 16 (rogperWorld_radiance_3.hdr).
Exporting asset 8 of 16 (rogperWorld_radiance_4.hdr).
Exporting asset 9 of 16 (rogperWorld_radiance_5.hdr).
Exporting asset 10 of 16 (rogperWorld_radiance_6.hdr).
Exporting asset 11 of 16 (rogperWorld_radiance_7.hdr).
Exporting asset 12 of 16 (rogperWorld_radiance_8.hdr).
Exporting asset 13 of 16 (action_Cat_Artur-Stop.arm).
Exporting asset 14 of 16 (action_rogper_rogper-Stop.arm).
Exporting asset 15 of 16 (action_rutper_rutper-Stop.arm).
Exporting asset 16 of 16 (RogperColors.png).
Exporting asset 1 of 2 (World_World_data.arm).
Exporting asset 2 of 2 (shader_datas.arm).
Exporting asset 1 of 1 (brdf.png).
Exporting asset 1 of 1 (smaa_area.png).
Exporting asset 1 of 1 (smaa_search.png).
Exporting asset 1 of 1 (rogperWorld.hdr).
Exporting asset 1 of 1 (font_default.ttf).
Compiling shader 1 of 26 (World_World.frag.glsl).
Compiling shader 2 of 26 (World_World.vert.glsl).
Compiling shader 3 of 26 (armdefault_mesh.frag.glsl).
Compiling shader 4 of 26 (armdefault_mesh.vert.glsl).
Compiling shader 5 of 26 (armdefault_shadowmap.frag.glsl).
Compiling shader 6 of 26 (armdefault_shadowmap.vert.glsl).
Compiling shader 7 of 26 (blur_edge_pass.frag.glsl).
Compiling shader 8 of 26 (colors_armskin_mesh.frag.glsl).
Compiling shader 9 of 26 (colors_armskin_mesh.vert.glsl).
Compiling shader 10 of 26 (colors_armskin_shadowmap.vert.glsl).
Compiling shader 11 of 26 (colors_mesh.frag.glsl).
Compiling shader 12 of 26 (colors_mesh.vert.glsl).
Compiling shader 13 of 26 (compositor_pass.frag.glsl).
Compiling shader 14 of 26 (compositor_pass.vert.glsl).
Compiling shader 15 of 26 (deferred_light.frag.glsl).
Compiling shader 16 of 26 (pass.vert.glsl).
Compiling shader 17 of 26 (pass_copy.frag.glsl).
Compiling shader 18 of 26 (pass_viewray.vert.glsl).
Compiling shader 19 of 26 (smaa_blend_weight.frag.glsl).
Compiling shader 20 of 26 (smaa_blend_weight.vert.glsl).
Compiling shader 21 of 26 (smaa_edge_detect.frag.glsl).
Compiling shader 22 of 26 (smaa_edge_detect.vert.glsl).
Compiling shader 23 of 26 (smaa_neighborhood_blend.frag.glsl).
Compiling shader 24 of 26 (smaa_neighborhood_blend.vert.glsl).
Compiling shader 25 of 26 (ssao_pass.frag.glsl).
Compiling shader 26 of 26 (sss_pass.frag.glsl).
Compiling shader 1 of 3 (line.frag.glsl).
Compiling shader 2 of 3 (line.vert.glsl).
Compiling shader 3 of 3 (line_deferred.frag.glsl).
Compiling shader 1 of 8 (painter-colored.frag.glsl).
Compiling shader 2 of 8 (painter-colored.vert.glsl).
Compiling shader 3 of 8 (painter-image.frag.glsl).
Compiling shader 4 of 8 (painter-image.vert.glsl).
Compiling shader 5 of 8 (painter-text.frag.glsl).
Compiling shader 6 of 8 (painter-text.vert.glsl).
Compiling shader 7 of 8 (painter-video.frag.glsl).
Compiling shader 8 of 8 (painter-video.vert.glsl).
Done.
Finished in 2.329s
Running:  /home/rogper/armsdk/Krom/Krom /home/rogper/Desktop/rogperIO/build_rogperIO/debug/krom /home/rogper/Desktop/rogperIO/build_rogperIO/debug/krom-resources
Using OpenGL version 4.6 (forward-compatible).
Uniform lightPlane not found.

The error messages in your screenshot from yesterday seem to be WebGL errors, so you can’t see them in the Blender console. Instead, you need to open the browser’s development console like QC already wrote. Can you also share those errors please? :slight_smile:

However, the Uniform lightPlane not found message also looks interesting, do you remember whether the same message already occured a while ago?

2 Likes

Thanks for the heads up @timodriaan!
I’ll try to get that report from the browser a.s.a.p.

Regarding the Uniform LightPlane not found… I don’t think that it existed before no… :face_with_monocle:


Hey again friends!
Well, it says that it has too many WebGL errors so it won’t even bother with that :laughing: Here’s the proof that software has gotten smarter than humans! :joy:

Audio.hx:22 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. Règle de lecture automatique dans Chrome  |  Blog  |  Chrome for Developers
kha_audio2_Audio.initContext @ Audio.hx:22
Audio.hx:43 [Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (إدخال قائمة تشغيل صوتي  |  Blog  |  Chrome for Developers)
kha_audio2_Audio._init @ Audio.hx:43
:8040/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (File not found)
256[.WebGL-0x153400ad7100] GL_INVALID_OPERATION: Feedback loop formed between Framebuffer and active Texture.
localhost/:1 WebGL: too many errors, no more errors will be reported to the console for this context.
1000Log.hx:66 kha/js/graphics4/Graphics.hx:144: WebGL error: Invalid operation
6634Log.hx:66 kha/js/graphics4/Graphics.hx:144: WebGL error: Invalid operation

… I’ll just start this all again… I don’t have that many graphics, so it’s for sure the fastest route :slight_smile:

1 Like