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

Tutorials for working with 3D? #87

Open
NaotoNTP opened this issue Jul 7, 2017 · 1 comment
Open

Tutorials for working with 3D? #87

NaotoNTP opened this issue Jul 7, 2017 · 1 comment

Comments

@NaotoNTP
Copy link

NaotoNTP commented Jul 7, 2017

I haven't seen any tutorials related to working with SGDK's 3D capabilities (rendering 3d shapes with the Bitmap engine and working with various Maths3D functions). I've tried taking a look at the built-in cube demo, but there are several things that the demo alone can't really address, especially with lack of detailed comments. I found myself asking questions like "So is that checkerboard dither pattern that appears on filled polygons something I can turn of or not?" and "Can I really only have a maximum of 256 points?" I feel like a tutorial or at the very least some proper documentation in the form of comments in the code would save anyone interested in wanting to work with the limited 3D capabilities a lot of time and frustration.

@Stephane-D
Copy link
Owner

All the methods are documented and honestly there is not much to say about the 3D part which is pretty minimal :p
You should use maths3d unit for 3D transformation part and bitmap unit for drawing part.
The checkboard dither is because you use plain 8 bits color, Bitmap mode use 1 palette and so is limited to 16 colors, still you have to possibility to provide 8 bits colors to the drawPolygon(..) method to enable dithering and simulate more colors. If you don't want it, just use plain 4 bits colors like this : 0x11, 0x22, 0x33... :) I can eventually do a better 3D sample example but still 3D capabilities are pretty limited as the Megadrive hardware is not designed for that.

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

No branches or pull requests

2 participants