Author Topic: Corona + Blender Particles/Hair  (Read 6607 times)

2016-12-09, 18:28:16

thiagodesul

  • Active Users
  • **
  • Posts: 8
    • View Profile
Hello, i can't render my scene using blender's default particle system to scatter some objects onto a plane.

2016-12-09, 21:45:10
Reply #1

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 380
    • View Profile
    • Blender exporter for Corona
I know hair works and the explode withe particles works, will check out the particles soon.

2016-12-10, 01:55:03
Reply #2

burnin

  • Active Users
  • **
  • Posts: 835
    • View Profile
To confirm, also got errors here.
System: Windows 7, Blender 2.78a, Corona SA 2016-10-24, exporter 2.4.6

Full scene gives me:
Code: [Select]
Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 353, in render
    render_start( self, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 38, in render_start
    render_scene( engine, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 188, in render_scene
    bpy.ops.corona.export_scene()
  File "C:\programi\b278\2.78\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Something went wrong, unable to write .scn file. Check directory permissions of export directory.


location: <unknown location>:-1

after disabling "Cube_Particles" (Leaving "Plain_Hair") get this error:
Code: [Select]
Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 353, in render
    render_start( self, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 38, in render_start
    render_scene( engine, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 188, in render_scene
    bpy.ops.corona.export_scene()
  File "C:\programi\b278\2.78\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Something went wrong, unable to write .scn file. Check directory permissions of export directory.


location: <unknown location>:-1

Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 353, in render
    render_start( self, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 38, in render_start
    render_scene( engine, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 192, in render_scene
    result = bpy.ops.corona.export()
  File "C:\programi\b278\2.78\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\operators\export.py", line 41, in execute
    result = export(self, scene, placeholders)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 292, in export
    return _write(self, scene, filepath, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 315, in _write
    result = future.result(timeout = None)
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\_base.py", line 405, in result
    return self.__get_result()
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\_base.py", line 357, in __get_result
    raise self._exception
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 338, in _export_object
    return decide_format( self, full_path, obj, scene, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 260, in decide_format
    return write_obj( self, obj_path, obj, scene, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 438, in write_obj
    debug("Link", ob.material_slots.link)
AttributeError: 'bpy_prop_collection' object has no attribute 'link'

location: C:\programi\b278\2.78\scripts\modules\bpy\ops.py:189



location: <unknown location>:-1

after disabling also Plain_Hair, i only get a render of "PlainColiderBelow".

"ParticlesHair0001" Cycles Render & Scene file attached.

Also, missing are options in Properties Editor for:
- Render Layers (only Corona Render Passes are available)
- Physics (empty)

2016-12-10, 11:02:48
Reply #3

thiagodesul

  • Active Users
  • **
  • Posts: 8
    • View Profile
I'm attaching my file. Corona exporter 2.4.6


2016-12-10, 16:10:29
Reply #4

burnin

  • Active Users
  • **
  • Posts: 835
    • View Profile
Tested the thiagodesul's scene.
Error appears:
Code: [Select]
Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 353, in render
    render_start( self, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 38, in render_start
    render_scene( engine, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 188, in render_scene
    bpy.ops.corona.export_scene()
  File "C:\programi\b278\2.78\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Something went wrong, unable to write .scn file. Check directory permissions of export directory.


location: <unknown location>:-1


Error appears even after the modifier is applied, specifically until it is removed from the scene.
Then it renders without problem, indeed :)

*note: EXR env. linked replaced by Sun&Sky, only diffuse mat. used, removed sub modifier, contrast upped by 5
« Last Edit: 2016-12-10, 16:14:12 by burnin »

2016-12-10, 16:40:58
Reply #5

thiagodesul

  • Active Users
  • **
  • Posts: 8
    • View Profile
Ok! So, the problem was the subdivision surface modifier? Thanks!

2016-12-10, 16:59:25
Reply #6

jKLman

  • Active Users
  • **
  • Posts: 66
    • View Profile
Here is my test....
But it would be good if these can be done without applying the modifier and stays as changeable.

"Jack of all trade, but messing up with 3D"
Blender 2.78 Corona Standalone 1.5 / 2016-10-24 Alpha
Win 10 64bit

2016-12-10, 17:01:55
Reply #7

thiagodesul

  • Active Users
  • **
  • Posts: 8
    • View Profile
Tested the thiagodesul's scene.
Error appears:
Code: [Select]
Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 353, in render
    render_start( self, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 38, in render_start
    render_scene( engine, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 188, in render_scene
    bpy.ops.corona.export_scene()
  File "C:\programi\b278\2.78\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Something went wrong, unable to write .scn file. Check directory permissions of export directory.


location: <unknown location>:-1


Error appears even after the modifier is applied, specifically until it is removed from the scene.
Then it renders without problem, indeed :)

*note: EXR env. linked replaced by Sun&Sky, only diffuse mat. used, removed sub modifier, contrast upped by 5



Hello, it's still not working here. Removed the modifiers and the exr file and changed to Sun+Sky and still got errors. What do you suggest?

2016-12-10, 17:28:04
Reply #8

thiagodesul

  • Active Users
  • **
  • Posts: 8
    • View Profile
Dupli Verts and faces aren't working too.

2016-12-12, 08:15:49
Reply #9

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 380
    • View Profile
    • Blender exporter for Corona
Please try again with latest version v2.4.7 and let me know how you go.  Apologies for the delay in looking into this!

2016-12-12, 16:10:03
Reply #10

burnin

  • Active Users
  • **
  • Posts: 835
    • View Profile
Hi and thanks.
No problem about the delay. Hope you had a nice weekend.

Particles are partially working :D


Set to Emitter:
No properties get assigned, except some Physics translations (not rotation).
ie:
- Original object used as Dupli Object & Emitter are automatically hidden (not rendered).
- Velocity Rotations - not respected
- Render: Emitter, Parent, Unborn & Died - not respected/not rendered
- Children - not respected/not rendered
- Physics...


Set to Hair:
Render set to Objects does work but is having same problems (no respect for other properties than Physics).
Path, still gives the error:
Code: [Select]
Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 353, in render
    render_start( self, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 38, in render_start
    render_scene( engine, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 192, in render_scene
    result = bpy.ops.corona.export()
  File "C:\programi\b278\2.78\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\operators\export.py", line 41, in execute
    result = export(self, scene, placeholders)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 292, in export
    return _write(self, scene, filepath, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 315, in _write
    result = future.result(timeout = None)
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\_base.py", line 405, in result
    return self.__get_result()
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\_base.py", line 357, in __get_result
    raise self._exception
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 338, in _export_object
    return decide_format( self, full_path, obj, scene, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 256, in decide_format
    return write_binary_obj( self, obj_path, obj, scene, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 838, in write_binary_obj
    meshes.extend( get_hairs(ob, scene, psys, crv_ob, crv, material, mesh))
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 106, in get_hairs
    debug("uv on emitter", psys.uv_on_emitter(mod, psys.particles[0]))
RuntimeError: Error: Mesh has no UV data


location: C:\programi\b278\2.78\scripts\modules\bpy\ops.py:189



location: <unknown location>:-1




« Last Edit: 2016-12-12, 16:17:02 by burnin »

2016-12-12, 21:59:32
Reply #11

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 380
    • View Profile
    • Blender exporter for Corona
If you add a UV to the emitter does your hair test work again?

2016-12-12, 22:01:39
Reply #12

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 380
    • View Profile
    • Blender exporter for Corona
Set to Emitter:
No properties get assigned, except some Physics translations (not rotation).
ie:
- Original object used as Dupli Object & Emitter are automatically hidden (not rendered).
- Velocity Rotations - not respected
- Render: Emitter, Parent, Unborn & Died - not respected/not rendered
- Children - not respected/not rendered
- Physics...

I will have a look at these to see what I can do.   Thanks for pointing them out, I need people that are good with blender to show me features that don't work yet :P

2016-12-13, 07:02:04
Reply #13

burnin

  • Active Users
  • **
  • Posts: 835
    • View Profile
If you add a UV to the emitter does your hair test work again?

Yup, UVs unwrapped. No go.

A - If Binary Mesh Export is disabled i get an error:
Code: [Select]
Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 353, in render
    render_start( self, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 38, in render_start
    render_scene( engine, scene)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\engine.py", line 192, in render_scene
    result = bpy.ops.corona.export()
  File "C:\programi\b278\2.78\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\operators\export.py", line 41, in execute
    result = export(self, scene, placeholders)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 292, in export
    return _write(self, scene, filepath, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 315, in _write
    result = future.result(timeout = None)
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\_base.py", line 405, in result
    return self.__get_result()
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\_base.py", line 357, in __get_result
    raise self._exception
  File "C:\programi\b278\2.78\python\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 338, in _export_object
    return decide_format( self, full_path, obj, scene, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 260, in decide_format
    return write_obj( self, obj_path, obj, scene, curves)
  File "C:\Users\py\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\render_corona\export.py", line 438, in write_obj
    debug("Link", ob.material_slots.link)
AttributeError: 'bpy_prop_collection' object has no attribute 'link'

location: C:\programi\b278\2.78\scripts\modules\bpy\ops.py:189



location: <unknown location>:-1




B - If Binary Mesh Export is enabled:
Scene gets exported but no Hair geometry is rendered (no hair/strands (thick or ribbons), no emitter).
Triangulation (either checking Corona settings or using modifier) doesn't help either.


PS
For the time being (investigating), could you make Layers under Scene Properties & Physics available (both in Properties Editor)... it's a workflow bugger, switching to Cycles and back to Corona.

If you need any specifics or other stuff tested, just let me know. I don't mind, hopping am not PITA, bothering you.
Simple scene attached + Cycles render as a reference.

2016-12-14, 08:03:47
Reply #14

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 380
    • View Profile
    • Blender exporter for Corona

A - If Binary Mesh Export is disabled i get an error:


B - If Binary Mesh Export is enabled:
Scene gets exported but no Hair geometry is rendered (no hair/strands (thick or ribbons), no emitter).
Triangulation (either checking Corona settings or using modifier) doesn't help either.


PS
For the time being (investigating), could you make Layers under Scene Properties & Physics available (both in Properties Editor)... it's a workflow bugger, switching to Cycles and back to Corona.


Using the latest version v2.4.8:
A (Binary mesh disabled) I get the attached.
B (Binary  mesh enabled) for me crashes corona (I have raised a bug for this)

Having a scene like this setup and ready to test makes it very easy on my end to fix issues so thanks very much!

Layers and Physics have been enabled for scene I think if there are any others they are fairly quick to add if I can find the right property in the doco.

Thanks for reporting!

2016-12-14, 18:58:05
Reply #15

burnin

  • Active Users
  • **
  • Posts: 835
    • View Profile
Using the latest version v2.4.8:
A (Binary mesh disabled) I get the attached.
B (Binary  mesh enabled) for me crashes corona (I have raised a bug for this)

Having a scene like this setup and ready to test makes it very easy on my end to fix issues so thanks very much!

Layers and Physics have been enabled for scene I think if there are any others they are fairly quick to add if I can find the right property in the doco.

Thanks for reporting!
Thank you!

Working and crashing :D
Confirming the same.

1. Do you know if devel/debug mode in Corona SA can be enabled for bug reports?

2. Corona Hair Rendering > Resolution  -  Doesn't do anything. Resolution is always same (as set to 0). /// Will test more stuff in detail and make better, proper report ;)

Stay well.
3. Physics still doesn't show up.

2016-12-14, 21:21:46
Reply #16

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 380
    • View Profile
    • Blender exporter for Corona
1. Corona_Assert.exe has checks but runs slower. It displays multiple errors right now.

2. It is used when creating the thick curve in Blender as the bevel_resolution and the resolution_u is hard coded to 1 I will need to lookup what they mean.

3.Maybe a screenshot I can't find the panel you want sorry.

2016-12-15, 14:16:44
Reply #17

burnin

  • Active Users
  • **
  • Posts: 835
    • View Profile
Ah, thanks, that's nice to know.

... and the screenshot of Physics (Properties Editor):


laters ;)

2016-12-15, 14:19:50
Reply #18

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 380
    • View Profile
    • Blender exporter for Corona
I think that was already enabled. At least in Blender 2.77 it is. Will check on 2.78 tomorrow
« Last Edit: 2016-12-16, 03:41:02 by blanchg »

2016-12-16, 03:45:32
Reply #19

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 380
    • View Profile
    • Blender exporter for Corona
Apologies this has been changed in 2.78, I am in the middle of looking at the binary export and UV/No UV so it might take me a day or two to get it added.