-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of Lights #17
Comments
first hot reply :
I need to go back into the code (xbuf and jme) to remember. |
That's right, I would probably only add them to the model root anyway, as that is what blender does anyway (not affecting other models)
That's a good point but currently it doesn't do that at all. Not sure how/if blender could support scene-graph-hiearchies but currently the light doesn't work at all, hence the issue.
That's true, there it would work, but then the user might need to configure everything through userData to the point where it is almost as much work to hard-code lights generally |
Currently, XBuf handles lights "wrong", at least on the jme side of things.
First: I don't know if changing the importer or exporter would be better, because xbuf is designed to be jme-agnostic and thus the xbuf files should follow blender conventions.
Current Situation: Export a PointLight, get a Node with the name of the light and the transform which has a light as it's child.
Problem: Lighting only affects that intermediary node and thus the lights have no effect.
Proposal: Add Lights to the Model Root (or the light node's parent, which should be equal, I suppose)
Downsides:
In jME Lights don't have User Data or a Name. That isn't that tragic, but if you animate lights, you'd need a spatial with a LightControl (XbufLightControl). This is already implemented in xbuf and adds the light to the model root, but imo all lights should be added there and maybe only when lights are animated, keep the spatial to copy the transform. Or only when the XbufKey is set to use the light control, then keep the spatial, otherwise delete it?
Like: if (!useLightControl) { lightNode.getParent().addLight(light); lightNode.removeFromParent(); }
So based on 2 and the xbuf key, this would be a case for the importer. What are your opinions?
The text was updated successfully, but these errors were encountered: