SyntaxBomb - Indie Coders

Languages & Coding => Monkey => Modules => Topic started by: JaviCervera on August 31, 2017, 14:03:24

Title: Vortex2 beta released - 3D module
Post by: JaviCervera on August 31, 2017, 14:03:24
Hello SyntaxBomb community.

I am proud to announce that Vortex2 has reached beta stage and has been officially published. It is a 3D module for Cerberus-X with a syntax inspired by Blitz3D (although being object oriented).

You can download a source snapshot or binary versions (with the tools precompiled) for Windows, macOS and Linux here:

https://github.com/JaviCervera/vortex/releases/tag/v2.0-beta (https://github.com/JaviCervera/vortex/releases/tag/v2.0-beta)

Or you can simply clone the repository to be up-to-date with future changes. Those who have been following the development of the module on the "vortex2" branch of the repository, please switch to the default "master" branch, which will be the active one from now on.

Checks the programs in the "demos" and "tests" directories. Demos showcase what can be achieved with the engine, while tests are simple programs that show how to use specific features of Vortex.

Please have in mind that this is pre-release software, so it may be buggy, and some features still need lots of work (specially shadows).

Thank you for your support!
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on August 31, 2017, 15:33:35
Looks interesting. Is Vortex2 limited to Cerberus-X or can I use it still with Monkey-X?

If I could suggest to just continue with plain Monkey-X support as I read somewhere in CX site that Monkey-X code is also compatible, not sure if it can be the other way around particularly with the namespace if these are part of vortex 2 changes.

I have only tested html5 and glfw targets on vortex and old vortex 2 versions, so I am curious if the android build now runs without crashing.

Edit: Perhaps add some shader support in future versions?


Title: Re: Vortex2 beta released - 3D module
Post by: Xaron on August 31, 2017, 16:25:10
You can use your monkey extension mixed with vortex in cerberus. In case you want to continue with the latest Monkey version it won't work, or you have to rename all extensions. But as Monkey isn't continued anymore I just guess you're using cerberus anyway and just want to keep your monkey extensions?

Congrats for the release BTW! It's a fantastic engine, I'm going to use it.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on August 31, 2017, 17:06:50
Quote from: Xaron on August 31, 2017, 16:25:10
You can use your monkey extension mixed with vortex in cerberus. In case you want to continue with the latest Monkey version it won't work, or you have to rename all extensions. But as Monkey isn't continued anymore I just guess you're using cerberus anyway and just want to keep your monkey extensions?

Hey Martin, I do appreciate all the efforts and everything with what's going on with Cerberus-X, but I'm actually happy with the last Monkey-X release and currently using MiniB3D. For me this is the better choice as it supports shaders and runs on android.
Title: Re: Vortex2 beta released - 3D module
Post by: Xaron on August 31, 2017, 19:28:30
Yes, use what works best for you. I'm sure vortex will work on Android as well as there's nothing special why it shouldn't.

Monkey works now but you probably run into problems at some point when newer SDKs come out which might break stuff (like gradle).
Title: Re: Vortex2 beta released - 3D module
Post by: MikeHart on August 31, 2017, 20:43:07
I always believe more in pictures!
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on August 31, 2017, 22:44:32
Quote from: Xaron on August 31, 2017, 19:28:30
Yes, use what works best for you. I'm sure vortex will work on Android as well as there's nothing special why it shouldn't.

Have you tried it yet?

QuoteMonkey works now but you probably run into problems at some point when newer SDKs come out which might break stuff (like gradle).

Again, I'm still at this point where I only use Monkey-X to try out some stuff, so right now this is not yet an issue for me.






Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on August 31, 2017, 22:47:56
Quote from: MikeHart on August 31, 2017, 20:43:07
I always believe more in pictures!

I always believe more in performance, documentation, support and usability. :)
Title: Re: Vortex2 beta released - 3D module
Post by: Xaron on September 01, 2017, 09:28:45
When you believe in support and performance (which is absolutely fine), I wonder why you still use Monkey + minib3d? I mean support has ended and performance was somehow weak on Android using minib3d the last time I used it. TBH I haven't tried vortex yet on my Android device. ;)

