vsitzmann / shapenet_renderer

A clean, compact renderer for spherical images of shapenet objects in blender <2.8.
MIT License
75 stars 18 forks source link

Parameters to render SRN dataset #1

Open psguo opened 3 years ago

psguo commented 3 years ago

Hi! Could you share some key parameters (listed below) used to render the same Chairs/Cars dataset presented in SRN paper?

1. sphere radius (distance to object)
2. light properties (like how many, direction, intensity, etc.)
3. other relevant parameters if necessary
ventusff commented 3 years ago

This is also what I'm looking for! Especially for the scaling parameters/settings.

Done some tedious research to align shapenet v2 models with original SRN datasets, but there are some weird scaling issues that I can not make right. Need to know the original scaling parameter of SRN chairs_train datasets.

ventusff commented 3 years ago

@psguo As for the sphere radius, it can be infered from the poses. For example, for chairs_train, np.linalg.norm(c2w[...,:3,3], axis=-1) is constant at 1.3, so the sphere radius is 1.3. And similarly for chairs_train_2.0, the sphere radius is 2.0

ventusff commented 3 years ago

UPDATE: I've found how the shapenet models are scaled to render the original SRN datasets!!!!!!!

I found it out by tring to think in his situation about how he would scale the models to make the renderings better to train.

amanikiruga commented 1 month ago

For the lighting parameters. I changed them around to get something similar to SRN at least for the cars category:

lamp1 = bpy.data.lamps['Lamp']
lamp1.type = 'SUN'
lamp1.shadow_method = 'NOSHADOW'
lamp1.use_specular = False
lamp1.energy = 1.33
lamp1_obj = bpy.data.objects['Lamp']
lamp1_obj.rotation_euler = (math.radians(90), 0, math.radians(180)) # pointing from the top 

bpy.ops.object.lamp_add(type='SUN')
lamp2 = bpy.data.lamps['Sun']
lamp2.shadow_method = 'NOSHADOW'
lamp2.use_specular = False
lamp2.energy = 0.1
bpy.data.objects['Sun'].rotation_euler = (math.radians(0), 0, 0)

bpy.ops.object.lamp_add(type='SUN')
lamp2 = bpy.data.lamps['Sun.001']
lamp2.shadow_method = 'NOSHADOW'
lamp2.use_specular = False
lamp2.energy = 0.1
bpy.data.objects['Sun.001'].rotation_euler = (math.radians(0), 90, 0)

bpy.ops.object.lamp_add(type='SUN')
lamp2 = bpy.data.lamps['Sun.002']
lamp2.shadow_method = 'NOSHADOW'
lamp2.use_specular = False
lamp2.energy = 0.1
bpy.data.objects['Sun.002'].rotation_euler = (math.radians(0), 180, 0)

bpy.ops.object.lamp_add(type='SUN')
lamp2 = bpy.data.lamps['Sun.003']
lamp2.shadow_method = 'NOSHADOW'
lamp2.use_specular = False
lamp2.energy = 0.1
bpy.data.objects['Sun.003'].rotation_euler = (math.radians(0),270, 0)