Save
Saving
  • D
    datee

    Great, thanks! Will do!

    posted in Kode read more
  • D
    datee

    Hey, another question... While cubemaps using the render method described above works fine, how do i set mip levels for a cubemap? Image has a generatemips and set mips function, but cubemaps do not... Not possible at this point? I really need it for IBL specular light among other things! 🙂

    posted in Kode read more
  • D
    datee

    Oh, i see! Well, that works just fine ! 😁 Thanks a lot! 👍

    posted in Kode read more
  • D
    datee

    So i'm trying to write a skybox and an environment shader, but im having some issues finding out how cubemaps work with Kha and G4. I've searched high and low in the documentation, source code and examples. But i have not found a solution yet..

    myCubemap = CubeMap.createRenderTarget( ... ) is the only method available it seems, and im not sure how to actually set the 6 images you need like you can in WebGL using GL_TEXTURE_CUBE_MAP_POSITIVE_X etc...

    I guess you would use g4.setCubeMap(pipeline.getTextureUnit("cubemap"), myCubemap) to the set uniforms... and i got this far but not further.. I've seen that Armoury3D does use skyboxes do im guessing it should be possible?

    If anybody has some insight into this i would really appreciate it! 🙂

    (Im still learning G4 workflows, so bear with me :p)

    posted in Kode read more
  • D
    datee

    Right, ok.. Thats useful to know. Will do continue with some testing to see if i can find out whats going on!

    posted in Kode read more
  • D
    datee

    Right. But i belive the setup in lobus' example i tested above is supposed to work correctly with khamake and ffmpeg, and so should my tests be..

    As far as i can tell, Khamake converts mp4 video to avi, (seems to be an mp4 codec in the avi).. and the result when playing is only sound with the error above.

    I have tried many video types and tested many times here, but so far i am not successful to get a video playing with the windows target, (html5 works fine)..

    The image is always missing but the sound is there.... so it looks like there might be a regression in Kore then?

    What is the "Emergency begin/end" error?

    posted in Kode read more
  • D
    datee

    So, im having trouble getting video playback working with Windows target.
    Im asking here because im uncertain of the state of videoplayback on native at this time.

    Is it supported and should work? What videoformats are supported?

    Test method 1: Trying with webm and/or .mp4 file - Result : Application crashes

    var video:Video;
    ....
    Assets.loadVideoFromPath("Big_Buck_Bunny_1080p.webm", onVideoLoaded)
    function onVideoLoaded(v:Video) 
    {
    	video = v;
    	video.play();
    }
    

    Crash information

    Exception thrown: read access violation.
    texture was 0xFFFFFFFFFFFFFFE7.
    
    Empty.exe!kinc_g4_texture_lock(kinc_g4_texture * texture) Line 252	C++
    Empty.exe!Kore::Graphics4::Texture::lock() Line 124	C++
    Empty.exe!Kore::Video::currentImage() Line 131	C++
    Empty.exe!kha::Image_obj::initVideo(hx::ObjectPtr<kha::kore::Video_obj> video) Line 216	C++
    Empty.exe!kha::Image_obj::createFromVideo(hx::ObjectPtr<kha::Video_obj> video) Line 467	C++
    Empty.exe!kha::kore::graphics4::Graphics2_obj::drawVideoInternal(hx::ObjectPtr<kha::Video_obj> video, double x, double y, double width, double height) Line 66	C++
    Empty.exe!kha::graphics4::Graphics2_obj::drawVideo(hx::ObjectPtr<kha::Video_obj> video, double x, double y, double width, double height) Line 1123	C++
    Empty.exe!Empty_obj::render(Array<Dynamic> frames) Line 94	C++
    

    .

    Test method 2: Trying out existing video example - Result : Sound but no image - and an error

    -clone https://github.com/luboslenco/video_example_kha
    -node Kha\make windows --compile
    run Empty.exe
    
    output : 
    kha/SystemImpl.hx:289: Emergency begin/end
    kha/SystemImpl.hx:289: Emergency begin/end
    kha/SystemImpl.hx:289: Emergency begin/end
    kha/SystemImpl.hx:289: Emergency begin/end
    ....
    

    (The converted file is a .avi - What codec is being used here?)

    As a sidenote, videoplayback with html5 works great. But i guess this is just handled by
    the browser itself. But really hope there is a way to get video on native working too..

    posted in Kode read more
  • D
    datee

    Right... Well ok then, that would certainly help! 🙂

    posted in Kode read more
  • D
    datee

    So i've recently started working with Kha, and i have to say im really impressed with the flexible workflow and toolset!

    The iteration times and speed of working with Krom is amazing! And the performance is great too! The only downside for with Krom i've found yet is the lack of certain features, like support for http... any chance this could get implemented?

    posted in Kode read more