Author Topic: Vortex2 beta released - 3D module  (Read 5798 times)

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: Vortex2 beta released - 3D module
« Reply #45 on: December 11, 2017, 09:08:20 AM »
Thank you! Knowing the limits on uniforms and varyings will be very useful.

Sure thing, that should take care of at least the average or lowest acceptable mobile specs.

Btw, it would be nice to see some sample of the 3D sound/listener next. Thanks.

Offline JaviCervera

  • Jr. Member
  • **
  • Posts: 28
Re: Vortex2 beta released - 3D module
« Reply #46 on: December 11, 2017, 12:24:10 PM »
Ok, I have uploaded a test_listener to Github.

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: Vortex2 beta released - 3D module
« Reply #47 on: December 11, 2017, 03:45:29 PM »
Ok, I have uploaded a test_listener to Github.

Thanks Javi, works great on desktop and web, but on android there seems to be some issues. Sound plays but there's a stuttering sound, could be just the bitrate but I'm not sure and sound completely stops and not fade as opposed to 3d sounds.

I downloaded some benchmark 3d sound test app to check and that works as expected:
https://play.google.com/store/apps/details?id=com.cclsoft.surroundtest&hl=en


Offline JaviCervera

  • Jr. Member
  • **
  • Posts: 28
Re: Vortex2 beta released - 3D module
« Reply #48 on: December 12, 2017, 09:55:31 AM »
The algorithm is based on basic trigonometric functions, that work the same on all platforms, and the the sound is faded and positioned with Mojo's SetChannelPan and SetChannelVolume. I don't know if those functions have any problems on Android.

Looping uses ChannelState, which according to the documentation, does not work on Android. I can rewrite to try to not require that function, I think it's easily doable.

[EDIT] I have checked and nope, sorry, ChannelState is widely used within the algorithm to make the calculations, so we are out of luck unless that function is fixed in a future update to Cerberus-X.

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: Vortex2 beta released - 3D module
« Reply #49 on: December 12, 2017, 11:27:02 AM »
The algorithm is based on basic trigonometric functions, that work the same on all platforms, and the the sound is faded and positioned with Mojo's SetChannelPan and SetChannelVolume. I don't know if those functions have any problems on Android.

Looping uses ChannelState, which according to the documentation, does not work on Android. I can rewrite to try to not require that function, I think it's easily doable.

[EDIT] I have checked and nope, sorry, ChannelState is widely used within the algorithm to make the calculations, so we are out of luck unless that function is fixed in a future update to Cerberus-X.

I see, thanks and no worries. I guess I have to settle with 2D sounds which is not an issue. Have you tried the android 3d sound for yourself btw?

Btw, I noticed that you cannot alter texture offsets or uv sizes, which would be nice for texturing primitives for quick texturing or prototyping.  :)

Somehow, I would like to help with MousePicking in any way, but perhaps you already got this figured out and have your own implementation? For me, I would just convert or refer to the minib3d implementation, which is already working


Offline JaviCervera

  • Jr. Member
  • **
  • Posts: 28
Re: Vortex2 beta released - 3D module
« Reply #50 on: December 12, 2017, 03:53:40 PM »
Thanks for your offering, RonTek.

It shouldn't be hard to do, I'll check it out soon, there's just a few things I want to finish earlier. If you can wait, don't worry about it (hopelly will be done before the end of the year; if not, early in 2018).

BTW, I missed your post saying you couldn't get Vortex working with Pyro. I have never tried that myself, and checking the internet I could only find Pyro2 for Monkey2. Is there a site that I can download it from?

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: Vortex2 beta released - 3D module
« Reply #51 on: December 13, 2017, 02:43:10 PM »
Thanks for your offering, RonTek.

It shouldn't be hard to do, I'll check it out soon, there's just a few things I want to finish earlier. If you can wait, don't worry about it (hopelly will be done before the end of the year; if not, early in 2018).

BTW, I missed your post saying you couldn't get Vortex working with Pyro. I have never tried that myself, and checking the internet I could only find Pyro2 for Monkey2. Is there a site that I can download it from?

Ok got it and will look forward to it. The Pyro download is still available on Playniax's site, under Downloads -> depreciated folder. Yes, finally I got it working now since Pyro uses Mojo2. :)


Offline JaviCervera

  • Jr. Member
  • **
  • Posts: 28
Re: Vortex2 beta released - 3D module
« Reply #52 on: October 02, 2018, 04:39:12 PM »
Beta 2 has been released. This release brings lots of changes. API should be more or less stabilized now:
  • Added vertex animation support (which is now the default in meshtool since there is a bug with skinned meshes)
  • Added animation sequences
  • Shadow tex size can now be changed at runtime
  • Sun distance can be specified for shadow calculation
  • Added Shader class
  • Added previous depth pass to avoid computing redundant fragments
  • Added different draw modes to surfaces (points, lines, triangles, triangle strip, triangle fan)
  • Math3D library has been completely rewritten
  • Renamed Material.BaseTexture to Material.ColorTexture
  • Added Material.SpecularTexture
  • Added Material.CubeTexture and removed Reflection and Refraction textures (now a material can only have one cubemap)
  • Added Material.CubeOpacity
  • Added Lighting and ReceiveShadows properties to Material
  • Added Shader property to Material
  • Returned to previous FPS based animation system, instead of the duration based one
  • Does not parse GL version on init anymore to prevent crash on some old Android versions
  • Reduced the number of shader uniform and varying vars needed
  • Added different shaders:
  • - Minimal: No normal or specular maps, no cube mapping, no shadows
  • - Minimal with shadows: No normal or specular maps, no cube mapping
  • - Vertex lighting: No normal or specular maps
  • - Pixel lighting
  • Per pixel lighting is now the default
  • Removed World.GlobalPixelLighting (You can do Shader.DefaultType(Shader.TYPE_VERTEX_LIGHTING) to switch to vertex lighting)
  • Removed Cache class (added undocumented CacheSound function and Load method in classes with an optional cache param)
  • Added Mesh.CreateQuad
  • The script convert2monkey now also converts demos (I forgot that!)
  • Removed cubemap support for Material.ColorTexture (skyboxes are rendered with a custom shader)
  • Removed "Set" from all methods
  • Added Material.SpecularPower
  • Made default Material.Shininess 0.001
  • Added Color.Multiply
  • Public Renderer class renamed Graphics
  • Removed Stats class (DeltaTime is now on World, the rest on Graphics)
  • Mesh.UpdateBoundingBox has been renamed to Mesh.Rebuild, and now rebuilds all surfaces
  • Cameras now adjust the view and ratio automatically if ViewportWidth, ViewportHeight or AspectRatio is -1 (which is now the default)
  • Changed binary font format. Fonts generated with previous versions won't render correctly anymore
  • Several bug fixes
  • Thanks to SLotman from the Cerberus-X community for his help on Android!

NOTE: No macOS binaries are provided since Cerberus apps do not seem to currently compile under Mojave. I will upload them as soon as I get fixed.

Grab it from: https://github.com/JaviCervera/vortex/releases/tag/v2.0.0-beta2

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 516
    • FantomGL
Re: Vortex2 beta released - 3D module
« Reply #53 on: October 02, 2018, 05:25:13 PM »
Hi Javi, great seeying an update. I fixed Cerberus so mojo1/mojo2 apps and the opngles example works on OSX. Look for the quickfix in the forum.