LuxC4D 0.06

Discussion related to the 'LuxC4D' exporter plugin for Maxon Cinema 4D.

Moderators: Ratow, coordinators

Re: LuxC4D 0.06

Postby forgeflow » Sat Oct 24, 2009 8:29 pm

pixie wrote:
forgeflow wrote:Another quick question - is cube mapping implemented? I have a complex object that would be unfeasible to create a UV map for, but cube mapping of the texture works perfectly for what I need. However, the texture doesn't seem to show up in LuxRender.


You can generate uv maps out of cube map easily, Objects Manager > Tags > Generate UVW coordinates

Awesome, thank you, that worked. :)
forgeflow
 
Posts: 137
Joined: Sun Sep 13, 2009 3:51 pm
Location: Saskatoon, Canada

Re: LuxC4D 0.06

Postby forgeflow » Sun Oct 25, 2009 10:58 am

Have a bit of a strange situation here. I am trying to create a sky using a large sphere with inward facing polygons, with a .exr image mapped to it. It works. However, if I try to put a light object (disc area light just inside the sky object) in the scene to act as the sun, it's effects don't show up in the render at all. If I turn the sky object off, the light object illuminates things normally. If I turn the sky back on, the light stops working.

As another test, I set up a scene with a sky object, and a light source very close to the test object inside (a cube) and still, no apparent illumination from the light object at all.

EDIT: I think I figured it out. I had to open the .exr file and set the exposure to -12 before the light from the sunlight object began to appear in the scene.
forgeflow
 
Posts: 137
Joined: Sun Sep 13, 2009 3:51 pm
Location: Saskatoon, Canada

Re: LuxC4D 0.06

Postby abstrax » Sun Oct 25, 2009 6:24 pm

forgeflow wrote:Have a bit of a strange situation here. I am trying to create a sky using a large sphere with inward facing polygons, with a .exr image mapped to it. It works. However, if I try to put a light object (disc area light just inside the sky object) in the scene to act as the sun, it's effects don't show up in the render at all. If I turn the sky object off, the light object illuminates things normally. If I turn the sky back on, the light stops working.

As another test, I set up a scene with a sky object, and a light source very close to the test object inside (a cube) and still, no apparent illumination from the light object at all.

EDIT: I think I figured it out. I had to open the .exr file and set the exposure to -12 before the light from the sunlight object began to appear in the scene.


Yes, it's a brightness issue. You can create sun and sky lights using the LuxC4D light tag. That means you can get a realistic outdoor lighting this way, but you can't specify your own HDR lighting yet, as I haven't implemented the export of a sky object yet to an infinite light source yet.

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Re: LuxC4D 0.06

Postby forgeflow » Sun Oct 25, 2009 9:10 pm

Got another weird issue related to the cubic mapping question I asked before. I have an texture with a color map, and a bump map. I applied this to the object in C4d using cubic mapping, and then created cubic UVW coordinates for the texture, which converted it to UVW mapping. This works perfectly in Cinema 4D's renderer, but produces some unpredictable behavior in LuxRender. On some surfaces, the bump comes out backwards (I've checked that the surface normals are all facing the correct direction. On all surfaces, the bump comes out very poorly. The image maps are 2048 x 2048 in size but it looks like Lux isn't using the full resolution.

Here are a couple of examples of what I am talking about:

C4D output (basic scanline render):
http://planets.shacknet.nu/images/c4doutput.jpg

Lux output (looks crappy partly because I only let the render cook for 14 minutes):
http://planets.shacknet.nu/images/luxoutput.jpg

Ignoring the other issues with the image you'll see the bump is facing the right way on the cubical object on the left, but is flipped on the rounded object on the right. Is there anything I can do to resolve these issues? I thought perhaps normal mapping would be more predictable but, alas, LuxRender doesn't support them yet.
forgeflow
 
Posts: 137
Joined: Sun Sep 13, 2009 3:51 pm
Location: Saskatoon, Canada

Re: LuxC4D 0.06

Postby abstrax » Mon Oct 26, 2009 3:10 am

forgeflow wrote:Got another weird issue related to the cubic mapping question I asked before. I have an texture with a color map, and a bump map. I applied this to the object in C4d using cubic mapping, and then created cubic UVW coordinates for the texture, which converted it to UVW mapping. This works perfectly in Cinema 4D's renderer, but produces some unpredictable behavior in LuxRender. On some surfaces, the bump comes out backwards (I've checked that the surface normals are all facing the correct direction. On all surfaces, the bump comes out very poorly. The image maps are 2048 x 2048 in size but it looks like Lux isn't using the full resolution.

Here are a couple of examples of what I am talking about:

