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

OpenGL Teapot the return #30

Open
darnuria opened this issue Feb 7, 2021 · 16 comments
Open

OpenGL Teapot the return #30

darnuria opened this issue Feb 7, 2021 · 16 comments

Comments

@darnuria
Copy link
Collaborator

darnuria commented Feb 7, 2021

@Marobax said 2020-02-04:

I wrote to @noalien, to remake the traditionnal "glut TeaPot" in GL4Dummies.
It's right now to deprecated functionalities in lib glut, rendering of the traditionnal l'Utah Teapot with plain faces and wired one.

@darnuria
Copy link
Collaborator Author

darnuria commented Feb 7, 2021

@Marobax it's OK for me, @noalien ok for you? Will be better if "main decisions" are re-transcribed in issue for future bug-tracking/decision-follow-up emails and talks are sadly perishable if not archived on a mailling-list.

@Marobax
Copy link
Contributor

Marobax commented Feb 7, 2021

@darnuria This was one of the many projects suggested by @noalien during our email exchanges so i guess it's ok. I've already started working on it. Finding the original glut_teapot.c file (which surprisingly has a lil' typo in it !) in glut 3.7 (last version ever).

The main question i'm asking myself being how do i connect myself to this API. @noalien, is it better to create a whole new file dedicated to those two functions somewhere in GL4D/, probably in a file named gl4dTeapot.c, or is there a more suitable place?

@darnuria
Copy link
Collaborator Author

darnuria commented Feb 7, 2021

I've already started working on it.

Oh, please make it online as a fork and open a PR would make review easier for us! ^_^

Don't mind about making mistakes, changing mind or whatever every human being is imperfect it's OK. If you did'nt plan to do malicious stuff. ;p

Moreover: we are here to help. ;)

@Marobax
Copy link
Contributor

Marobax commented Feb 7, 2021

Great idea @darnuria. I'm not doing it today, but i sure will. Probably next week. I'll keep you informed.

@noalien
Copy link
Owner

noalien commented Feb 12, 2021

I added a document that specifies what is expected for gl4duTeapot : https://github.com/noalien/GL4Dummies/blob/master/docs/TODO_gl4dgTeapot.pdf

@Marobax
Copy link
Contributor

Marobax commented Feb 24, 2021

BEHOLD THE TEAPOT

teapot.mp4

@noalien
Copy link
Owner

noalien commented Feb 24, 2021

Good start
(0,0,0) seems to be a starting point
Try with : glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);

@Marobax
Copy link
Contributor

Marobax commented Feb 27, 2021

It was actually just a lack of a sizeof *data in a malloc somewhere. My data being a table of GLfloats, it's easy to understand why it only showed a quarter of my teapot (and why the vertices end up being at (0,0,0) !). I just corrected up. See for yourself :)

Teapot.1.mp4

I'm kind of proud actually. I had to work basically blindly for three weeks. I could'nt see what i was doing and still managed to be one sizeof away from perfection on my first render ! :D

@Marobax
Copy link
Contributor

Marobax commented Feb 27, 2021

Sadly i've gone through multiple unexpected tribulations. I dont want to complain to much but the task wasn't easy. Everything seemed to work against me. I encountered multiple problems even from official models and i've grown tired of it. That was really upsetting seeing one week worth of work getting thrown because a well known library actually contained misaligned vertices.

Knowing this and the fact that i have to work on other projects, I won't be able to continue adding the spout/handle. This projet was meant to target multiple people so i guess it's normal, but I prefer to prevent. If someone wants to add it and has the guts to add hundreds of vertices, i have the perfect model i just made myself to do the work. Adding it with some tweaks to the texCoord should be enough.

Just ask and i will deliver ! I'm even willing to mentor a bit if needed ;)

image

@Marobax Marobax mentioned this issue Feb 27, 2021
@noalien
Copy link
Owner

noalien commented Mar 1, 2021

Keep in mind that ideally the teapot should take advantage of the "mkRegularGrid *" functions and use a mesh generator based on surfaces of revolution. Good luck.
https://github.com/noalien/GL4Dummies/blob/master/docs/TODO_gl4dgTeapot.pdf

@Marobax
Copy link
Contributor

Marobax commented Mar 12, 2021

Sorry, but i'm busy these times and I won't be able to implement such a thing :/ I hardly understand the mkRegularGrid() "pipeline" (SelectGeometryOptimization into DrawWithGeometryOptimization into GLDrawElements) and working on it would probably require me an other week (at best), which i can't afford.

Moreover your pdf emphasizes on the fact that i should implement the teapot like the cylinder and that's what I think I did. mkRegularGrid seem to be only used for geometries that use slices and rows like the torus, and unlike the teapot.

Besides, my teapot generation is already quite optimized, as much in terms of algorithmic complexity as in terms of execution time. It only require one single glDrawArrays() to be drawn while also using the revolution principle just like asked. Diving on it again while my mind is busy with so much things would probably only make me broke it ! D:

I'll see if I can free myself some time at the beginning of next month, but it is more likely that I will work on other projects. I'll keep you informed if it happens :)

@noalien
Copy link
Owner

noalien commented Mar 19, 2021

@Marobax The message was not directly addressed to you, sorry :). I insisted for the "next one", who would take up the subject (to give the teapot an oriental look).
On the other hand, I just wish you resize your teapot so that it would fit in a unit cube. Is it OK for you ?

@inepsie
Copy link

inepsie commented Feb 25, 2022

Hello, we are three students who want to work on the Teapot, @Laozey @Bibi210 and myself. We have started to implement the main part of the Teapot and the cover based on the functions "mkSphereVerticesf" and "gl4dgGenSpheref". We obtain for the moment the result below, it seems to us that the calculations of the normals and the coordinates of textures must still be improved.

Capture_decran_video_de_25-02-2022_140713.mp4

We are currently implementing the use of Bézier curves in order to do the other parts of the Teapot or even to use them for what we have already done. For example, below, we place spheres on a Bézier curve defined by 6 points.

bezier_capture_01

@noalien
Copy link
Owner

noalien commented Feb 25, 2022

Nice beginning
Good luck for the next steps !

@darnuria
Copy link
Collaborator Author

@noalien shall we close it? (auto-triaging my own openned issues)

@noalien
Copy link
Owner

noalien commented Jul 12, 2023

unfortunately no, the specifications given above (#30 (comment)) are not satisfied.

@noalien shall we close it? (auto-triaging my own openned issues)

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

4 participants