Jump to content

Indirect Lighting or Emissions from Cycle Render / Blender


stnight99
 Share

Recommended Posts

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 image

But 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

Link to comment
Share on other sites

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 :)

 

 

Link to comment
Share on other sites

@iiceman

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?

 

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.

 

@gryff

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 :)

 

 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. 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 ;-)...

Link to comment
Share on other sites

  • 5 months later...

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 :D

Link to comment
Share on other sites

  • 5 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...