#1 request - exporting procedural textures

Forums: #1 request - exporting procedural textures
Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderator: aoktar

#1 request - exporting procedural textures

Postby colorlabs » Sat Oct 09, 2010 1:05 am

colorlabs Sat Oct 09, 2010 1:05 am
Hi, I use a lot of procedural textures in C4D - noise, checks, gradients, etc. I would love if the plugin offered to render these out to texture files so they could be imported into Octane.

Anyone else dying for this feature? Is there a workaround - some way to render a texture to PNG file or something?
Mac OS X 10.8.0 | ASUS GTX 580 1.5GB | MSI GTX 470 | ATI Radeon 6870 | Core i7 2.9Ghz | 16GB
colorlabs
Licensed Customer
Licensed Customer
 
Posts: 209
Joined: Sun Aug 08, 2010 2:53 pm

Re: #1 request - exporting procedural textures

Postby abstrax » Mon Oct 11, 2010 10:52 am

abstrax Mon Oct 11, 2010 10:52 am
colorlabs wrote:Hi, I use a lot of procedural textures in C4D - noise, checks, gradients, etc. I would love if the plugin offered to render these out to texture files so they could be imported into Octane.

Anyone else dying for this feature? Is there a workaround - some way to render a texture to PNG file or something?


At the moment you can bake textures yourself using the texture bake tag. It works ok, but has it's limitations and can be quite tedious.

There are a lot of problems to solve for a fully automatic solution. Some general questions:

- Is it enough to just bake the standard UV space [0,0] - [1,1] or is it necessary to bake the result for the UV space of the object? If just the standard UV space is baked each material has to baken only once (== less memory), but you have to provide good UV maps, otherwise you will get some nasty stretching. If you the material is baken in the object's UV space, we don't have to worry much about UV mapping (except for overlapping UV triangles), but have to bake a material for each object, it's assigned to (== lots of textures/memory).

- Should the baking happen automatically, as long as there is no baked texture yet? Or should the baking be triggered manally and then replace the shaders with the baked textures?

There is a bunch of other problems, but for now I'm interested in your opinion(s) on the above questions.

Cheers,
Marcus
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5487
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: #1 request - exporting procedural textures

Postby colorlabs » Mon Oct 11, 2010 2:27 pm

colorlabs Mon Oct 11, 2010 2:27 pm
As for baking to standard UV or object UV, I'm afraid I don't know the difference. I generally just play around with projections till I find one that fits right, then I right click to Generate UVW Coordinates if I need it to be UV mapped. It sounds like either of the two options would be better than nothing!

I don't like when external renderers mess with my scene / textures / tags. Ideally the Octane plugin would automatically bake each texture on export, and add an Octane tag to each relevant object, which contained settings like baked texture dimensions and maybe showed a preview. And perhaps it would have a button to replace the texture with the baked one, if you think that would be important for some people.
Mac OS X 10.8.0 | ASUS GTX 580 1.5GB | MSI GTX 470 | ATI Radeon 6870 | Core i7 2.9Ghz | 16GB
colorlabs
Licensed Customer
Licensed Customer
 
Posts: 209
Joined: Sun Aug 08, 2010 2:53 pm

Re: #1 request - exporting procedural textures

Postby abstrax » Mon Oct 11, 2010 7:16 pm

abstrax Mon Oct 11, 2010 7:16 pm
colorlabs wrote:As for baking to standard UV or object UV, I'm afraid I don't know the difference. I generally just play around with projections till I find one that fits right, then I right click to Generate UVW Coordinates if I need it to be UV mapped. It sounds like either of the two options would be better than nothing!


But what happens, if you use for example world or objects space in the noise? In that case the used UVW coordinates are independent of your UVW tag. In those cases you have to create a baked texture for each object.

I don't like when external renderers mess with my scene / textures / tags. Ideally the Octane plugin would automatically bake each texture on export, and add an Octane tag to each relevant object, which contained settings like baked texture dimensions and maybe showed a preview. And perhaps it would have a button to replace the texture with the baked one, if you think that would be important for some people.


That is a lot harder than you think: Which sizes should the textures have? What happens if you have 1000s of objects, i.e. you have to create maybe 10000 textures or more...? I don't think C4D is flexible enough to allow one tag to hide all other object tags and to virtually create a UVW tag and texture tag and a virtual material. I.e. the only thing I can think of is to convert a whole scene using a seperate plugin (which might take a long time, think hours) and store the result as a new document, that has new materials, new texture tags, new UVW coordinates...

As you might guess, that's not trivial and won't happen soon. I'm looking into texture baking since a while, but haven't come up with a useful solution yet.

Cheers,
Marcus
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5487
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: #1 request - exporting procedural textures

Postby bepeg4d » Mon Oct 11, 2010 8:35 pm

bepeg4d Mon Oct 11, 2010 8:35 pm
I'm dreaming... but what do you think if we watch the problem from the opposite side?
It would be really fantastic if we could have all the c4d procedurals inside octane, like a c4d plugin for octane so we can use al the procedurals that we already knows and the exporter can find the same parameters with no issue. Plus there would be a lot of v-ram saving.
.. ok I'm going to take a coffee :)

ciao beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 10000
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: #1 request - exporting procedural textures

Postby colorlabs » Mon Oct 11, 2010 9:06 pm