Documentation is indeed a good and valid point. This has to become better. Usability is already given as you're used to use Monkey anyway.

Please don't get me wrong, use the tools you want to use. I don't want to offend you like I did with others in the past. ;)
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on September 01, 2017, 10:23:58
QuoteI wonder why you still use Monkey + minib3d? I mean support has ended

I thought this site is now a replacement from the official community forum to gather existing members and at least get some support or exchange info from other MX users? :) You can say the same with vanilla and NG blitzmax btw, right?

Quote from: Xaron on September 01, 2017, 09:28:45
and performance was somehow weak on Android using minib3d the last time I used it. TBH I haven't tried vortex yet on my Android device. ;)

I need to quickly test out stuff and currently Minib3d works with Android. If I get some partial success with a simple game or project, I might be interested and go with another direction, probably forking MX without the namespace changes. I'm also not tied up with Monkey-X and using other frameworks/engines with different requirements, but so far I'm satisfied with minib3d. I wish I could get more in terms of creating custom shaders, apparently shader information/documentation is still lacking (already emailed Adam R. about this btw) but that's all good for now.

QuotePlease don't get me wrong, use the tools you want to use. I don't want to offend you like I did with others in the past. ;)

Hey no worries, none taken of course. :) It is true that there are situations where we cannot agree 100% all the time, but I did learn a lot from your MX stuff, which I really appreciate and in the end we all have to decide or give a shout out for our best interests.

cheers.

Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on September 01, 2017, 11:21:41
Android support do not seem to work right now. I don't have an Android device with me right now, but will check it & fix it ASAP. There is no way to use custom shaders currently, but more people have requested it so I will definitely add it at some point (it shouldn't be too hard, although it requires some reenginering of the engine architecture).

I am not on holydays anymore, so the time I can dedicate to Vortex is a bit more limited than in the past weeks, but I will try to fix any problems and support the library the best way I can.

Mike, thanks for the screenshots, I should have added them myself to the post...

There are some changes between Monkey-X and Cerberus-X that make them incompatible. For example, "cerberus://data/" paths (required to load assets when you don't use Mojo) are not recognized in Monkey, neither the "Import cerberus.blah" are supported, and other things. Good news is that Vortex includes a program "convert2monkey.monkey" that will make all the required changes and generate one .monkey file for each .cxs file. I am using this myself on one Win32 machine, where Monkey-X v85e is the last supported version.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on September 01, 2017, 12:15:05
Quote from: JaviCervera on September 01, 2017, 11:21:41
Android support do not seem to work right now. I don't have an Android device with me right now, but will check it & fix it ASAP. There is no way to use custom shaders currently, but more people have requested it so I will definitely add it at some point (it shouldn't be too hard, although it requires some reenginering of the engine architecture).

I thought so but still looking forward to it..

