Skip to content
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

Documentation improvement #2

Open
InfiniteProductions opened this issue Apr 24, 2016 · 4 comments
Open

Documentation improvement #2

InfiniteProductions opened this issue Apr 24, 2016 · 4 comments

Comments

@InfiniteProductions
Copy link

I believe Penumbra deserve a better documentation, including subtle tweaking of items parameter (lights and hulls), some tips & tricks (like what is fastest/cutest for example) etc

I know I'm not the best to talk about writing documentation :P and I understand what it could be, but as good as a library is, it is nothing without proper documentation, hope you'll agree. You can also let me know if you need some help, as a beginner users, I can help at least by pointing where I have some trouble understand something or deal with an issue on my own.

@discosultan
Copy link
Owner

Couldn't agree more about the documentation. I was unsure if people even had any interest in this kind of library and therefore didn't invest too much of my time on the docs. I need to figure out if it's enough to simply improve the readme file on GitHub or make use of GitHub's wiki section instead.

I'd be very interested in knowing what have been the most problematic and hard to figure out things when it comes to Penumbra. Also, any ideas on how to improve the API itself are welcome.

@InfiniteProductions
Copy link
Author

I can't speak for everyone, for sure, but there is some interest, look at MonoGame.extended, Dilan, it's main author, has planned to add it, but I don't think Penumbra would work as MG.Ext is truly multi-platform (PCL).
I think the wiki would be better for everyone, you included, as things can be sorted out and well organised (lights, hulls, small examples, complex examples, ...)

I've just started and I already encounter some trouble creating a simple hull and a point light (
penumbra-issue1

with this:

plight1 = new PointLight()
            {
                Position = new Vector2(256, 256),
                Radius = 480.0f,
                Scale = new Vector2(300),
                CastsShadows = true,
                ShadowType = ShadowType.Solid,
                Intensity = 2.8f,
                Color = Color.YellowGreen
            };

            penumbra.Lights.Add(plight1);

            hull1 = new Hull(new Vector2(1.0f, 1.0f), new Vector2(1.0f, -1.0f), new Vector2(-1.0f, -1.0f), new Vector2(-1.0f, 1.0f))
            {
                Position = new Vector2(100, 300),
                Scale = new Vector2(200, 50)
            };

with MonoGame 3.5.1 on win7 64b.

@discosultan
Copy link
Owner

discosultan commented Apr 24, 2016

The radius property of the plight1 seems to be way too big, hence the weird artifacts.

The radius does not reflect how far the light rays reach, instead it determines the radius of the light source (the circle where light emanates from). It will only affect the shadows (how big is penumbra and umbra regions of a shadow). Scale is what determines how far the light rays travel.

@InfiniteProductions
Copy link
Author

You see !

You may change the properties' names and/or add documentation about them. IMHO: replace radius/scale by size/radius-distance-attenuation(distance) or something more relevant and meaningful.

Allow defining the size of the light is unusual, the common approach is to consider a point light as a single point (for "big" light, we have to create a sphere and using an emissive texture, for example in Unity), so its name.
Perhaps the size of the light itself may be made as optional/"hidden" property, I mean something we don't need or don't have to use in most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants