Kendzi3D - 3D Viewer as plugin for JOSM.

Sorry for that, I will fix it as soon as possible.

Great :thumbsup:

Plugin should be fixed in version 1.0.184. Please check it.

Done with “Windows”. Now there is no longer a problem. Thanks for the fix.

Hi,

Is it possible that the roof:orientation:across/along is not working good?
When I use I see in Kendzi 3D view along in F4 map as across .
When I use along I see in Kendzi 3D view across F4 map as along.
I think that Kendzi 3D view is wrong? Or are there other tag that overrule it?

When I use Kendzi 3D view height it is written with a “,” comma example “height 3,5” josm validation asks a “.” dot where can I change it ?

thanks

The roof orientation tag is working correctly only for rectangle like buildings. When shape of building is close to square it may work unpredictable. So I need some example to check if it is working right.

Should not happen. Do you edit height by 3d editor right? I added bug request.

https://www.dropbox.com/s/3ie16kn6rf20ua5/Kendzi3Dacrossalongexample.jpg?dl=0

adress link in F4
http://demo.f4map.com/#lat=50.7798742&lon=3.1877526&zoom=21&camera.theta=71.979&camera.phi=-98.262

thanks

I have check your location and looks fine for me.

From your image I see that you are using an old version of plugin. Why don’t you upgrade it to the current version 1.0.184?

In josm plugin I saw kendzi"d_improved … I thought this is the best…now I see 1.0.184 I upgrade

thanks

Please take a look at this picture:

http://wiki.openstreetmap.org/wiki/File:Kendzi3DCameraMovingShortcuts.jpg

It should help with the camera movement in 3D view.

Unfortunately I still get the message that “kendzi.josm.jogl.JoglPlugin was not found”. For that reason the plugin is not running. On the wiki pages I can read that kendzi3d-jogl and log4j are requred, however, I cannot even find “kendzi3d-jogl” anywhere.

So I wonder how so many users have simply installed the tool from the plugins list without issues. Any hint how to fix that?

Plugin “kendzi3d-jogl” was renamed to “jogl” it should be in version 1.1.0. But all needed plugins should be automatically installed after you chose kendzi3d. Please check if you have installed my version 1.0.196 of “kendzi3d”. Plugin named “kendzi3d_Improved_by_Andrei” as I known is no longer supported.

It should be possible to install my plugin without problems, I test it on few computers and never fount problems, except of outdated graphic drivers. So if wont be working please send output form console.

Maybe this helps?

- E: org.openstreetmap.josm.plugins.
PluginException: An error occurred in plugin kendzi3d.
Cause: java.lang.reflect.InvocationTargetException.
Cause: com.google.common.util.concurrent.
UncheckedExecutionException: com.google.common.util.concurrent.
UncheckedExecutionException: java.lang.
SecurityException: attempted to open sandboxed jar file:/C:/Users/<user.name>/AppData/Roaming/JOSM/plugins/jogl/lib/jogl-2.3.2/jogl-all-2.3.2.jar as a Trusted-Library.
Cause: com.google.common.util.concurrent.
UncheckedExecutionException: java.lang.
SecurityException: attempted to open sandboxed jar file:/C:/Users/<user.name>/AppData/Roaming/JOSM/plugins/jogl/lib/jogl-2.3.2/jogl-all-2.3.2.jar as a Trusted-Library.
Cause: java.lang.
SecurityException: attempted to open sandboxed jar file:/C:/Users/<user.name>/AppData/Roaming/JOSM/plugins/jogl/lib/jogl-2.3.2/jogl-all-2.3.2.jar as a Trusted-Library

Looks like you are using webstart. From java 8 it require some additional sigh of components. I do not support it. Please try to use standalone version of JOSM.

Yes, I do. A few years ago I changed from updating manually to the webstart version.
I will try. Thanks for the hint.

Works. That was the issue. Thanks.

Hi all!
I experimented a bit with the Collada/DAE Export of Kendzi3D and I created two Blender/Python scripts which helped me to handle the objects a bit better. I’ll share the scripts here in case somebody can make use of it.

Script 1 is “merge_materials.py”. The imported 3D models uses separate material names for each object. This script merges & renames all materials based on their texture name (file name) or Diffuse color if no texture is assigned. The script will work on all objects & materials in the blender project which follow the typical naming of ID__nnnnn:

import bpy
import re

scene = bpy.context.scene

# only search on own object materials
matchid = re.compile(r'^ID__(\d+|\d+\.\d+)$')	#match osm building objects
matchmat = re.compile(r'^ID_material_[0-9.]+$') 	#match osm material
cleanprefix = "mat_"

ids = [obj for obj in scene.objects if matchid.match(obj.name)]

print("go")