Quote from: JaviCervera on September 01, 2017, 11:21:41
There are some changes between Monkey-X and Cerberus-X that make them incompatible. For example, "cerberus://data/" paths (required to load assets when you don't use Mojo) are not recognized in Monkey, neither the "Import cerberus.blah" are supported, and other things. Good news is that Vortex includes a program "convert2monkey.monkey" that will make all the required changes and generate one .monkey file for each .cxs file. I am using this myself on one Win32 machine, where Monkey-X v85e is the last supported version.

You guys are doing some great stuff and it's great, at least from the product/platform point of view. I think I'll make do with MiniB3D for now with android target working and I'm already familiar with it. Thanks for the update. :)

Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on September 06, 2017, 13:49:02
Here's a screenshot of a WIP world editor for a game I am working on:
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on September 07, 2017, 00:35:11
I have made some changes to the interface to make it look more like a native application:
Title: Re: Vortex2 beta released - 3D module
Post by: Yue on September 07, 2017, 15:23:24
(https://www.syntaxbomb.com/proxy.php?request=http%3A%2F%2F3.bp.blogspot.com%2F-fVlg4quCBLk%2FUxizab-nc1I%2FAAAAAAAAAPk%2FVP1fTC5smGc%2Fs1600%2Fhomerobullanguero.gif&hash=d9142dc00b3008181e5b1aa5fe720a8c9993cc76)
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on October 06, 2017, 16:56:15
I decided to give it another go and the converter to MonkeyX is awesome btw as I got to build the latest and run the demos on desktop and web again without any problems.

Here's the CatLog for the android build filtered out with Errors only if you're curious to find out this issue that I am having. This is running the simple triangle demo just to test out the very basics of this module for android.


10-06 11:40:54.082 E/AndroidRuntime(4110): in writeCrashedAppName, pkgName :com.monkeycoder.monkeygame
10-06 11:40:54.082 E/AndroidRuntime(4110): FATAL EXCEPTION: GLThread 188
10-06 11:40:54.082 E/AndroidRuntime(4110): Process: com.monkeycoder.monkeygame, PID: 4110
10-06 11:40:54.082 E/AndroidRuntime(4110): java.lang.NumberFormatException: Invalid float: "OpenGL"
10-06 11:40:54.082 E/AndroidRuntime(4110): at java.lang.StringToReal.invalidReal(StringToReal.java:63)
10-06 11:40:54.082 E/AndroidRuntime(4110): at java.lang.StringToReal.initialParse(StringToReal.java:114)
10-06 11:40:54.082 E/AndroidRuntime(4110): at java.lang.StringToReal.parseFloat(StringToReal.java:304)
10-06 11:40:54.082 E/AndroidRuntime(4110): at java.lang.Float.parseFloat(Float.java:300)
10-06 11:40:54.082 E/AndroidRuntime(4110): at com.monkeycoder.monkeygame.c_Renderer.m_Init(MonkeyGame.java:5068)
10-06 11:40:54.082 E/AndroidRuntime(4110): at com.monkeycoder.monkeygame.c_World.m_Init(MonkeyGame.java:4599)
10-06 11:40:54.082 E/AndroidRuntime(4110): at com.monkeycoder.monkeygame.c_TestApp.p_OnCreate(MonkeyGame.java:3427)
10-06 11:40:54.082 E/AndroidRuntime(4110): at com.monkeycoder.monkeygame.c_GameDelegate.StartGame(MonkeyGame.java:3549)
10-06 11:40:54.082 E/AndroidRuntime(4110): at com.monkeycoder.monkeygame.BBGame.StartGame(MonkeyGame.java:558)
10-06 11:40:54.082 E/AndroidRuntime(4110): at com.monkeycoder.monkeygame.BBAndroidGame.onDrawFrame(MonkeyGame.java:1367)
10-06 11:40:54.082 E/AndroidRuntime(4110): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
10-06 11:40:54.082 E/AndroidRuntime(4110): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)



Thanks.
Title: Re: Vortex2 beta released - 3D module
Post by: Derron on October 06, 2017, 20:59:39
Seems something is trying to read a value which is no valid float (parseFloat()).


The "Init()" method of the Renderer-class is calling it - so I think it should be possible to debug that out properly (eg. do some debug-outputs (Log.i("yourapp", "here i am")).


Also you could check line :5068 if your created MonkeyGame.java-file and check what is happening there, and which line it "might" be in your original code.




bye
Ron
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on October 06, 2017, 22:41:21
I'd bet the error is happening when trying to retrieve the supported GL version. I will make a fix for that. I'm out of home this weekend, but I will definitely fix it next week.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on October 07, 2017, 02:10:39
Thanks Derron. I did not bother to check and debug it further at first by following those error trails as I would assume that the crash was a bigger issue than expected, which now seems to be the case (see below).

Thanks Javi, I did a quick fix by having a simple value for those version floats and that error went away. I'm now getting a force stop without errors |E| but just an info |I| with an error message

[Monkey] Error: Vertex shader active uniforms exceed MAX_VERTEX_UNIFORM_VECTORS (253)

Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on November 07, 2017, 12:11:53
Sorry for the delay in replying.

You could reduce the number of uniforms needed by decreasing the number of maximum lights and bones supported in World.Init. The function has the following signature:

Function Init:Bool(numLights:Int = 4, numBones:Int = 75)

So if you don't need lights or animation, you should reduce those numbers, for example:

World.Init(1, 0) 'One light supported, no bones
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on November 08, 2017, 14:07:42
Quote from: JaviCervera on November 07, 2017, 12:11:53
Sorry for the delay in replying.

You could reduce the number of uniforms needed by decreasing the number of maximum lights and bones supported in World.Init. The function has the following signature:

Function Init:Bool(numLights:Int = 4, numBones:Int = 75)

So if you don't need lights or animation, you should reduce those numbers, for example:

World.Init(1, 0) 'One light supported, no bones

No worries Javi. I tried this again earlier without any bones and lights and I got this error.

Error: Could not pack varying fcubeCoords

Technically the device is not that outdated to not handle lights. I can run other 3D engine stuff like minib3d with multiple lights and bone animation, and other mobile 3d games with shaders and so this is quite surprising. I'm just guessing that this has something to do with the GLES implementation or related to that.

Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on November 08, 2017, 14:28:18
Btw, with those new shadows features, are those stencil or textured?
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on November 08, 2017, 14:37:57
They are texture shadows.

BTW, I will take a further look at the problem you comment. It seems like the varying vars used have also reached the maximum available on your device.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on November 09, 2017, 13:36:43
Quote from: JaviCervera on November 08, 2017, 14:37:57
They are texture shadows.

BTW, I will take a further look at the problem you comment. It seems like the varying vars used have also reached the maximum available on your device.

Thanks, always nice to have textured shadows.
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on November 30, 2017, 01:20:11
I have commited a few changes to Github, basically now Vortex supports specular textures, so a surface does not need to have uniform shininess anymore. The robot demo has been updated to use a specular texture, and I think it looks much better now.

Here are some of the changes I want to make before beta2, which should be released by the end of the year:

- Add Lighting and ReceiveShadows properties to Material
- Add Shader property to Material
- Add picking test
- Add Texture.SetPixels method
- Add fixes for Android
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on November 30, 2017, 12:25:55
Awesome update, cool stuff and big thanks to SLotman for the mobile fix!

@Javi

As I have posted in the CX forums, it would be nice to toggle some shader "varying" in case you prefer to use specific shaders on mobiles.

BTW, how would I enable a basic car paint effect on Vortex2? would that just be using reflection and refraction with some specular on the side?

cheers.
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 01, 2017, 11:53:27
@RonTek: I am working on it. Check the Cerberus-X forums :)

For a car paint effect, you should use a reflection map with specular (which in beta2 can be defined in a texture also). I'll make a demo for beta2 with this :)
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 02, 2017, 12:39:47
Quote from: JaviCervera on December 01, 2017, 11:53:27
@RonTek: I am working on it. Check the Cerberus-X forums :)

