Skip to content

Head scan scene doesn't look 3D in binocular view #1

@goatchurchprime

Description

@goatchurchprime

The head scan example looked flat to my eyes, so I separated it out into a greybox scene called simple_vr_binocular with the right controller joystick control to rotate, and which I could export to the Quest3. (I've also changed the shading to bring out more colours and structure.)

Image

It was still very flat.

I put in a couple of yellow markers in 3D to use as parallax reference points and confirmed it was a flat image.

Getting these shader things to work in VR with its binocular view isn't straightforward (see all the work that goes into making mirrors work), and it's not something I have ever done (I've wisely stayed away from it).

I made a quick hack to volume_shader.gdshader of the volume_layers_addon to add in the EYE_OFFSET value to the world camera.

void vertex() {
	world_position = VERTEX;
	world_camera = (inverse(MODELVIEW_MATRIX) * vec4(0, 0, 0, 1)).xyz; //object space
	//world_camera = ( CAMERA_MATRIX  * vec4(0, 0, 0, 1)).xyz; //uncomment this to raymarch in world space
	world_camera += EYE_OFFSET;
}

This produced a much more 3D looking visualization, but it's not right according to the parallax of my marker points. I don't know what I am doing here, because I thought that the two EYE offsets were already part of the CAMERA_MATRIX etc, but there might be some issue created by the scaling of the model by (-0.25,-0.5,-0.25) that this counteracts.

This sort of thing can only be properly debugged with a clean reference data set (of a dense cube or wire outline of crossed cylinders) where the alignment and positions of the geometry is obvious and easy to reproduce and specify, rather than some huge malformed fuzzy head model. (If we can prove there's an issue, we can submit a ticket to the godot_volume_layers project.

In addition, we could also talk about what kind of interface we want for these models. Arguably instancing this as something you pick up and throw round the room in VR isn't as good as putting it on a pedestal with some controls to rotate and set the colour thresholds of it. If it works, I also think being able to draw marker points into it that are in the head coordinate space could be useful in terms of facilitating communication between players.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions