Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycles scene reader [$80] #272

Open
Theverat opened this issue Jul 22, 2019 · 9 comments
Open

Cycles scene reader [$80] #272

Theverat opened this issue Jul 22, 2019 · 9 comments
Labels
bounty Has a bounty on https://www.bountysource.com/teams/luxcorerender/issues enhancement Additional feature

Comments

@Theverat
Copy link
Member

Theverat commented Jul 22, 2019

This project aims for compatibility with Cycles material/texture nodes, light settings, camera settings and so on. The Cycles scene reader is not a single class or function, but rather a project to fuse every part of BlendLuxCore closer with Cycles/Eevee by sharing properties where it makes sense and is possible.

Material Nodes

  • Support packed images
  • Support nested node groups
  • Support for more nodes (see the list of compatible/incompatible nodes below)
  • figure out how to make it possible to add shader nodes (diffuse BSDF etc.) while LuxCore engine is selected (currently they get hidden, apparently they have some check for the current engine in their poll() methods)
  • Improve the report about incompatible nodes. Maybe mark them in red in the node editor (with reset button)? Show the percentage of successfully converted nodes and maybe a statement like "The materials in this scene are too complicated for our node reader" when percentage is lower than x.
  • Handle malformed node setups the same way as Cycles. For example, if a shader is plugged into a color socket, Cycles seems to simply ignore it and use the default_value of the socket, while our converter currently produces an incorrect SDL output that will throw errors on render startup.

List of nodes

Nodes with strikethrough are unlikely to ever get supported or don't make sense in our shading system (e.g. a sky texture on a material).
Nodes with a checkmark are at least partially supported. Note that the support can be an approximation or unfinished.
Normal inputs of material nodes (for bump/normalmapping) are not supported yet.

Input
  • Ambient Occlusion
  • Attribute
  • Bevel
  • Camera Data
  • Fresnel
  • Geometry
    • Position
    • Normal
    • Tangent
    • True Normal
    • Incoming
    • Parametric
    • Backfacing
    • Pointiness
    • Random Per Island
  • Hair Info
  • Layer Weight
  • Light Path
  • Object Info
    • Location
    • Color
    • Object Index
    • Material Index
    • Random (only works if the object ID is -1 (random))
  • Particle Info
  • RGB
  • Tangent
  • Texture Coordinate
  • UV Map
  • Value
  • Wireframe
Shader
  • Add Shader
  • Anisotropic BSDF (rotation TODO)
  • Diffuse BSDF
  • Emission
  • Glass BSDF
  • Glossy BSDF
  • Hair BSDF
  • Holdout
  • Mix Shader
  • Principled BSDF (unsupported inputs: subsurface, subsurface radius, subsurface color, clearcoat roughness, transmission roughness, clearcoat normal, tangent)
  • Principled Hair BSDF
  • Principled Volume
  • Refraction BSDF
  • Subsurface Scattering
  • Toon BSDF
  • Translucent BSDF (TODO just an approximation right now)
  • Transparent BSDF
  • Velvet BSDF
  • Volume Absorption
  • Volume Scatter
Texture
  • Brick Texture
  • Checker Texture (only "Object" texture coordinates are supported. Textured scale is not supported)
  • Environment Texture (supported in world node trees)
  • Gradient Texture
  • IES Texture
  • Image Texture (Lots of stuff to do, only the basics work)
  • Magic Texture
  • Musgrave Texture
  • Noise Texture
  • Point Density
  • Sky Texture (supported in world node trees)
  • Voronoi Texture
  • Wave Texture
Color
  • Bright Contrast
  • Gamma
  • Hue/Saturation
  • Invert
  • Light Falloff
  • MixRGB (only the following modes are supported: Mix, Multiply, Add, Subtract, Divide)
  • RGB Curves
Vector
  • Bump
  • Displacement
  • Mapping
  • Normal
  • Normal Map
  • Vector Curves
  • Vector Displacement
  • Vector Transform
Converter
  • Blackbody (only non-textured temperature supported)
  • ColorRamp (only Linear and Constant interpolation modes are supported, the rest is exported as cubic interpolation. Only RGB is supported as color mode)
  • Combine HSV
  • Combine RGB
  • Combine XYZ
  • Map Range
  • Math (only the following modes are supported: Add, Subtract, Multiply, Divide, Greater Than, Less Than, Power, Absolute, Round, Modulo)
  • RGB to BW
  • Separate HSV
  • Separate RGB
  • Separate XYZ
  • Vector Math
  • Wavelength
Script
  • Script
Group

Supported.

Layout
  • Frame
  • Reroute