For a car paint effect, you should use a reflection map with specular (which in beta2 can be defined in a texture also).

Thanks Javi. :) Yes, I would suggest something like setting up a custom profile and some short guide on how to enable each of these settings.

Example:
#OPENGLES_SHADER_PROFILE = "Minimal"

and of course you can also create your own and set it up. For example, I would just like to have a basic diffuse and cube map for basic car paint for mobile or other reflective or shiny stuff. How would I go about this if it is currently not even an option? ..and so I think creating custom profiles or having flags for each could help with shader preference.

QuoteI'll make a demo for beta2 with this :)

That would be awesome, thanks.
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 04, 2017, 00:39:56
I have been playing with a model from Sketchfab:
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 04, 2017, 22:05:02
Quote from: JaviCervera on December 04, 2017, 00:39:56
I have been playing with a model from Sketchfab:

Looks good. Is this with the environment mapping?

Btw, I was wondering how it would be easy to integrate 2D frameworks or standard mojo 2D commands on top. Does it need some refactoring or I could just use it directly? thanks.
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 05, 2017, 09:21:40
Quote from: RonTek on December 04, 2017, 22:05:02
Looks good. Is this with the environment mapping?

Btw, I was wondering how it would be easy to integrate 2D frameworks or standard mojo 2D commands on top. Does it need some refactoring or I could just use it directly? thanks.

It only uses env mapping on the glass, the rest is achieved through normal and specular mapping. I am considering the ability to use a material's cubemap as the source for specular reflections, which could give great results.

