User posts Blend4Life
15 May 2017 22:13
14 May 2017 08:25
How to play two actions of one armature simultaneously?
Let's say I have a human armature object with a mouth moving action ("talking") and an eye moving action ("blinking"). Would it be possible to put the talking in slot 0 and play it constantly with AB_CYCLIC and the blinking of the eyes in slot 1 and play that action only occasionally (randomly) while the talking animation is running?
I tried this but could only get B4W to play one action at a time, not both at the same time. But maybe I'm doing it wrong? I used m_anim.apply to apply the actions to the slots and m_anim.play to play.
Let's say I have a human armature object with a mouth moving action ("talking") and an eye moving action ("blinking"). Would it be possible to put the talking in slot 0 and play it constantly with AB_CYCLIC and the blinking of the eyes in slot 1 and play that action only occasionally (randomly) while the talking animation is running?
I tried this but could only get B4W to play one action at a time, not both at the same time. But maybe I'm doing it wrong? I used m_anim.apply to apply the actions to the slots and m_anim.play to play.
25 April 2017 08:29
I'd like to play different segments from ONE soundfile in ONE speaker object with sfx.play(), let's say a passage from starting time A to endtime B, another passage from C to D, another from E to F etc.
My problem is that B4W's play function seems to always play soundfiles from the beginning, even if you define a loop from loopStart to loopEnd, it plays the file from the beginning up to loopEnd and ONLY THEN enters the defined loopStart-loopEnd cycle, so I cannot even get it to play the intended segment on the first run.
Is there a way to achieve this with coding or otherwise?
Also, there seems to be no option to define/limit the number of loop cycles. In most programs, you can set a loop parameter to 0 (infinite loop), 1 (play once), 2 (play twice) etc.
My problem is that B4W's play function seems to always play soundfiles from the beginning, even if you define a loop from loopStart to loopEnd, it plays the file from the beginning up to loopEnd and ONLY THEN enters the defined loopStart-loopEnd cycle, so I cannot even get it to play the intended segment on the first run.
Is there a way to achieve this with coding or otherwise?
Also, there seems to be no option to define/limit the number of loop cycles. In most programs, you can set a loop parameter to 0 (infinite loop), 1 (play once), 2 (play twice) etc.
11 April 2017 18:40
11 April 2017 18:36
11 April 2017 18:28
08 April 2017 08:59
Sorry, but may I bother you with another question regarding outlining and "pick_center"?
I only want the outline to show if the object is visible to the camera, NOT when the line of sight is obscured by meshes of other objects, for obvious reasons - for example, I don't want objects in a room to show their outline through walls/floors/ceilings when I'm in another room.
Since "pick_center" reacts to SELECTABLE objects, I can achieve this by setting ALL objects, including walls etc., to "selectable". But is this the right way to do it? A large scene could have a massive number of objects… Or is there a way to test specifically if the object returned by "pick_center" is obscured?
I only want the outline to show if the object is visible to the camera, NOT when the line of sight is obscured by meshes of other objects, for obvious reasons - for example, I don't want objects in a room to show their outline through walls/floors/ceilings when I'm in another room.
Since "pick_center" reacts to SELECTABLE objects, I can achieve this by setting ALL objects, including walls etc., to "selectable". But is this the right way to do it? A large scene could have a massive number of objects… Or is there a way to test specifically if the object returned by "pick_center" is obscured?
06 April 2017 19:19
Thanks, that did it! I added an event handler for mouse move which checks for objects with pick_center and plays (or ends) the outline effect accordingly. Works like a charm!
Even better than before because with my own handler I can check for the presence of one object but outline a different object. This is helpful when I have very small target objects that could be easily missed by the user. I can now put a large, invisible "detection mask" object around the small object to increase the hit detection area, so I check for detection on the mask object but still play the outline effect for the actual target object.
Great, thanks again!
Even better than before because with my own handler I can check for the presence of one object but outline a different object. This is helpful when I have very small target objects that could be easily missed by the user. I can now put a large, invisible "detection mask" object around the small object to increase the hit detection area, so I check for detection on the mask object but still play the outline effect for the actual target object.
Great, thanks again!
05 April 2017 20:42
Hi everybody,
I would like to use the "outline enable" feature in First Person mode. However, in First-Person mode when the browser hides the mouse pointer image (which is desired) and the pointing position essentially becomes locked center-screen (where the crosshair is in shooter games), B4W still uses the position of the (now hidden) mouse pointer for outlining objects instead of center-screen. This makes it impossible for the user to "look at/point at" and get objects outlined properly in First-Person because the hidden mouse pointer could be anywhere whereas the pointing position is always center-screen.
You can check this with your own Jungle Outpost example if you set the bucket to "outline enable". In my example, the mouse pointer was in the lower left corner before the browser hid it. Indeed, B4W outlines the bucket at the (hidden) mouse pointer position instead of center-screen where the user would expect it in First-Person.
I would like to use the "outline enable" feature in First Person mode. However, in First-Person mode when the browser hides the mouse pointer image (which is desired) and the pointing position essentially becomes locked center-screen (where the crosshair is in shooter games), B4W still uses the position of the (now hidden) mouse pointer for outlining objects instead of center-screen. This makes it impossible for the user to "look at/point at" and get objects outlined properly in First-Person because the hidden mouse pointer could be anywhere whereas the pointing position is always center-screen.
You can check this with your own Jungle Outpost example if you set the bucket to "outline enable". In my example, the mouse pointer was in the lower left corner before the browser hid it. Indeed, B4W outlines the bucket at the (hidden) mouse pointer position instead of center-screen where the user would expect it in First-Person.
05 April 2017 20:25
There seems to be a problem with hiding lamps with Cycles Nodes, though. Try your example (fresh scene, cube), put a plane under the cube, make a Glossy Shader (GGX) material for the Plane. My result:
Lamp on:
Lamp off:
The cube goes fully dark, but the glossy Cycles material on the plane remains visible. Do you get this too?
As a temporary workaround, instead of show/hide, I simply move the lamp back/forth by a thousand Blender units to simulate the "lamp on/off" state. Works fine.
Lamp on:
Lamp off:
The cube goes fully dark, but the glossy Cycles material on the plane remains visible. Do you get this too?
As a temporary workaround, instead of show/hide, I simply move the lamp back/forth by a thousand Blender units to simulate the "lamp on/off" state. Works fine.