tobspr / RenderPipeline

Physically Based Shading and Deferred Rendering for the Panda3D game engine
https://github.com/tobspr/RenderPipeline/wiki
Other
967 stars 133 forks source link

Package RenderPipeline into .whl and host on PyPI #109

Open rdb opened 5 years ago

rdb commented 5 years ago

Now that RenderPipeline is a pure-Python module and Panda3D is on PyPI as well, it would be very useful if RenderPipeline were built into a .whl with a dependency on panda3d>=1.10.0 and uploaded to PyPI. It would make installing the RenderPipeline into any Panda3D installation very easy (just a matter of pip install render_pipeline), and would also make deploying an application using the RenderPipeline easier.

tobspr commented 5 years ago

I actually would have done this already, if I wouldn't have been that busy :p I am not too experienced with the Python Packaging system. I think I already added a pip package: https://pypi.org/project/render_pipeline/ However, I never found the time to actually update it / make it work.

If anybody is interested, I would greatly appreciate that and supply all needed information!

rdb commented 5 years ago

Would you want to put all the RenderPipeline stuff under a root render_pipeline module, so that import rpcore becomes import render_pipeline.core or do you want to keep rpcore, rplibs, data, etc. modules as top-level packages?

Would you want to include the effects and config or would you want people to just copy them into their own game directories?

tobspr commented 5 years ago

@rdb Good questions.

Would you want to put all the RenderPipeline stuff under a root render_pipeline module

Yeah that certainly makes sense. I think almost everything could go into that module then, it would simply avoid name clashing. For the sake of easiness, we could also keep the rpcore name so old code stays compatible by adding the root module to the path. Does that make sense? (Its been ages since I've worked with python :P)

Would you want to include the effects and config or would you want people to just copy them into their own game directories?

This is a harder question. Since the plugin configurator and daytime editor work directly on the builtin config.xml IIRC, they would have to need access to that. However, as a pip module, it would be weird to modify the files of a module. I guess it would make more sense to require the user to copy the file.

I will spend some time figuring out how to solve this this afternoon.

rdb commented 5 years ago

Does that make sense?

Yeah, I think that makes sense.

Feel free to use this as a starting point: https://github.com/rdb/RenderPipeline/commit/a646e0bb9a2b5a40111d04ed06055b5f9b6fdf19 That was my attempt to get it to work packaged as wheel before I got stuck on figuring out what to do with the top-level directories.

As for the configuration, maybe there could be a default Pipeline config supplied, subject to being overridden by user configuration, or does that not make sense?

tobspr commented 5 years ago

That was my attempt to get it to work packaged as wheel before I got stuck on figuring out what to do with the top-level directories.

Ah cool! I will check it out. Can I simply install the latest panda3d via pip? Right now I don't have my development setup available to build panda3d from source..

As for the configuration, maybe there could be a default Pipeline config supplied, subject to being overridden by user configuration, or does that not make sense?

Yeah, right now the pipeline does not support that, but I can add support for it. I will have to dive into the code for that again, its been a while :P

rdb commented 5 years ago

Yes, pip install panda3d should do the right thing. No headers are included with that, but that should not be a problem as panda3d._rplight is included with Panda.

Thanks a lot!

tobspr commented 5 years ago

Cool! I will try to get it to it within the next days :)

tobspr commented 5 years ago

Will post once I have some updates, right now I am pretty busy with other stuff ..