Vortex2 supports Mojo2 directly. You can even paint Mojo graphics to a texture and render them on a Vortex2 mesh. Check the "test_mojo2.cxs" example.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 05, 2017, 10:59:30
Quote from: JaviCervera on December 05, 2017, 09:21:40
Quote from: RonTek on December 04, 2017, 22:05:02
Looks good. Is this with the environment mapping?

Btw, I was wondering how it would be easy to integrate 2D frameworks or standard mojo 2D commands on top. Does it need some refactoring or I could just use it directly? thanks.

It only uses env mapping on the glass, the rest is achieved through normal and specular mapping. I am considering the ability to use a material's cubemap as the source for specular reflections, which could give great results.

Vortex2 supports Mojo2 directly. You can even paint Mojo graphics to a texture and render them on a Vortex2 mesh. Check the "test_mojo2.cxs" example.

Thanks. I was trying to use 2D Frameworks like Pyro, but it does not seem to work out of the box. It would be nice to get some 2D GUI working instead of building one from scratch. I'll check out the Mojo2 example again.

I downloaded the latest version and now getting uniform errors on mobile:

I/[Monkey]( 3607): Error: Vertex shader active uniforms exceed MAX_VERTEX_UNIFORM_VECTORS (253).

I have to try out some stuff with the working version and SLotman's patch for now..
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 05, 2017, 13:16:00
I reduced the number of varyings required like on SLotman's patch, so that shouldn't be a problem. The issue that you are having means that the number of uniforms (another type of shader var) has been exceeded. You can fix that by initializing the World like this:

World.Init(0, 4)

But that will disable skeletal animation (I am making changes to how this works for beta2).
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 05, 2017, 14:22:10
Quote from: JaviCervera on December 05, 2017, 13:16:00
I reduced the number of varyings required like on SLotman's patch, so that shouldn't be a problem. The issue that you are having means that the number of uniforms (another type of shader var) has been exceeded. You can fix that by initializing the World like this:

World.Init(0, 4)

But that will disable skeletal animation (I am making changes to how this works for beta2).

Thanks Javi. Yes, actually I have some background with shader stuff like uniforms, etc, but not to the extent on working with a whole engine basic shaders. I think the setup was better before as it is much easier. I already created some profiles depending on the platform using SLotman's patch and before the specular and cubemap changes that I noticed on the latest version, although the new specular is a great update.

I also got World.Init(1,50) which works perfectly before the changes and with max of 4 lights depending on device.

BTW, how do I disable normal mapping so I can remove tbnMatrix varying vec? Basically, this is what I'm trying to set up for mobile version, and I noticed on some games this is the most common setup for mobile..

Diffuse
CombinedDiffuse/Lightmaps
Reflect

I hope this gets better and easier to configure on the source level where you can pick which texture or material shaders from the basic you would like to support for a project.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 05, 2017, 23:54:43
Yay I finally got it working for low end mobile devices!!  :D :D :D

Diffuse ✓
Lightmaps ✓
Cubemaps ✓
Reflection ✓
Bone Animation ✓

(https://www.syntaxbomb.com/gallery/54_05_12_17_11_52_01.jpeg)

Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 05, 2017, 23:55:21
I see some great progress with Vortex2 and now a good alternative to MX MiniB3D!  :)
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 05, 2017, 23:55:46
..now moving into integrating it with existing 2D frameworks *bump* ouch  ;D
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 06, 2017, 00:13:12
Great! Any changes apart from removing normal mapping?
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 06, 2017, 00:34:44
Quote from: JaviCervera on December 06, 2017, 00:13:12
Great! Which changes did you have to do? Or was it the standard Git version? I made some more changes these past few days to make it work on iOS.

I'm still using the version with the Reflection and Refraction support with SLotman's fix since I only have to deal with the varying errors and found out that max lights should be around 3-4. I did check that for low end mobile devices, the supported was only 8, so I commented out depth, refract and parts where normal mapping is used (tbnMatrix?), at least for this specific renderer_shader version.

Yes, I am aware that there are a lot of changes since the fix and I would like to use the latest, but can't get anything to work on mobile, still looking forward to it :) :) :)

Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 06, 2017, 00:38:27
Quote from: JaviCervera on December 06, 2017, 00:13:12
Great! Any changes apart from removing normal mapping?

