[QGIS-Developer] [SoC] GSoC 2020 - Community Bonding Period Report

Martin Dobias wonder.sk at gmail.com
Tue Jun 2 01:41:01 PDT 2020


Hi Belgacem

On Mon, Jun 1, 2020 at 3:02 PM BELGACEM NEDJIMA <gb_nedjima at esi.dz> wrote:
>
>
> Hi everyone,
> Here is my progress in the Google Summer of Code project:
>
> Tasks done this week:
>
> Reading the tessellation code used to generate triangles of building from polygons
> Experimented with the Qt3DExtras::QDiffuseMapMaterial and explored some alternatives. Unfortunately some of the alternatives are not available in the Qt version I use (Qt5.9).
> Tried compiling QGIS with different Qt versions.
> Added texture coordinates to the vertex buffer of QgsTessellatedPolygonGeometry.
> Got the basic functionality of texturing buildings using 1 texture image working for some vector layer projects.
> You can see the texture rendering in action here: screenshot

Happy to see your progress and the screenshot with textures :-)

As discussed on Slack, it would be nice if you could figure out why
the texture is upside down on some walls and fix it...


> Tasks to be done:
>
> Refine how the user chooses textures and include a default texture in case anything goes wrong with the texture image.

Sounds like a good idea!

> Define a generic class that handles material definition in a way that it can be extended for physics based rendering and other types of materials in the future.

I think we don't need to go that far. I would suggest that you just
update QgsPhongMaterialSettings to be able to keep information about
the texture image file, scaling (and anything else necessary).

> Currently there are 4 types of vector layer data and some of them are not working properly so I will make the texturng work for them as well.

It can be a bit more tricky to get other geometry types textured
properly - and different geometry types may need different
configuration. I would suggest that we stick to polygons for now and
have texturing disabled for lines and points.

> Make a way to rotate texture coordinates using an angle specified by the user.

That could be a nice feature - but maybe we can leave it as a "nice to
have" towards the end of the GSoC project - it is always good to go in
small steps, get the work reviewed and merged, and then continue with
some further improvements.

> Discuss how we define separate roof textures from walls textures.

For this we can use existing rule-based rendering - the user could
define one rule for features with roofs, the other rule for walls.
This would work out of the box for true 3D building geometries. For
vector layers that only contain 2D footprints of building which we
then extrude, we may need to add an extra choice for users: 1. only
create "roofs", 2. only create "walls", 3. create "roofs" and "walls"
(the default)

Cheers
Martin


More information about the QGIS-Developer mailing list