C4D output (basic scanline render):
http://planets.shacknet.nu/images/c4doutput.jpg

Lux output (looks crappy partly because I only let the render cook for 14 minutes):
http://planets.shacknet.nu/images/luxoutput.jpg

Ignoring the other issues with the image you'll see the bump is facing the right way on the cubical object on the left, but is flipped on the rounded object on the right. Is there anything I can do to resolve these issues? I thought perhaps normal mapping would be more predictable but, alas, LuxRender doesn't support them yet.


Yes, please try it with different bump strength. What you might see here is that the bump strength is too high on Lux side.

The reason for this behaviour is two different ways of calculating bump: C4D essentially calculates a gradient from the texture and applies it to the shading normal. This way the effect is independent from the scaling of the texture. Lux on the other hand is calculating a "virtual displacement" and the bump strength multiplied with the bump texture value is defining the amount of that "virtual displacement", which means it is dependent of the scaling of the texture. I haven't found a way yet, to get a good conversion for this. -> Please try it with waaaay lower bump strengths and if that didn't help try it with higher values.

I had hoped to have 0.06c out already, but I'm still having problems to launch LuxRender with a scene file on MacOS from C4D R9.x and R10.x. I'm working on it and still have a few things to try.

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Re: LuxC4D 0.06

Postby fused » Mon Oct 26, 2009 6:24 am

abstrax wrote:I had hoped to have 0.06c out already, but I'm still having problems to launch LuxRender with a scene file on MacOS from C4D R9.x and R10.x. I'm working on it and still have a few things to try.


hey abstrax,

http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044654269&id=1043284392

check out option 3 :)

(edit: it also allows you to launch multiple instances of an application at the same time on OSX, which is quite nice)
fused
 
Posts: 14
Joined: Thu Dec 13, 2007 5:38 pm
Location: Berlin, Germany

Re: LuxC4D 0.06

Postby forgeflow » Mon Oct 26, 2009 9:07 am

abstrax wrote:Yes, please try it with different bump strength. What you might see here is that the bump strength is too high on Lux side.

Trying that right now... took it from 100% down to 5%. The bump looks better on the cubical object, but is still inverted on the cylindrical object. The annoying thing is that it is not the same all over the object - in some places it is correct, and not in others. It's quite maddening.
forgeflow
 
Posts: 137
Joined: Sun Sep 13, 2009 3:51 pm
Location: Saskatoon, Canada

Re: LuxC4D 0.06

Postby forgeflow » Mon Oct 26, 2009 3:20 pm

abstrax wrote:Yes, it's a brightness issue. You can create sun and sky lights using the LuxC4D light tag. That means you can get a realistic outdoor lighting this way, but you can't specify your own HDR lighting yet, as I haven't implemented the export of a sky object yet to an infinite light source yet.

Cheers,
Marcus

Doh! Knowing that yesterday morning would have saved me a bunch of time. This looks great and is a lot easier to set up than the nonsense I was doing! :oops:
forgeflow
 
Posts: 137
Joined: Sun Sep 13, 2009 3:51 pm
Location: Saskatoon, Canada

Re: LuxC4D 0.06

Postby forgeflow » Mon Oct 26, 2009 3:32 pm

abstrax wrote:
pixie wrote:
abstrax wrote:The current conversion was just a quick and dirty way to get material from C4D to Lux. I hope the Lux materials will then allow the user to use the full power of Lux.

Is there a place where one can find the rules for the automatic conversion between cinema and lux materials?


This is the best I have for the moment:

http://www.luxrender.net/wiki/index.php ... C4D_Manual

Cheers,
Marcus

Is there a way to denote Architectural Glass (reflection, but no refraction or internal reflections) other than to manually edit the .lxm file and stick "bool architectural" ["true"] into the material definition? I was thinking that if you set up a material with D, T, and R with an IOR of 1 that it should convert to architectural glass, but doesn't look like that's the case.
forgeflow
 
Posts: 137
Joined: Sun Sep 13, 2009 3:51 pm
Location: Saskatoon, Canada

Re: LuxC4D 0.06

Postby abstrax » Mon Oct 26, 2009 6:55 pm

forgeflow wrote:Is there a way to denote Architectural Glass (reflection, but no refraction or internal reflections) other than to manually edit the .lxm file and stick "bool architectural" ["true"] into the material definition? I was thinking that if you set up a material with D, T, and R with an IOR of 1 that it should convert to architectural glass, but doesn't look like that's the case.


No, it doesn't - but that's a good idea. I will add it to 0.06c. Thanks :)

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

PreviousNext

Return to LuxC4D (Maxon Cinema 4D Exporter)

Who is online

Users browsing this forum: No registered users and 0 guests