bpy.ops.object.mode_set(mode='OBJECT') #works only in Object mode

for ob in ids:
	bpy.context.scene.objects.active = ob  #for bpy.ops.object.* methods to work
	
	remove_slots = []
	if ob.type == "MESH":
		print("obj: "+ob.name)
	
	mslots = [s.name for s in ob.material_slots] #just use names because slots may move because of append
	
	for sname in mslots:
		slist = [ms for ms in ob.material_slots if ms.name==sname]
		if matchmat.match(sname) and (len(slist)>0):
			s = slist[0]
			print("  mat: "+sname)
			
			dc=s.material.diffuse_color
			cleanMatName = ("%scolor_%02x%02x%02x" % (cleanprefix, int(255*dc[0]),int(255*dc[1]),int(255*dc[2])))
			if (s.material.active_texture is not None) and (s.material.active_texture.type=='IMAGE'):
#					print("    tex: "+s.material.active_texture.image.name)
				cleanMatName = cleanprefix + s.material.active_texture.image.name
					
			if sname!=cleanMatName:
				if bpy.data.materials.get(cleanMatName) is None:
					#doesn't exist -> make this the new "clean" material, just rename it
					print("     just rename -> "+cleanMatName)
					s.material.name=cleanMatName 
				else: 
					#exists -> assign "wrong" material/faces to existing "clean" material and remove "wrong" material
					wrongMatName = sname
					
					cleanMat = bpy.data.materials.get(cleanMatName)
					# check if "clean" material is missing in objects materials
					if not (cleanMatName in [slot.material.name for slot in ob.material_slots]):
						print("     add material slot for "+cleanMatName)
						ob.data.materials.append(cleanMat)
						#object s becomes invalid from here on
						#alternatives: obs.data.active_material = cleanMat or bpy.ops.object.material_slot_add()
						
					mat_list = [x.material.name for x in ob.material_slots] #"up to date" mat_list
						
					index_clean = mat_list.index(cleanMatName)
					index_wrong = mat_list.index(wrongMatName)
					print("      reassign "+wrongMatName+"->"+cleanMatName+" ",index_wrong, index_clean)
					print("      done")

					# get the faces which are assigned to the 'wrong' material
					faces = [x for x in ob.data.polygons if x.material_index == index_wrong]

					
					for f in faces:
						f.material_index = index_clean

					remove_slots.append(wrongMatName)

	# now remove all empty material slots:
	for s in remove_slots:
		if s in [x.name for x in ob.material_slots]:
			print('  removing slot %s' % s)
			ob.active_material_index = [x.material.name for x in ob.material_slots].index(s)
			bpy.ops.object.material_slot_remove()

print("cleanup")
#remove all non-used materials
for material in bpy.data.materials:
	if (not material.users) and (matchmat.match(material.name)):
		print(' removing material %s' % material.name)
		bpy.data.materials.remove(material)
 

The second script will try to join all meshes of i.e. a building. So it will join ID_100 with ID_100.001 and ID_100.002 etc. This will help reduce the number of objects and hopefully makes the handling of especially buildings easier:


import bpy
import re

def rename_uv(obj,name):
    count=0
    for uvmap in obj.data.uv_layers:
        if count==0:
            uvmap.name = name
        else:
            uvmap.name = ("%s_%03d" % (name,count) )


scene = bpy.context.scene

matchid = re.compile(r'^ID__\d+$')

ids = [obj for obj in scene.objects if matchid.match(obj.name)]
print("go")

for ob in ids:
    if ob.type == "MESH":
        for obj in bpy.data.objects: #slow but make sure we begin with no selected objects
            obj.select = False
        print(ob.name + "\n")
        subobjs=[obj for obj in scene.objects if re.match(ob.name+"\\.\\d\\d\\d",obj.name)]
        count=0
        for subob in subobjs:
            if subob.type == "MESH":
                print(" +"+subob.name + "\n")
                count+=1
                subob.select = True
                rename_uv(subob,'UVMap')
                
        if count>0:            
            ob.select = True
            rename_uv(ob,'UVMap')
            bpy.context.scene.objects.active = ob
            bpy.ops.object.join()    


When selecting “Load textures from wiki” I get this error:

What am I doing wrong?

When starting the JOSM program, the Kendzi3D - 3D Viewer as plugin for JOSM module opens simultaneously with the program, and when opening any layer of snapshots, similarly, how to fix it?

@kendzi
As discussed in other thread recently, the regular Kendzi3d would not install/load in JOSM, but the Kendzi3d-dev did work. Since about 5-7 days got a load warning for the dev version as well. Retrying ‘stable’ Kendzi3d does not load i.e. no 3D inside JOSM ATM. JOSM stable itself has been and still is 18822 since 2 months i.e. the client has not changed FAIK.

cheers