Object Settings

  • Use the camera ray visibility property of Cycles
  • Use the shadow ray visibility property of Cycles (export with shadow color (1, 1, 1) if shadow ray vis is disabled)
  • Use the motion blur properties of Cycles

Light/World Settings

Try to share as many properties with Cycles (or Eevee?) as possible. It should be relatively seamless to switch back and forth between Cycles, LuxCore and Eevee - if you change a light's brightness in one engine, the others should also reflect this change

  • World:
    • Without node tree
    • Background node (aka flat color)
    • Environment node (aka HDRI)
    • Sky texture node
  • Lights:
    • Eevee settings (used when use_nodes is disabled)
    • (Simple) node setups
    • Fix area light brightness difference caused by the fact that Cycles and Lux handle changes in surface area differently
    • Fix sun brightness difference when half angle > 0.05, where in LuxCore the distantlight is used, see How to achieve constant brightness with varying theta for distantlight? LuxCore#298
    • Implement Cycles spot light soft blending in Lux (currently they are slightly different)

Camera Settings

  • Default tonemapper should be linear, auto disabled, gain = 1
  • Enable clipping by default
  • Use Cycles DOF settings (f-stop etc.) and hide unsupported settings (e.g. blades)
  • Use "transparent film" property of Cycles
  • Support Cycles film exposure value (maybe add as an extra tonemapper entry, where the UI shows the Cycles property and uses a linear tonemapper behind the scenes)

Render Layer Settings

  • Sync AOV/pass settings when the "Use Cycles Settings" button is used

Related: #80


There is a $80 open bounty on this issue. Add to the bounty at Bountysource.

@Theverat Theverat added the enhancement Additional feature label Jul 22, 2019
@Theverat Theverat mentioned this issue Jul 22, 2019
58 tasks
@Theverat Theverat pinned this issue Sep 17, 2019
@neo2068
Copy link
Member

neo2068 commented Dec 22, 2019

I work on the converter for light/world settings in the cycles_lights branch.

@Theverat
Copy link
Member Author

Nice. By the way, last time I checked Eevee was not using node-based lights, so for the start we could just implement compatibility with them and ignore Cycles light node trees.

@Theverat
Copy link
Member Author

Theverat commented Feb 2, 2020

Please only update this issue when changes have been made to master, not in branches.
It should reflect the current state of support available in daily builds.

@Dade916 Dade916 changed the title Cycles scene reader Cycles scene reader [$50] Jun 5, 2020
@Dade916 Dade916 added the bounty Has a bounty on https://www.bountysource.com/teams/luxcorerender/issues label Jun 5, 2020
@Dade916 Dade916 changed the title Cycles scene reader [$50] Cycles scene reader [$65] Jun 16, 2020
@qclem23
Copy link

qclem23 commented Jun 19, 2020

I'm completely new to this and have no idea how it works. I need a light path node and I also need to use animated images as textures. I would like to help this project and I have already offered a small bounty and would gladly add more if I thought that I may see these features in the not too distant future. What is the time frame for this project? And can I offer a bounty for just these features?

@Theverat
Copy link
Member Author

Theverat commented Jun 22, 2020

Thank you for your support!

I need a light path node

For this, you should open a feature request here: https://github.com/LuxCoreRender/LuxCore/issues/new
But you will have to go into more detail about this, what kind of light path information exactly you need, so someone without knowledge of Cycles would understand it.

and I also need to use animated images as textures.

Do you mean image sequences? Or something like animated GIF?
I could add image sequence support to the Cycles scene reader.

What is the time frame for this project?

This project is a lot of work, so there is no concrete timeframe.
Many of the unsupported Cycles' features don't exist yet in LuxCore, so they need to be added there first before the scene reader can translate them.

And can I offer a bounty for just these features?

It is best to open one new issue per feature request. You can then place a bounty on the specific issue.

@qclem23
Copy link

qclem23 commented Jun 23, 2020 via email

@Dade916 Dade916 changed the title Cycles scene reader [$65] Cycles scene reader [$80] Aug 16, 2020
@odil24
Copy link
Contributor

odil24 commented Apr 1, 2021

Any news guys?☺

@Theverat
Copy link
Member Author

Theverat commented Apr 1, 2021

In v2.5:

  • The normal input of material nodes can now be used
  • Basic support for the bump node was added
  • Holdout shaders are now supported

@odil24
Copy link
Contributor

odil24 commented Apr 2, 2021

In v2.5:

  • The normal input of material nodes can now be used
  • Basic support for the bump node was added
  • Holdout shaders are now supported

Can you show us more about appeared features with an examples and screens? ☺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty Has a bounty on https://www.bountysource.com/teams/luxcorerender/issues enhancement Additional feature
Projects
None yet
Development

No branches or pull requests

5 participants