colorlabs Mon Oct 11, 2010 9:06 pm
abstrax wrote:
colorlabs wrote:As for baking to standard UV or object UV, I'm afraid I don't know the difference. I generally just play around with projections till I find one that fits right, then I right click to Generate UVW Coordinates if I need it to be UV mapped. It sounds like either of the two options would be better than nothing!


But what happens, if you use for example world or objects space in the noise? In that case the used UVW coordinates are independent of your UVW tag. In those cases you have to create a baked texture for each object.


Sorry, I don't know what you mean. I know almost nothing about UV. Honestly don't understand why people make a big deal about it, I've never encountered a problem that required me to learn about UV. But maybe this is it :) If you explain the problem I'll try to understand. FYI I seem to remember Riptide simply renders to a plain old square. Maybe look there for inspiration.
abstrax wrote:
colorlabs wrote:I don't like when external renderers mess with my scene / textures / tags. Ideally the Octane plugin would automatically bake each texture on export, and add an Octane tag to each relevant object, which contained settings like baked texture dimensions and maybe showed a preview. And perhaps it would have a button to replace the texture with the baked one, if you think that would be important for some people.


That is a lot harder than you think: Which sizes should the textures have? What happens if you have 1000s of objects, i.e. you have to create maybe 10000 textures or more...? I don't think C4D is flexible enough to allow one tag to hide all other object tags and to virtually create a UVW tag and texture tag and a virtual material. I.e. the only thing I can think of is to convert a whole scene using a seperate plugin (which might take a long time, think hours) and store the result as a new document, that has new materials, new texture tags, new UVW coordinates...


Sorry, I wasn't clear. The tag I propose does not hide any C4D tags, or alter any textures, it's simply a hint to octane exporter. Textures should be 1024x1024 by default, and the tag allows me to change it. This is really the main purpose of the tag, as I can see it. As for thousands of objects, just warn me if it's going to generate more than 100 textures. Or just show a cancelable progress dialog.

Just to clarify further, this tag would change nothing about the way C4D displays the scene, but rather would just affect how the Octane plugin exports the scene. This will require a lot of trial and error on the user's part, exporting and re-exporting to Octane, but would still be worth it for me. So, no need for "virtual" texture/uvw tags or materials, nothing virtual about it. Just affects what Octane itself sees.

Doesn't need to be complex, just stick to reasonable defaults and I think it will be really useful.

(But yes another option if you'd prefer it, would be to emulate the noises and gradients in cuda shader code and submit it to Refractive :))
Mac OS X 10.8.0 | ASUS GTX 580 1.5GB | MSI GTX 470 | ATI Radeon 6870 | Core i7 2.9Ghz | 16GB
colorlabs
Licensed Customer
Licensed Customer
 
Posts: 209
Joined: Sun Aug 08, 2010 2:53 pm

Re: #1 request - exporting procedural textures

Postby colorlabs » Mon Oct 11, 2010 9:13 pm

colorlabs Mon Oct 11, 2010 9:13 pm
BTW, any plans to opensource the plugin? I'm a programmer myself and am curious how C4D plugins work. I understand if you're trying to keep your commercial options open though :)
Mac OS X 10.8.0 | ASUS GTX 580 1.5GB | MSI GTX 470 | ATI Radeon 6870 | Core i7 2.9Ghz | 16GB
colorlabs
Licensed Customer
Licensed Customer
 
Posts: 209
Joined: Sun Aug 08, 2010 2:53 pm

Re: #1 request - exporting procedural textures

Postby abstrax » Mon Oct 11, 2010 11:48 pm

abstrax Mon Oct 11, 2010 11:48 pm
colorlabs wrote:BTW, any plans to opensource the plugin? I'm a programmer myself and am curious how C4D plugins work. I understand if you're trying to keep your commercial options open though :)


The answer to this question doesn't depend on me, but on Refractive Software. If you want to know how an export plugin works, have a look at the LuxC4D exporter, also written by me.

Regarding your other post: I will try to explain the problem, when I'm at home. Maybe then it becomes clear, where the issues are.

Cheers,
Marcus
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5487
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: #1 request - exporting procedural textures

Postby abstrax » Tue Oct 12, 2010 12:35 am

abstrax Tue Oct 12, 2010 12:35 am
bepeg4d wrote:I'm dreaming... but what do you think if we watch the problem from the opposite side?
It would be really fantastic if we could have all the c4d procedurals inside octane, like a c4d plugin for octane so we can use al the procedurals that we already knows and the exporter can find the same parameters with no issue. Plus there would be a lot of v-ram saving.
.. ok I'm going to take a coffee :)

ciao beppe


Yes, that makes more sense than baking textures, but I'm not sure if there will ever be something like a shader API for Octane. Let's see what the future brings.

Cheers,
Marcus
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5487
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: #1 request - exporting procedural textures

Postby bepeg4d » Tue Oct 12, 2010 5:55 am

bepeg4d Tue Oct 12, 2010 5:55 am
abstrax wrote:Yes, that makes more sense than baking textures, but I'm not sure if there will ever be something like a shader API for Octane. Let's see what the future brings.

Cheers,
Marcus


Thanx Marcus for the answer, maybe in Octane 2.0 :)
ciao beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 10000
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Next

Return to Maxon Cinema 4D


Who is online

Users browsing this forum: JeromeZhu and 12 guests

Sun Jun 16, 2024 2:48 am [ UTC ]