Post by inventordave on Mar 4, 2021 1:49:05 GMT
Bizarrely, GitHub wasn't listing a number of files (specifically YAML files) in the repo, but I changed the filename to "xmas.yaml", and they all appeared - perhaps it's a subtle bug... Anyways, "xmas.yaml" is now in the repo on Github. "rt.exp.js" is my source file for experiments, look inside and stare in awe at the pig-awful hack job I attempted in the middle of the night hopped up on a bottle of whiskey and 4 cans of energy drink, to parse the YAML object stored in the global object "Data.yaml" (available in the developer console, obvs) into a scene (scenes are stored as a combination of a point_light (Data.l), a Camera (Data.c), and a group() containing all the shapes/meshes etc comprising the scene (Data.o). Now I've had some sleep, I've thought of a more sensible, more robust approach to parsing an arbitrary YAML object... The actual file I am working with is "xmas_modified.yaml", but the original "xmas.yaml" is there too.
If you were to examine "rt.exp.js", you might be able to tell I am doing some animation tests, specifically with transforming the Camera object. Something has gone wrong somewhere, because the effect i am getting multiplying the "from" vector by a transformation matrix mutated via rotation_x(), rotation_y() etc, then updating the Camera with Camera.setCTransform(...), then rendering a new frame is not... right.
An axis-aigned cube at the origin should look identical in perspective if the Camera.to is (0,0,0), and we swap between a Camera.from of (0,20,0) and (0,0,-20). It doesn't. Looking directly down on the cube from x,z=0 y=20, the cube appears much smaller than from x,y=0 z=20. What am I missing?? z,y=0, x=20 seems fine...
Oh, and btw, a matrix created by view_transform with the "from" point set to (0,n,0) cannot be inverted. Is there a good work-around for this?
If you were to examine "rt.exp.js", you might be able to tell I am doing some animation tests, specifically with transforming the Camera object. Something has gone wrong somewhere, because the effect i am getting multiplying the "from" vector by a transformation matrix mutated via rotation_x(), rotation_y() etc, then updating the Camera with Camera.setCTransform(...), then rendering a new frame is not... right.
An axis-aigned cube at the origin should look identical in perspective if the Camera.to is (0,0,0), and we swap between a Camera.from of (0,20,0) and (0,0,-20). It doesn't. Looking directly down on the cube from x,z=0 y=20, the cube appears much smaller than from x,y=0 z=20. What am I missing?? z,y=0, x=20 seems fine...
Oh, and btw, a matrix created by view_transform with the "from" point set to (0,n,0) cannot be inverted. Is there a good work-around for this?