由用户创建的信息 nktrrz
16 January 2015 05:08
16 January 2015 02:29
12 January 2015 14:43
12 January 2015 03:24
Alright I modified my app.js file to be able to translate the pivot point up and down in the y-axis while still being able to have rotation in the y-axis all with just left mouse clicking. (simpler for mobile and frankly end users )
I am now however having trouble limiting the y axis vertical translation.
I tried using export.apply_vertical_limits from the camera.js module But the camera controls just reset.
m_cam.apply_vertical_limits = function(obj, 0, 20, space) {
if (camera.is_target_camera(obj) || camera.is_eye_camera(obj)) {
var render = obj._render;
render.vertical_limits = {
down: 0,
up: 20
}
}
}
I also tried using the math.min and math.max functions but had no luck with them either.
I'm I approaching this right? Or is there a simpler/better way? Do you have any examples using these limits?
Thanks in advanced.
I am now however having trouble limiting the y axis vertical translation.
I tried using export.apply_vertical_limits from the camera.js module But the camera controls just reset.
m_cam.apply_vertical_limits = function(obj, 0, 20, space) {
if (camera.is_target_camera(obj) || camera.is_eye_camera(obj)) {
var render = obj._render;
render.vertical_limits = {
down: 0,
up: 20
}
}
}
I also tried using the math.min and math.max functions but had no luck with them either.
I'm I approaching this right? Or is there a simpler/better way? Do you have any examples using these limits?
Thanks in advanced.
11 January 2015 13:17
I agree detecting which rendering botteneck is the culprit would be difficult. I guess I was hoping you guys might have experimented with the idea
Its a good thing you mentioned the WebGL Aquarium app because I was about to make another post about Dynamic Loading and Video Game Tessellation and Displacement. But it applies here anyway…
Just like in the WebGL Aquarium example, I can imagine how I could have textures dynamically loaded from low to higher quality as long as the fps in under 60fps.
The next step would be doing the same thing with the meshes. But with outrageous mesh file sizes this wont be as simple. Please let me know If my following thought process is correct:
Like your cartoon_interior demo I could load the scene (with low quality meshes) then manually raise the mesh poly count by loading and replacing the meshes with higher-poly ones. The problem here is there would be a delay between loading higher quality models especially if internet speeds are bad(not to mention the drop in performance). The other option would be to load all quality meshes at first, and start with the LO_Q with all the others hidden and call them up by un-hiding them.
The most efficient way is how its done in video games which is with tessellation and displacement maps, unless you have this kind of feature in the works, is there any other way you think this could be done?
Here's some three.js examples:
tessellation
displacement
Sorry for the long post, I hope I articulated myself adequately
Its a good thing you mentioned the WebGL Aquarium app because I was about to make another post about Dynamic Loading and Video Game Tessellation and Displacement. But it applies here anyway…
Just like in the WebGL Aquarium example, I can imagine how I could have textures dynamically loaded from low to higher quality as long as the fps in under 60fps.
The next step would be doing the same thing with the meshes. But with outrageous mesh file sizes this wont be as simple. Please let me know If my following thought process is correct:
Like your cartoon_interior demo I could load the scene (with low quality meshes) then manually raise the mesh poly count by loading and replacing the meshes with higher-poly ones. The problem here is there would be a delay between loading higher quality models especially if internet speeds are bad(not to mention the drop in performance). The other option would be to load all quality meshes at first, and start with the LO_Q with all the others hidden and call them up by un-hiding them.
The most efficient way is how its done in video games which is with tessellation and displacement maps, unless you have this kind of feature in the works, is there any other way you think this could be done?
Here's some three.js examples:
tessellation
displacement
Sorry for the long post, I hope I articulated myself adequately
11 January 2015 08:53
In the Making a Game. Part 4: Mobile Devices tutorial the Navigator userAgent Property is used to adjust quality according to whether a mobile browser is detected.
Can a detect_mobile function be used to load a secondary json file that is, for example less polys and more optimized for mobile than the primary json file.
Can a detect_mobile function be used to load a secondary json file that is, for example less polys and more optimized for mobile than the primary json file.
11 January 2015 08:49
I'm trying to come up with a better solution to automatically loading scenes based on system performance, instead of using the detect_mobile Navigator userAgent Property.
Is there a way to test for device/browser performance before loading a scene, like making a certain amount of drawcalls then timing them? Any number below a certain threshold would be able to load more demanding scenes. Wouldn't this be a better approach to determine whether a device can perform well enough to run a scene? Obviously some high-end android devices will out-perform some pcs, so detecting for mobile browser isn't the best solution.
Is there a way to test for device/browser performance before loading a scene, like making a certain amount of drawcalls then timing them? Any number below a certain threshold would be able to load more demanding scenes. Wouldn't this be a better approach to determine whether a device can perform well enough to run a scene? Obviously some high-end android devices will out-perform some pcs, so detecting for mobile browser isn't the best solution.
08 January 2015 21:14
08 January 2015 15:45
08 January 2015 12:24
Woops, did not know the forum didnt support gifs… i fix
Camera Target location:
http://i.imgur.com/TGF6lNq.gif
Camera constrained to shape:
http://i.imgur.com/hvFXPwM.gif
Camera Target location:
http://i.imgur.com/TGF6lNq.gif
Camera constrained to shape:
http://i.imgur.com/hvFXPwM.gif