Yes, that was removing the varying for the fdepthCoords (for shadows?) and frefractCoords to make it work.
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 06, 2017, 00:52:07
Sorry, I edited my previous question because I saw on the picture that the example didn't have normal mapping.

Nice, I think that the version that will be on beta2 will work. There will be several shaders, and the one with all the features used for the geometry that is about to be rendered will be used. If that one couldn't be compiled on startup, then features will be removed selectively until one does work.

The bottleneck on many mobile devices seem to be the 32 varying components available (components, not vars: a vec3 takes 3 components, a vec4 4, and so on). The TBN matrix takes 9 components, so I run out of space quickly. If I calculate the matrix on the fragment shader, I could save some and make it fit, but that would slow things a bit, so probably the best bet is to remove normal mapping entirely on these devices.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 06, 2017, 01:16:20
Quote from: JaviCervera on December 06, 2017, 00:52:07
Sorry, I edited my previous question because I saw on the picture that the example didn't have normal mapping.

Nice, I think that the version that will be on beta2 will work. There will be several shaders, and the one with all the features used for the geometry that is about to be rendered will be used. If that one couldn't be compiled on startup, then features will be removed selectively until one does work.

The bottleneck on many mobile devices seem to be the 32 varying components available (components, not vars: a vec3 takes 3 components, a vec4 4, and so on). The TBN matrix takes 9 components, so I run out of space quickly. If I calculate the matrix on the fragment shader, I could save some and make it fit, but that would slow things a bit, so probably the best bet is to remove normal mapping entirely on these devices.

Sounds awesome! :) As for normal mapping, yes I see most mobile games does not require it, but still good to have if you can replace one material with it, which seems to be in this case and it looks flexible. (https://www.syntaxbomb.com/Themes/OrangeLine/images/post/thumbup.gif)

As for textured shadows, any way to change the opacity and color? Maybe add PCF or blur options for desktop and web?
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 06, 2017, 01:42:51
Shadows use the global ambient color which can be set with World.Ambient(color) (maybe in the version you are using it is still World.SetAmbient(color), I am making some changes to the API now that it is still in beta).

Shadows use mutiplicative mode, not alpha blending, so the way to change the opacity is to make the ambient color brighter.

PCF and blur are features I would like to work on (as well as multiple and cascaded shadows), but not before I release 2.0-stable.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 06, 2017, 02:05:24
Quote from: JaviCervera on December 06, 2017, 01:42:51
Shadows use the global ambient color which can be set with World.Ambient(color) (maybe in the version you are using it is still World.SetAmbient(color), I am making some changes to the API now that it is still in beta).

Shadows use mutiplicative mode, not alpha blending, so the way to change the opacity is to make the ambient color brighter.

PCF and blur are features I would like to work on (as well as multiple and cascaded shadows), but not before I release 2.0-stable.

Thanks! will try some shadow setup on desktop/web.  :)

BTW, here's a reference on what I'm using for testing low end devices. Galaxy Note 3, Android 4.x

(https://i.imgur.com/Ae8zW6p.jpg)



Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 10, 2017, 23:34:41
Thank you! Knowing the limits on uniforms and varyings will be very useful.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 11, 2017, 09:08:20
Quote from: JaviCervera on December 10, 2017, 23:34:41
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.
Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 11, 2017, 12:24:10
Ok, I have uploaded a test_listener to Github.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 11, 2017, 15:45:29
Quote from: JaviCervera on December 11, 2017, 12:24:10
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

Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 12, 2017, 09:55:31
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.
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 12, 2017, 11:27:02
Quote from: JaviCervera on December 12, 2017, 09:55:31
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

Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on December 12, 2017, 15:53:40
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?
Title: Re: Vortex2 beta released - 3D module
Post by: RonTek on December 13, 2017, 14:43:10
Quote from: JaviCervera on December 12, 2017, 15:53:40
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. :)

Title: Re: Vortex2 beta released - 3D module
Post by: JaviCervera on October 02, 2018, 16:39:12
Beta 2 has been released. This release brings lots of changes. API should be more or less stabilized now:

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
Title: Re: Vortex2 beta released - 3D module
Post by: MikeHart on October 02, 2018, 17:25:13
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.