Git Product home page Git Product logo

fuseeprojectteam / fusee Goto Github PK

View Code? Open in Web Editor NEW
87.0 87.0 36.0 1.19 GB

Fusee aims at becoming a multiplatform 3D realtime engine with a strong emphasis on content transformation and manipulation. Fusee is written mainly in C# and can be programmed in C#. Fusee builds bridges to make your code run in environments that don't support C#, like Content-Creation-Software, C++, Plug-In-APIs and native HTML5/WebGL Javascript code.

Home Page: https://fusee3d.org

License: MIT License

C# 84.59% CSS 0.03% Batchfile 0.03% Python 10.00% GLSL 0.64% JavaScript 4.03% C 0.64% HTML 0.04%
3d-game-engine 3d-visualization blazor blazor-webassembly csharp dotnet fusee game-engine opentk pointcloud potree webassembly

fusee's People

Contributors

2of3 avatar aspepex avatar bertiooo avatar dependabot[bot] avatar dropcity avatar dsohn97 avatar edward-fortyhands avatar griestopf avatar jonathan-schnee avatar mrnic3guy avatar niclas-cravaack avatar niksteff avatar pr1m3c0d3 avatar qogoist avatar redimp1470 avatar teetrizzz avatar theslowlysnail avatar weibertalexander avatar wrestledbearonce avatar wulfbirk avatar xmotux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fusee's Issues

The custom implementations are outdated!

With the latest JSIL update, we have to update our custom implementations.

This is how it looks like right now:

JSIL.MakeClass($jsilcore.TypeRef("System.Object"), "Fusee.Engine.Font", true, [], function($interfaceBuilder) {
    $ = $interfaceBuilder;

    $.Field({ Static: false, Public: true }, "CharInfo", $jsilcore.TypeRef("System.Array", [$fuseeCommon.TypeRef("Fusee.Engine.CharInfoStruct")]), null);

    // ...

    $.Method({ Static: false, Public: true }, ".ctor",
        new JSIL.MethodSignature(null, []),
        function _ctor() {
            // not implemented
        }
    );

    $.Method({ Static: false, Public: true }, "get_Width",
        new JSIL.MethodSignature($.Int32, []),
        function get_Width() {
            return this.Width;
        }
    );

    // ...

    $.ImplementInterfaces(
        $fuseeCommon.TypeRef("Fusee.Engine.IFont")
    );

    return function(newThisType) { $thisType = newThisType; };
});

This is how it should look like:

(function Font$Members () {
  var $, $thisType;

  var $T00 = function () {
    return ($T00 = JSIL.Memoize(System.Array.Of($asm01.Fusee.Engine.CharInfoStruct))) ();
  };

  // ...

  function Font__ctor () {
  }; 

  function Font_get_Width () {
    return this.Font$Width$value;
  }; 

  // ...

  JSIL.MakeType({
      BaseType: $asm05.TypeRef("System.Object"), 
      Name: "Fusee.Engine.Font", 
      IsPublic: true, 
      IsReferenceType: true, 
      MaximumConstructorArguments: 0, 
    }, function ($ib) {
    $ = $ib;

    $.Method({Static:false, Public:true }, ".ctor", 
      JSIL.MethodSignature.Void, 
      Font__ctor
    );

    $.Method({Static:false, Public:true , Virtual:true }, "get_Width", 
      JSIL.MethodSignature.Return($.Int32), 
      Font_get_Width
    );

    // ...

    $.Property({Static:false, Public:true , Virtual:true }, "CharInfo", $jsilcore.TypeRef("System.Array", [$asm01.TypeRef("Fusee.Engine.CharInfoStruct")]));

    // ...

    $.ImplementInterfaces(
      /* 0 */ $asm01.TypeRef("Fusee.Engine.IFont")
    );

    return function (newThisType) { $thisType = newThisType; }; 
  });

})();

We have to fix this asap!

VS-Code build generates awkward subdirectories below bin

