stnight99 Posted January 12, 2015 Share Posted January 12, 2015 Hello guys, I'm currently working with blender (noob here) and trying to make a glowing objects, I finally created one by using Emission from Cycle Render.Please Click here for the imageBut when I exported it to .babylon file and render it on my browser / nodewebkit, I only got this:Please Click here for the image Could someone explain to me the proper process of exporting of an emitting objects on BabylonJS? Thanks Quote Link to comment Share on other sites More sharing options...
iiceman Posted January 12, 2015 Share Posted January 12, 2015 Well, I don't know about the exporting, but I guess you could always achieve something like this with some additional code. You want something like that ... http://www.babylonjs-playground.com/#1HECPU ... right? Quote Link to comment Share on other sites More sharing options...
gryff Posted January 12, 2015 Share Posted January 12, 2015 Hi stnight99 - welcome to the BJS forum. As far as I know, the Cycles renderer uses two types of shader systems - Shader Virtual Machine and Open Shader Language (from Sony) . The Babylon Exporter for Blender can not translate these directly to something compatible with BJS. You have to use the Blender Renderer. That said, as of Blender 2.71, you have the ability to "bake" out textures for UV mapped objects from the Cycles renderer. Take a look at these YouTube videos: Introduction to cycles baking by Andrew Price. (He tends to be a little exuberant , but in the latter part of the video has an interesting example of glass and caustics.) How to bake textures in cycles The drawback of course is that using textures will not reflect things like animated lighting or objects (meshes). Not sure if that helps your problem. But experiment and please, if you do, give us feedback on your results. cheers, gryff Quote Link to comment Share on other sites More sharing options...
stnight99 Posted January 13, 2015 Author Share Posted January 13, 2015 @iicemanWell, I don't know about the exporting, but I guess you could always achieve something like this with some additional code. You want something like that ... http://www.babylonjs-playground.com/#1HECPU ... right? yes i want to achieve something like that, but i'm not sure if i could select a mesh from the exported scene from blender to modify the behavior and the output. Let me try that method. @gryffHi stnight99 - welcome to the BJS forum. As far as I know, the Cycles renderer uses two types of shader systems - Shader Virtual Machine and Open Shader Language (from Sony) . The Babylon Exporter for Blender can not translate these directly to something compatible with BJS. You have to use the Blender Renderer. That said, as of Blender 2.71, you have the ability to "bake" out textures for UV mapped objects from the Cycles renderer. Take a look at these YouTube videos: Introduction to cycles baking by Andrew Price. (He tends to be a little exuberant , but in the latter part of the video has an interesting example of glass and caustics.) How to bake textures in cycles The drawback of course is that using textures will not reflect things like animated lighting or objects (meshes). Not sure if that helps your problem. But experiment and please, if you do, give us feedback on your results. cheers, gryff thanks for the resources, yeah i'm going to try it, i just want to achieve to create a sun-like object that would change its color by javascript or by animation from blender, and of course change its position. Thanks guys for your response. Quote Link to comment Share on other sites More sharing options...
dbawel Posted January 13, 2015 Share Posted January 13, 2015 Hello stnight99, I'm curious if you were able to generate the results you wanted. Both gryff and Iceman provided you with the answers as well as additional info on the Blender renderers to accomplish what you appear to be looking for as a rendered result. I just wanted to make certain that I understood the question/problem. It looks straight forward, however we haven't yet heard the result. I learned from gryff a while back tat if you want to export .babylon files from Blender, then you need to begin building your scene in Blender from step one using the Blender renderer - otherwise, the exported .babylon file may not render. And this can occur if you affect objects (i.e. unwrap UVs) using a different renderer and then switch to the Blender renderer just before export. Now I always make sure I'm using the Blender renderer for all operations in Blender, and have had no further problems. So if you have not yet solved this, simply start with a new scene, and rebuild the object(s) from scratch using the Blender renderer and export. Please post if you've solved the problem. Cheers, DBawel Quote Link to comment Share on other sites More sharing options...
Supermitch Posted January 14, 2015 Share Posted January 14, 2015 I highly recommend to bake the illumination and/or shadowing, for performance issues (and to obtain a very clean and accurate rendering, also). Of course, if you're planning to animate the glowing object, you will have to think twice about the result you're waiting for. A long date solution is to create animated decals (Just like... well, the first Quake ?). Otherwise, you will have to code that, and PBR (physically based rendering) is not that simple ;-)... Quote Link to comment Share on other sites More sharing options...
pathogen Posted June 29, 2015 Share Posted June 29, 2015 I wonder if perhaps the OP was going for more of a 'halo' effect where the emissive colour glows beyond the object (which is what I was looking for when I found this post).I have found this topic on StackOverflow and will have a go at porting the shaders for use with Babylon. Quote Link to comment Share on other sites More sharing options...
iiceman Posted June 29, 2015 Share Posted June 29, 2015 Sounds cool, let us know how it is going and what you have achieved! Maybe the God Ray feature of babylon js is kinda similar to what you want to create? http://www.babylonjs-playground.com/?25 Quote Link to comment Share on other sites More sharing options...
pathogen Posted June 30, 2015 Share Posted June 30, 2015 Aha! So the shaders are trivial (simply a gradient), the crux of the 'halo' effect I posted about is in the compositing of one scene upon another with an alpha blend at the edge.In which case... is there a way to constrain the 'god rays' to the interior of an object (per mesh volumetric lighting)?Another way to get this effect would be to use the FresnelParameters /as long as/ the background is the same colour as the rightColor of the parameters... unless it would be trivial for the FresnelParameters to be adjusted to take a Color4.Or! Perhaps something could be done with post-processing!No answers yet, but there are possibilities Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 23, 2015 Share Posted December 23, 2015 http://www.babylonjs-playground.com/#1HECPU#3 Glow For Box i try make more with difference color iiceman 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 23, 2015 Share Posted December 23, 2015 Hey this is cool!!! what about contributing it into bjs? Quote Link to comment Share on other sites More sharing options...
jerome Posted December 23, 2015 Share Posted December 23, 2015 this last PG link freezes my two browsers FF and Chrome on my recent linux laptop here can't test Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 23, 2015 Share Posted December 23, 2015 @Dk Thanks . Tell me what need i do ? i think this need change direction blur postProcress Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 23, 2015 Share Posted December 23, 2015 deer @DK i can make required shader and make it with CutomPostProcress in PG if it help? deer @Jerome it is r u have any error ? Quote Link to comment Share on other sites More sharing options...
jerome Posted December 23, 2015 Share Posted December 23, 2015 no, no error displayedjust the browsers freezing... maybe because of my video card driver ? don't know 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.