Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I've installed addon mikal_frag_light-8-2.8.0.c3addon

Open example file 3DObjectFragLight-8.
Preview layout - black screen - can't see anything. 

What now? How do you turn on a light? 

I can't find where the code samples that FoozleCC refers to are located. 

Check that the renderer is webgl2 in the project setting, only webgl2 now is supported for the effect, I will update the webpage and remove older versions.

I suggest adding 3dobject (free addon) to your project. It will handle what main.js previously did, and you can leave out main.js.

Light types

  • Directional light simulates a distant light source like the sun, casting parallel rays in a single direction across the entire scene with consistent intensity
  • Spotlight creates a cone-shaped beam of light from a single point in a direction, spreading outward with an intensity that decreases from the center to the edges, like a flashlight or stage light
  • I cant see how to check that the renderer is webgl2 in the project setting

    https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/p...

    See Advanced->WebGPU

    Try: 3DObjectFragLight-2-60-0-1.c3p 

    Thank you very much. Unfortunately the project was saved in r423 beta and I am using r416.2 stable. I see it running in the browser as intended, but can't figure out how to update my desktop version to r423 beta - preference is to stay using stable. 3D Oject addon is installed.  

    Enabled WebGPU in previous release mikal_frag_light-8-2.8.0 - 

    Light flashes on for a moment, then screen goes black. 

    Error log - 

    instance.js:241 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'bindBuffer')
        at Object3DInstance.Tick (instance.js:241:25) etc

    6instance.js:241 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'bindBuffer')
        at Object3DInstance.Tick (instance.js:241:25)
        at _isTicking._tickFunc._tickFunc (sdkInstanceBase.js:1:3025) etc

    gltfModel.js:130 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'currentShader')
        at GltfModelTop.setVertexShaderModelRotate (gltfModel.js:130:38)
        at GltfModelTop.render (gltfModel.js:245:12) etc 

    It seems to still wan to use main.js as when I delete it, there isn't even a flash of light. Error log after deleting main.js - 

    domSide.js:16 Uncaught (in promise) GPUPipelineError: The fragment input at location 2 doesn't have a corresponding vertex output.
     at ValidateInterStageMatching (..\..\third_party\dawn\src\dawn\native\RenderPipeline.cpp:781) 

    (1 edit)

    I don't have older versions of the examples, so I suggest using the browser with the examples as a reference for your desktop development. Additionally, do not use WebGPU; use WebGL2, which is the most stable renderer for C3.

    (1 edit)

    On opening 3DObjectFragLight after Construct 3 update to r424 stable, I got the following notification: 

    • Plugin 3D Object (Mikal_3DObject) by Mikal uses the legacy SDK v1 which is deprecated. A future update to Construct will remove support for SDK v1 addons. Check if an update using SDK v2 is available for this plugin, or contact the plugin developer for support.
    • Behavior Rotate 3D (mikal_rotate_shape) by mikal uses the legacy SDK v1 which is deprecated. A future update to Construct will remove support for SDK v1 addons. Check if an update using SDK v2 is available for this behavior, or contact the behavior developer for support.

    yes, both addons will only support SDK V1. they will not be updated, because SDK V2 has a limited feature set and it is not possible to implement them with that limited feature set.

    I can't find where the code samples that FoozleCC refers to are located. 

    www.youtube.com/watch?v=p02bz6jax8Y&t=1105s 

    I think the project you are referring to is Foozle's example project. Check YouTube comments for a pointer about the location on his itch page.