Frag light effect support for experimental frag effect
This is pretty experimental, but it adds support for a project which patches the C3 runtime to enable per fragment lighting for 3DObject.
The project is included here.
Currently only works with non-worker animation mode (if it proves promising, will add worker mode)
Look at main.js for some info on how to add and change lights (color, position, spotlight, direction, etc.)
The position of a light can be controlled, but they will all use the same offset for the control.
Only 3DObjects will be lit and work, do not use other C3 rendered objects (e.g. Sprite, 3DShape, Tilebackground, Text) - However, of course can create entire levels of 3DObjects.
HTML elements will render (e.g. button, input box)
Try it out! If you do changes to the project (js, etc.) please share, let's work on this together).
Files
Get Construct 3 3DObject Plugin
Construct 3 3DObject Plugin
Construct 3 3DObject, loaded from 3D model files (gltf embedded format)
Status | Released |
Category | Assets |
Author | kindeyegames |
Tags | 3D, construct, construct-3 |
More posts
- 3DObject showcase: Syder Studios19 days ago
- Add 3D Effects affine texture support (PS1 retro)22 days ago
- fix (addon) fix corrupted addon39 days ago
- fix (accessors) add support for sparse accessors in gltf40 days ago
- Fix (node-disable) fix node disable without skinned node60 days ago
- fix (node-disable) regression66 days ago
- Fix (playable Ad)78 days ago
- fix (worker) correct animation blend for worker (translation)95 days ago
- fix (opacity)Sep 05, 2024
- add (sample) sample gpu-skin with phong lightAug 23, 2024
Comments
Log in with itch.io to leave a comment.
Not able to export 3D object to Android. Am I missing something in settings or is it just not possible. I get error "build failed"
I don't know of any reason it should not export. Don't do minify (if that is an option). Others have exported to Android and released mobile games. Can you export other C3 example projects to Android and it works?
Any other detail on error messages?
I just tested this and its about 1000x faster than old face light lol. Amazing.
Yup! That's what we could do if C3 added effect SDK to let us change vertex shader and first fragment shader for 3D objects! Which I have requested many times. Also the first fragment shader would let us use uniforms, so the lights could be controlled individually during runtime.
Aw, that just gave me a good idea too. Putting a light on each bullet and shoot it down a dark hallway would look so cool.
How you do that? I instal new version of plugin, i run my game and i dont receive better performance
He's comparing using flat shaded lighting ACEs of 3DObject vs using effect based lighting from the frag lighting experiment. Two different techniques.
ok, there is any chance to use this new method without SJ code?
This is just experimental, probably shouldn't use it seriously yet, but all you have to do in the code is change values of the lights colors and positions and angles. Very easy, there is comments.