View Issue Details

IDProjectCategoryView StatusLast Update
0005115DarkRadiantModelspublic18.11.2020 02:48
ReporterDragofer Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.6.0 
Target Version2.9.0Fixed in Version2.9.0 
Summary0005115: Export patches: .lwo loses smooth shading
DescriptionWhile re-exporting models in DR has been working fine, exporting patches as an .lwo creates a model that has lost smooth shading.
Polys count is a bit different than expected, i.e. a 16-sided cylinder patch with 34 vertices & 32 polys will have 34 vertices and 33 polys as an .lwo.

When I import an .lwo derived from a patch into Blender 2.79b, the model suddenly has 96 vertices (=each of the 32 faces has its own 3 vertices). Removing doubles will eliminate 64 vertices.
An .lwo derived from a model will have the correct number of vertices when imported into Blender.
Steps To Reproduce1) Create a cylinder patch, give it ship_hull_medium as a texture and change subdivisions to 4 horizontal and 1 vertical. This shape has 34 vertices and 32 polys.
2) Select the cylinder and 'Export selected as model' with these settings

Output Format: .lwo
Center objects around origin
Skip surfaces textured with caulk

The model has no smooth shading ingame.
Additional InformationTested & confirmed in 2.6, 2.7pre2, 2.7pre3
The attached archive and image also contains .ase exports of a patch, as those are also misbehaving. (0005116)
TagsNo tags attached.

Relationships

related to 0004750 closedgreebo Export Selected as .LWO Model: Exported models loose smooth shading after export. 
related to 0005377 closedDragofer Exported .LWO models have no smoothing 
related to 0005116 resolvedgreebo Export patches: .ase has too many verts 

Activities

Dragofer

Dragofer

07.01.2020 10:03

developer  

export_patch.jpg (140,171 bytes)   
export_patch.jpg (140,171 bytes)   
export_patch.pk4 (506,808 bytes)
Bikerdude

Bikerdude

12.01.2020 18:26

reporter   ~0012137

This might be related to - https://bugs.thedarkmod.com/view.php?id=4767
Bikerdude

Bikerdude

01.05.2020 12:47

reporter   ~0012442

Last edited: 01.05.2020 12:56

View 2 revisions

This issue is still happening as of the latest version of DR, 2.08 pre5

1. create a patch cylinder.
2. select export as .LWO and click 'replace with exported model' when exporting.
3. dmap/map and the exported model has lost all the smoothing.
Bikerdude

Bikerdude

08.11.2020 16:18

reporter   ~0012869

Last edited: 10.11.2020 09:38

View 2 revisions

Nice work Greebo, this will save a lot of Blender time :-)
Dragofer

Dragofer

09.11.2020 14:24

developer   ~0012882

Thanks! This one's highly appreciated.

Related Changesets

DarkRadiant: 2.9.0 54fde581

2020-11-08 05:03:36

greebo

Details Diff
0005115: Convert patch surface to indexed model surface before passing them to the exporter.
This way the polygons are not separated and the normals can be smoothed.
Affected Issues
0005115
mod - radiantcore/model/export/ModelExporter.cpp Diff File
add - radiantcore/model/export/PatchSurface.h Diff File
mod - tools/msvc/DarkRadiantCore.vcxproj Diff File
mod - tools/msvc/DarkRadiantCore.vcxproj.filters Diff File

DarkRadiant: 2.9.0 3c68f768

2020-11-08 05:11:35

greebo

Details Diff
0005115: Move implementation to .cpp file, cleanup Affected Issues
0005115
mod - radiantcore/Makefile.am Diff File
mod - radiantcore/model/export/ModelExporter.cpp Diff File
add - radiantcore/model/export/PatchSurface.cpp Diff File
mod - radiantcore/model/export/PatchSurface.h Diff File
mod - tools/msvc/DarkRadiantCore.vcxproj Diff File
mod - tools/msvc/DarkRadiantCore.vcxproj.filters Diff File

DarkRadiant: 2.9.0 54d66327

2020-11-08 15:49:18

greebo

Details Diff
0005115: Add integration test, assuming that the exported LWO has the same number of vertices as the tesselation. Affected Issues
0005115
mod - .gitignore Diff File
mod - test/Makefile.am Diff File
add - test/ModelExport.cpp Diff File
mod - test/RadiantTest.h Diff File
mod - test/algorithm/Scene.h Diff File
add - test/resources/tdm/maps/modelexport_patch.map Diff File
mod - tools/msvc/Tests/Tests.vcxproj Diff File
mod - tools/msvc/Tests/Tests.vcxproj.filters Diff File

Issue History

Date Modified Username Field Change
07.01.2020 10:03 Dragofer New Issue
07.01.2020 10:03 Dragofer File Added: export_patch.jpg
07.01.2020 10:03 Dragofer File Added: export_patch.pk4
07.01.2020 10:05 Dragofer Description Updated View Revisions
07.01.2020 10:13 Dragofer Additional Information Updated View Revisions
12.01.2020 18:26 Bikerdude Note Added: 0012137
01.05.2020 12:47 Bikerdude Note Added: 0012442
01.05.2020 12:56 Bikerdude Note Edited: 0012442 View Revisions
31.07.2020 20:09 VanishedOne Relationship added related to 0004750
03.11.2020 14:58 Dragofer Relationship added related to 0005377
07.11.2020 16:23 greebo Status new => confirmed
08.11.2020 15:50 greebo Assigned To => greebo
08.11.2020 15:50 greebo Status confirmed => assigned
08.11.2020 15:57 greebo Changeset attached => DarkRadiant 2.9.0 54fde581
08.11.2020 15:57 greebo Changeset attached => DarkRadiant 2.9.0 3c68f768
08.11.2020 15:57 greebo Changeset attached => DarkRadiant 2.9.0 54d66327
08.11.2020 15:58 greebo Target Version => 2.9.0
08.11.2020 15:58 greebo Status assigned => resolved
08.11.2020 15:58 greebo Resolution open => fixed
08.11.2020 15:58 greebo Fixed in Version => 2.9.0
08.11.2020 16:18 Bikerdude Note Added: 0012869
09.11.2020 14:24 Dragofer Note Added: 0012882
10.11.2020 09:38 Bikerdude Note Edited: 0012869 View Revisions
18.11.2020 02:48 greebo Relationship added related to 0005116