AndrewAndrew Posted April 6, 2018 Share Posted April 6, 2018 Hello, i just started using babylonjs, I wanted to achieve this result, but unfortunately I'm having some troubles. could anyone please show me the way? mesh.mtl mesh.obj Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2018 Share Posted April 6, 2018 Hello, what is your code? What rendering do you get? Quote Link to comment Share on other sites More sharing options...
AndrewAndrew Posted April 7, 2018 Author Share Posted April 7, 2018 Sorry, forgot to paste the link.. http://www.babylonjs-playground.com/#LB4MVX Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 7, 2018 Share Posted April 7, 2018 Hi AA, and welcome. If I may butt-in... https://www.babylonjs-playground.com/#LB4MVX#2 Line 26... convert to flat shaded... seems to improve the "look". Is this what you're seeking, AA? Hope so. No shadow generator needed, but I really like your inventive mind... trying to use a shadow generator with self-shadows... to get the facet shades. That's... pretty cool. Very creative. AndrewAndrew 1 Quote Link to comment Share on other sites More sharing options...
AndrewAndrew Posted April 7, 2018 Author Share Posted April 7, 2018 2 minutes ago, Wingnut said: Hi AA, and welcome. If I may butt-in... https://www.babylonjs-playground.com/#LB4MVX#2 Line 26... convert to flat shaded... seems to improve the "look". Is this what you're seeking, AA? Hope so. That was exactly what i was looking for. Thank you for your answer and for the welcome! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 7, 2018 Share Posted April 7, 2018 Cool. I noticed... that when I was typing line 26... I typed... mesh.con At that point, the playground's intellisense SHOULD have offered "convertToFlatShadedMesh" as a 'completion' choice. It wasn't on the intellisense list. We use the playground's Intellisense/completion system as a resource discovery helper, and in this case, there was no chance for you to discover that command... in that way. Can anyone explain why CTFSM() wasn't offered in the intelli-list, at that point? In a docs search... "flat", "flat shaded" ... not good returns. AA didn't stand a chance of self-finding that little secret method-call. As a community, we should think about how to make convertToFlatShadedMesh() a little easier for folks to find. I hope you didn't burn TOO many hours... looking for this command, AA. Sorry about that. I'm going to think about ways to document this better, if possible. hmmm. Quote Link to comment Share on other sites More sharing options...
AndrewAndrew Posted April 7, 2018 Author Share Posted April 7, 2018 Just now, Wingnut said: Cool. I noticed... that when I was typing line 26... I typed... mesh.con At that point, the playground's intellisense SHOULD have offered "convertToFlatShadedMesh" as a 'completion' choice. It wasn't on the intellisense list. We use the playground's Intellisense/completion system as a resource discovery helper, and in this case, there was no chance for you to discover that command... in that way. Can anyone explain why CTFSM() wasn't offered in the intelli-list, at that point? In a docs search... "flat", "flat shaded" ... not good returns. AA didn't stand a chance of self-finding that little secret method-call. As a community, we should think about how to make convertToFlatShadedMesh() a little easier for folks to find. I hope you didn't burn TOO many hours... looking for this command, AA. Sorry about that. I'm going to think about ways to document this better, if possible. hmmm. I think its because the "mesh" object gets interpreted as AbstractMesh, and there's no such function defined, I'm coding in Typescript so I simply casted the mesh as Mesh and it popped out! let mesh: Mesh = <Mesh>meshes[0]; Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 7, 2018 Share Posted April 7, 2018 Ahh, ok, thank you! Well done! A fun thing... https://www.babylonjs-playground.com/#LB4MVX#3 When ya flat-shade a sphere, lighting gets more fun... due to the color summing of the facets (hunh)? Sometimes fun to see the colors. AndrewAndrew 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 7, 2018 Share Posted April 7, 2018 Ok, heck, we deserve some MORE colors, right? https://www.babylonjs-playground.com/#LB4MVX#4 Your mesh is leaking SOMETHING from the vertex rivets. hmm. AndrewAndrew 1 Quote Link to comment Share on other sites More sharing options...
AndrewAndrew Posted April 7, 2018 Author Share Posted April 7, 2018 2 minutes ago, Wingnut said: Ok, heck, we deserve some MORE colors, right? https://www.babylonjs-playground.com/#LB4MVX#4 Your mesh is leaking SOMETHING from the vertex rivets. hmm. DISCO BABYLON, just add some trippy music and we're good to go Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 7, 2018 Share Posted April 7, 2018 https://www.babylonjs-playground.com/#LB4MVX#5 Better mousewheel sensitivity. Mousewheel inside the sphere... I have the camera minZ set real low. It looks totally cool, from inside view. Weird. Don't forget control-dragging, to slew-around the arcCam target/pivotPoint. FUN! Like you needed all this "artsy" in your thread, eh? Quote Link to comment Share on other sites More sharing options...
AndrewAndrew Posted April 7, 2018 Author Share Posted April 7, 2018 2 minutes ago, Wingnut said: https://www.babylonjs-playground.com/#LB4MVX#5 Better mousewheel sensitivity. Mousewheel inside the sphere... I have the camera minZ set real low. It looks totally cool, from inside view. Weird. Like you needed all this "artsy" in your thread, eh? If you pay enough attention you can see Tesla's starman somewhere out there Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.