mesh normals in cycles.xml and embedded (texture) files #40773

Closed
opened 2014-06-23 15:06:45 +02:00 by Patrick Rosendahl · 19 comments

Hi,
this patch adds vertex-normals to the polymesh and an option to embed files. Embedded_files will be hex-decoded and written to disk (if not already there), so they are available as textures. This enables users to create monolithic render files.
Rgds,
Patrick
mesh_normals_embedded_file.txt

Hi, this patch adds vertex-normals to the polymesh and an option to embed files. Embedded_files will be hex-decoded and written to disk (if not already there), so they are available as textures. This enables users to create monolithic render files. Rgds, Patrick [mesh_normals_embedded_file.txt](https://archive.blender.org/developer/F95353/mesh_normals_embedded_file.txt)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @PRosendahl

Added subscriber: @PRosendahl

Added subscribers: @ThomasDinges, @Sergey, @brecht, @mont29

Added subscribers: @ThomasDinges, @Sergey, @brecht, @mont29

Added subscriber: @fabio-1

Added subscriber: @fabio-1

I don't understand why these must be written to disk. Textures are loaded into RAM anyway, are they not?

I don't understand why these must be written to disk. Textures are loaded into RAM anyway, are they not?

The process is a bit more complicated. They are loaded into RAM when the scene is constructed. Until then they are just a reference to a file.

There is a mechanism to preload textures as "builtin". But that involves callbacks for parameters and the actual pixels. So it was easier to dump them to disk.

As said above, the render file is monolithic. But once loaded into Cycles, it dumps out the texture files into the same directory.
I find this procedure OK, but anyone can object to this.

The process is a bit more complicated. They are loaded into RAM when the scene is constructed. Until then they are just a reference to a file. There is a mechanism to preload textures as "builtin". But that involves callbacks for parameters and the actual pixels. So it was easier to dump them to disk. As said above, _the render file is monolithic_. But once loaded into Cycles, it dumps out the texture files into the same directory. I find this procedure OK, but anyone can object to this.

Adding vertex normals sounds fine, but it still needs some cleanup:

  • Follow the style used all over in Cycles, don't mix your own style in there.
  • Dead code is rather forbidden.

Embedded file support i'm really skeptical about. XML format used by Cycles was never meant to be used as an interchange container. If we want to do it, we need to go away from pure XML and do stuff more like .blend (why not simply to use .blend anyway?).

If others will be fine with such a thing, i'd still really suggest using the same stuff as used for embedded files and movies in blender_session.cpp. Would avoid creating files out of the control actually.

Adding vertex normals sounds fine, but it still needs some cleanup: - Follow the style used all over in Cycles, don't mix your own style in there. - Dead code is rather forbidden. Embedded file support i'm really skeptical about. XML format used by Cycles was never meant to be used as an interchange container. If we want to do it, we need to go away from pure XML and do stuff more like .blend (why not simply to use .blend anyway?). If others will be fine with such a thing, i'd still really suggest using the same stuff as used for embedded files and movies in blender_session.cpp. Would avoid creating files out of the control actually.

OK, please close this task.

OK, please close this task.

It seems there may be some misunderstanding, will ask about this offline.

It seems there may be some misunderstanding, will ask about this offline.

I'm trying to team up with @fabio-1 , he's working on the XML exporter that I did not know of before.
I think it makes sense to put everything together - no need for a plethora of separate patches.
Unfortunately there is no way to contact him via blender dev, so I sent him an invite to contact me on BA.
MAYBE you can create that contact.

About using .blend - think of 3rd party programs... There is no .blend-library.
XML is perfect for a quick-hack export (we did that for ZW3D). Contact me at BA and I send you a link of what we've archieved.

I'm trying to team up with @fabio-1 , he's working on the XML exporter that I did not know of before. I think it makes sense to put everything together - no need for a plethora of separate patches. Unfortunately there is no way to contact him via blender dev, so I sent him an invite to contact me on BA. _MAYBE_ you can create that contact. About using .blend - think of 3rd party programs... There is no .blend-library. XML is perfect for a quick-hack export (we did that for ZW3D). Contact me at BA and I send you a link of what we've archieved.

Here's the thing. Normals support is almost there, and could go to git real soon IMO. In this respect it kind of makes sense to separate the patches.

As for contacting @fabio-1, why not just start a ML discussion in bf-cycles mailing list to gather all interested people together. Perhaps he's also in that list.

EDIT: Eeh, forgot to mention. .blend was just one of the possible ideas. Just in practice binary formats works MUCH better than ASCII ones. Also, wouldn't mind if someone finally makes .blend file reader library :)

Here's the thing. Normals support is almost there, and could go to git real soon IMO. In this respect it kind of makes sense to separate the patches. As for contacting @fabio-1, why not just start a ML discussion in bf-cycles mailing list to gather all interested people together. Perhaps he's also in that list. EDIT: Eeh, forgot to mention. .blend was just one of the possible ideas. Just in practice binary formats works MUCH better than ASCII ones. Also, wouldn't mind if someone finally makes .blend file reader library :)

Sure, if I had the time. Unfortunately not the case, but I am willing to help yall.

For completeness sake UV should be added as well but I didnt find any sample code that I could copy/paste (like for normals). That and meshes are somewhat complete. Anyone?

And I'd like to see XML export to clipboard instead of that "operator" thingy in the materials editor. That way, people can copy/paste stuff to/from text, and easily share materials. "Groups" (with custom in/output) are missing, but I have an vague idea how to embed that into XML.

Sure, if I had the time. Unfortunately not the case, but I am willing to help yall. For completeness sake UV should be added as well but I didnt find any sample code that I could copy/paste (like for normals). That and meshes are somewhat complete. _Anyone_? And I'd like to see XML export to clipboard instead of that "operator" thingy in the materials editor. That way, people can copy/paste stuff to/from text, and easily share materials. "Groups" (with custom in/output) are missing, but I have an vague idea how to embed that into XML.

I'm right here :) I'm new to the community so I don't know what's the usual method, but a task for this would be nice. I'm working on improving the exporter in github here: https://github.com/fabiosantoscode/cycles-xml-exporter . you can post issues there or pull request, and collaborate like that.

As to improving the format itself, I'm not so comfortable with c++ as I am with python but I can do small things like changing the syntax for node links (the current is pretty suboptimal).

I'm also on the blendercoders irc channel, at times.

I've contacted you on BA, @PRosendalhl, my user there is fabiodan.

I'm right here :) I'm new to the community so I don't know what's the usual method, but a task for this would be nice. I'm working on improving the exporter in github here: https://github.com/fabiosantoscode/cycles-xml-exporter . you can post issues there or pull request, and collaborate like that. As to improving the format itself, I'm not so comfortable with c++ as I am with python but I can do small things like changing the syntax for node links (the current <connect from="nodename socketname" to="nodename socketname"> is pretty suboptimal). I'm also on the blendercoders irc channel, at times. I've contacted you on BA, @PRosendalhl, my user there is fabiodan.
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

whats the status on this?

whats the status on this?
Member

Removed subscriber: @Blendify

Removed subscriber: @Blendify

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Dalai Felinto self-assigned this 2019-12-23 18:43:55 +01:00

Hi, thanks for your patch.

We are undergoing a Tracker Curfew where we are automatically closing old patches.

If you think the patch is still relevant please update and re-submit it. For new features make sure there is a clear design from the user level perspective.

Hi, thanks for your patch. We are undergoing a [Tracker Curfew ](https://code.blender.org/?p=3861) where we are automatically closing old patches. If you think the patch is still relevant please update and re-submit it. For new features make sure there is a clear design from the user level perspective.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#40773
No description provided.