Problem with display

Hi. I have aproblem with arcrotate camera can someone help me?. As you see in this

https://www.babylonjs-playground.com/#YP96X7

when drag mouse down the cone does not show only his up side but a little from its body (side face) too… How can i resolve this?

Hi M. I think your arcRotate Camera is fine… but there is some problems with faceColors or the faceUVs for texturing.

Anyway… https://www.babylonjs-playground.com/#YP96X7#1

Here, I turned-off all “ambient” stuff and changed-to all “diffuse” stuff… which then needed a light. No probs there. Then I activated another cylinder… to act as an overlayed “wireframe”.

And I turned-off line 55, and activated line 56… creating a cylinder WITHOUT faceColors… for now. I also made the cylinder fatter and not so tall… and I reduced the tessellation to 8 (8-sided)… so 8 faceColors… WHEN we get it working, soon.

Anyway, I think we have found no problems with arcRotateCam… it seems to be working fine.

You want to TEXTURE the cone/cylinder, right? Or do you want to set a color on each of its faces?

The cylinder-texturing demo from the docs… has some faceColors set even for texturing the cylinder… which is goofy. I tried a version with NO faceColors used… only faceUVs… and it still works fine.

https://www.babylonjs-playground.com/#VA2AC#21

Anyway, your other thread was about putting an image on a cylinder… ie. texturing… so let’s stay on that subject… for now. At least we know your camera is working. Now we just need an image url, and some proper faceUVs set… and things MIGHT work, just like @jerome 's “jam can”. :slight_smile:

2 Likes

Hi again… as shown here…
https://www.babylonjs-playground.com/#YP96X7#1

when i change the height to something bigger not working again…
it works only if height is low and diameter big

same example shown here

https://www.babylonjs-playground.com/#VA2AC#22

Is this what you need?

https://www.babylonjs-playground.com/#YP96X7#3

in line 20 I’ve set camera.lowerBetaLimit to 0 which helps extend beta rotation so you can see only top of the cylinder

Yes !!! thats what i need!!! But i want this on the other side too…

And camera.upperBetaLimit = Math.PI;
at line 21 :slight_smile:
https://www.babylonjs-playground.com/#YP96X7#5

By the way. I suggest using value like 0.00001. Because I\ve noticed when you clip lowerBeta to 0, rotation of the ArcCamera switches (so if you were rotating CW, now you will be rotationg CCW). So value like above will not change how the object is displayed but will solve that rotation issue.

And yes like labris said, upperBetaLimit = Math.PI

1 Like

YOU ARE FANTASTIC!!! Thanks a lot!!!

1 Like

Hi guys. I don’t see any cylinder at all… in #YP96X7#3 and #YP96X7#5.

Am I supposed-to? Am I “losing it”, in more than one way? :slight_smile: I could be going senile… quite possible.

I CAN see https://www.babylonjs-playground.com/#VA2AC#22, though.

Look if you open the link from pc the cylinder is there,… if you open from phone… there is no cylinder… i don;t know why…

I’m on PC… mid-sized Dell - Win 7 - Firefox 60esr. hmm.

It’s something lighting-related. Ambient “stuff” vs. diffuse stuff.

Pretty rare to see two hemispheric lights in one scene, too. Mostly, folks just aim them straight up at the sky, and then use hemi.groundColor = something color3 gray… to light the mesh bottoms.

shrug. I saw the double hemis on #VA2AC#22. It is a “diffuse-based” scene which I can view fine, here. The #3 and #5 are no-light… using “ambi” instead-of “diffi” :slight_smile:

Just like before… if I remove the faceColors parameter from line 55 (and use 56 instead)… I can see the cylinder again. “Hi there, ambient-lit cylinder. Long-time, no-see.” :slight_smile:

1 Like