On most machines VS-Code generates the FUSEE Application DLL into ${workspaceRoot}/bin/Debug/netstandard2.0/
On some machines VS-Code generates a subdir between Debug and Netstandard.
The "Debug in FUSEE Player" Debugger option relies on the "/bin/Debug/netstandard2.0/" sequence of subdirs.

Either find a way to remove the subdirectory names or find a way to keep VS-Code from generating additional subdirs.

Retarget to .NET Standard.

  • Fusee.Base.Common
  • Fusee.Base.Core
  • Fusee.Base.Imp.Android
  • Fusee.Base.Imp.Desktop
  • Fusee.Base.Imp.Web
  • Fusee.Engine.Common
  • Fusee.Engine.Core
  • Fusee.Engine.Imp.Font.Desktop
  • Fusee.Engine.Imp.Graphics.Android
  • Fusee.Engine.Imp.Graphics.Desktop
  • Fusee.Engine.Imp.Graphics.Web
  • Fusee.Engine.Imp.Input.Desktop
  • Fusee.Engine.Imp.Input.Web
  • Fusee.Engine.Imp.Network.Desktop
  • Fusee.Engine.Imp.Network.Web
  • Fusee.Engine.Imp.Physics.Desktop
  • Fusee.Engine.Imp.Sound.Desktop
  • Fusee.Engine.Imp.Sound.Web
  • Fusee.Engine.Imp.Video.Desktop
  • Fusee.Engine.Imp.Video.Web
  • Fusee.Engine.Player.Android
  • Fusee.Engine.Player.Core
  • Fusee.Engine.Player.Desktop
  • Fusee.Engine.Player.Web
  • Fusee.Jometri
  • Fusee.Math.Core
  • Fusee.Serialization
  • Fusee.Xene
  • Fusee.Xirkit
  • fuseeCmdLine

Texture Resource Mechanism

  • Create IImageData interface
  • Implement ImagePixelFormat and ImagePixelChannel descriptive structs.
  • Make current ImageData implement IImageData
  • Enhance existing Blt implementation using the specified Src's ScanLine enumeration

Android build breaks in VS2019 - Assets are not packaged into apk file

The Android build dies when trying to load assets via AssetStorage.Get<T>(Filename).
Digging deeper the difference is that ApkAssetProvider.CheckExist(string id) returns true in VS2017 and false in VS2019.

protected override bool CheckExists(string id)
{
if (id == null) throw new ArgumentNullException(nameof(id));
string dir = Path.GetDirectoryName(id);
string file = Path.GetFileName(id);
return _androidContext.Assets.List(dir).Contains(file);
}

This is with VS2019 Preview 2.2

Webbuild crashes with Chrome 67.0.x: WebGL2 context not found!

When running webbuild with Chrome the application crashes with:
WebGL2 context not found!

Solution:

  1. Goto: chrome://flags/#enable-webgl-draft-extensions
  2. Enable the draft extensions
  3. Restart
  4. Reload project - it should work now
  5. WebGL Extensions can be disabled again from this point forward

Make ShaderEffect a ressource type managed by RenderContext

  • Add RenderContext.SetShaderEffect(ShaderEffect se)
  • Remove all RenderContext/GPU specific stuff from ShaderEffect internals
  • Add Changed/Disposed event to ShaderEffect
  • Add Lookup table to RenderContext to keep track of already allocated shaders for a given RenderContext
  • Find a way to handle 1:n relationship between ShaderEffect and Shaders
  • Move ShaderEffect.RenderMesh functionality to RenderContext.Render(Mesh m) and remove ShaderEffect.RenderMesh
  • Find a more typed way for implementing ShaderEffect.SetEffectParam / GetEffectParam
  • ADVANCED: inherit ShaderEffect from DynamicObject and make all declared parameters
    dynamic properties such that shader parameters can be set by myShaderEffect.MyCustomParam = xyz;
  • Debug repeated RenderContextImp.CreateShader calls
  • Avoid unnecessary OpenGL set uniform parameter calls
  • Experiment: Try dynamic with nuget package in player.cs
  • Compare value update: float4x4 compare
  • Documentation
  • BugFixes in Examples!

Test the Input Feature

The Input feature for different controllers and gamepads has to be tested. For web and native code.
The corresponding example needs to be checked and (perhaps) cleaned.

Different GamePads have to be tested for native and browser:

  • XBox360 Gamepad
  • Ps3 Gamepad
  • Keyboard & Mouse
  • ...

There might be a problem with inverted axis in the web browser. This has to be corrected.

Engine cannot be built on macOS

When attempting to build the Fusee.Engine project from the master branch, Fusee.Serialization will stop as soon as the PrecompileTool gets executed.

OS: macOS 10.13.4
Mono: 5.10.0.160
IDE: Rider 2018.1 181.4952.142

image
image

Crash when leaving game - Audio stream bug

"Audio.Instance.LoadFile" without setting the streaming bool to true will crash the application when hitting Escape.

Example Code (test with own mp3s):

using Fusee.Engine;

namespace Examples.BeeTheGame
{
    public class BeeTheGame : RenderCanvas
    {
        private IAudioStream _ton_1;
        private IAudioStream _ton_2;
        private IAudioStream _ton_3;

        public override void Init()
        {
           _ton_1 = Audio.Instance.LoadFile("Assets/SOUND1.mp3");
//("Assets/schmotzer1.mp3", true)
// mit (mind. einem) true kein Absturz aber auch keine Überlappung der sounds möglich
            _ton_2 = Audio.Instance.LoadFile("Assets/SOUND2.mp3");
            _ton_3 = Audio.Instance.LoadFile("Assets/SOUND3.mp3");
        }

        public override void RenderAFrame()
        {
            if (Input.Instance.IsKeyDown(KeyCodes.Space))
            {
                _ton_1.Play();
            }
            if (Input.Instance.IsKeyDown(KeyCodes.W))
            {
                _ton_2.Play();
            }
            if (Input.Instance.IsKeyDown(KeyCodes.S))
            {
                _ton_3.Play();
            }
        }

        public static void Main()
        {
            var app = new BeeTheGame();
            app.Run();
        }
    }
}

Particle-System has to be prepaired

The particle system has some minor known bugs. They have to be fixed before the release.

  • It's not possible to change the properties of the particle system dynamicly on the fly. If you change a propertie with the getter/setter methods, you have to wait until new particles are generated to see the changes.
  • Sometimes the particle system crashes after a longer time even if the number of the particles does not change. This is a FUSEE related problem.
  • The workflow for using the particle system could be a bit more intuitive

Clean example projects

Clean the example projects to have a minimum base of examples in the project only. Merge some of them and get rid of unnecessary ones.

UI Implementation - Text

  • FontMap.cs: create Texture instead of ImageData.
  • Test behaviour of different UI Texts with different font sizes, which are using the same Font instance.
  • Make texture size in FontMap variable, according to pixel size of the used font.
  • Set maximum size of the FontMaps' texture according to maxium size that current graphic cards can handle.
  • Font scaling: "fontSize" only adjusts the texture resolution, not the scaling of the font mesh. Rename to "fontResolution".
  • MipMap: Currently automated? The set font size is the maximum value.

Fix remaining bugs for release.

  • transformcomponent add order can mess up scale
  • fusee root path is only set once in SetupMachineWide.bat
  • textures ColorFormat is wrong in android build RGBA <> ARGB_8888
  • blender path is hardcoded in fuseecmdline
  • fusee path with whitespaces causes jsil exception - needs testing, try calling jsil with ""
  • GetMaterial() doesnt work for Principled Shader materials.

"dotnet new fusee" doesn't handle dashes correctly

When using "dotnet new fusee" in a directory with dashes (e.g. Fusee-Test), the resulting launch.json will contain "Fusee_Test.dll" in the args field for the Fusee Player. The dll will build to "Fusee-Test.dll".

GUI Z-Pos Problem / Bug

As we were trying to implement a 2D-GUI element into our project we noticed, after getting a look at the background, that the loaded picture (png) was rendered behind all the 3D elements in our scene (with an ortographic camera).
All changes to the z-pos of the load function (new GUIImage) for the image were ignored and made no difference.
After adding a second picture to the GUI, the first one was rendered as before, but the second one with the same z-pos was rendered in front of everything.
Changing the order of the GUI.Add Functions as well as the z-pos led to some strange and unpredictable outcomes.

We're sorry that we can't provide a how-to for reproducing this issue, but we've got a backup of our code and if there are questions about it, let us know so we can help.

Picking result should be global

The current picking results don't seem to take rotations in the scene graph into account. The example at https://github.com/FUSEEProjectTeam/Fusee-Bug-RotationPicking shows a cube, build to a .fus, file that was rotated in Blender by (-90, -90, -90). When a surface is clicked/picked the camera should rotate to a view, centering the picked point on the face.

Picking results should not only be provided as local coordinates, but also in global coordinates or even in reference to another component in the scene graph hierarchy.

Mesh(Component)

Remove MeshComponent. Use new Mesh type instead and move to Fusee.Serialization, also inherit SceneComponent container. Remove MeshComponentMap from SceneRenderer.

Clean protobuf.dll

Clean some of the many protobuf.dll's so we can have a minimum and maybe relocate them in the project directory.

Mac OSX protobuf precompile

There is a problem with the protobuf precompiler on mac osx - there is no precompiler for mac osx.

So the project should be excluded on mac osx or the precompiler for protobuf-net has to be added.

Linq For Geometry needs some use cases

LFG needs some use cases and some more love to integrate it in the new release. Some things we want to integrate is a subdivision surface algorithm as well as some convenience functions. To be updated ...

fuseeCmdLine does not honor the correct JSIL settings when building a template build for web.

A Fusee web build from a template crashes when using Linq (probably others things too). Linq is used in out picking implementation.
This also initialy happened when I switched the platform to netstandard2.0, the fix was excluding System.Linq in the dead code analysis of JSIL (18f4fb1).
This is happening again when building a template with fusee publish --platform Web.

How to reproduce:

  • Create a new fuse template project dotnet new fusee
  • Add some picking to it.
  • fusee publish --platform Web

Resolve texture references in .fus files

Make ResourceManager.Get("some.fus") resolve referenced texture files into ImageData or Texture objects.

  • Implemenmt SceneTranslator with dummy-component raw -> high-level translation

SDL Memory Leak

Sdl2 application quit
Sdl2GraphicsContext (handle: 196608) leaked, did you forget to call Dispose()?
[Warning] OpenTK.Platform.SDL2.Sdl2GraphicsContext:196608 leaked. Did you forget to call Dispose()?
GraphicsContext leaked, did you forget to call Dispose()?
NativeWindowBase leaked, did you forget to call Dispose()?
Sdl2NativeWindow leaked, did you forget to call Dispose()?
[Warning] {0} leaked, did you forget to call Dispose()?
OpenTK.Platform.SDL2.Sdl2JoystickDriver leaked, did you forget to call Dispose()?
Sdl2InputDriver leaked, did you forget to call Dispose()?
[OpenTK] OpenTK.Platform.SDL2.Sdl2Factory leaked with 2 live resources, did you forget to call Dispose()?
OpenTK.Platform.Factory leaked, did you forget to call Dispose()?

Engine.sln in develop cannot be opened on linux

The Engine.sln solution file in the root of the develop branch cannot be opened in mono 3.0.x on ubuntu(debian based) linux due to the first line in the Engine.sln file:

"Microsoft Visual Studio Solution File, Format Version 12.00"

This cannot be read by mono. To make it temporarily work, it is possible to change it manually to:

"Microsoft Visual Studio Solution File, Format Version 11.00"

The file format 12.00 is just not supported under Mono 3.0x.
Mono Develop 4.2.2 (which is Xamarin Studio 4.2.2) is currently not available for linux machines in a prebuilt and stable state. Xamarin 4.2.2 can open the file just normal under Mac OSX 10.9.1 Mavericks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.