Planetside Software Forums

General => Terragen Discussion => Topic started by: gregsandor on March 23, 2010, 07:46:42 PM

Title: displacement on models not rendering when raytraced
Post by: gregsandor on March 23, 2010, 07:46:42 PM
Anyone else having trouble with displacement on models not rendering correctly when Raytrace Objects is on?
Title: Re: displacement on models not rendering when raytraced
Post by: old_blaggard on March 23, 2010, 08:00:50 PM
The raytracer simply doesn't support displacement on models. It only does bump mapping.
Title: Re: displacement on models not rendering when raytraced
Post by: gregsandor on March 23, 2010, 08:10:05 PM
Are you serious?  I was sure I saw displacement before.  I'll finish this post then go find the example I'm thinking of.  Meanwhile here's a current test on scale 1-meter cubes:
Title: Re: displacement on models not rendering when raytraced
Post by: gregsandor on March 23, 2010, 08:16:10 PM
Okay -- here are two renders of the same model.  It is raytraced and all the detail in the panels is displaced, unless that is an expecially convincing bumpmap.  Looking at the far corners it does appear to be flat, but the shadows on the near corners look right.  Now I'm confused.
Title: Re: displacement on models not rendering when raytraced
Post by: old_blaggard on March 23, 2010, 08:37:08 PM
Yup, that looks like bumping to me. Note how flat it is on the 90-degree angle just left of the curved corner.
Title: Re: displacement on models not rendering when raytraced
Post by: gregsandor on March 23, 2010, 08:45:52 PM
Yeah, you're right.  I've just found the posts I missed about this new "feature."  Wish I'd read them before noon today when I started writing these shaders and spent the afternoon tearing them apart trying to fix the displacement. 
Title: Re: displacement on models not rendering when raytraced
Post by: Henry Blewer on March 23, 2010, 09:20:16 PM
I build in the displacements now. Bump mapping works well when the light strikes across it at the right angle.
Title: Re: displacement on models not rendering when raytraced
Post by: reck on March 24, 2010, 05:01:31 AM
It's a shame this limitation exists. Can it be something that can be added in future?

I always used to add a bit of displacement in TG to add a bit of realism to the objects. Now I have to compromise between using raytracing but having no displacements or having displacements but no raytracing. Can't I have it all  ;D
Title: Re: displacement on models not rendering when raytraced
Post by: Henry Blewer on March 24, 2010, 07:48:14 AM
I think Matt will be bringing the object displacement back. They rushed the last release for us to have at Christmas. I was very glad they worked so hard to get it out then.
Title: Re: displacement on models not rendering when raytraced
Post by: Klas on March 24, 2010, 09:17:07 AM
I don't think that this can be done easily with the raytracer. The mesh must be subdivided first which results in a horrible amount of data. I have tested this with the dragon and blender (here (http://www.terralights.de/terralightsII/coppermine/displayimage/album=126/pid=3682.html)) and it brings the object file from 10MB to 175MB. I have used a subdiv level of 2 for the main parts and 3 on some small parts of the object, not all parts are subdivided. The map is also as bump map on the dragon.
Title: Re: displacement on models not rendering when raytraced
Post by: Henry Blewer on March 24, 2010, 09:46:07 AM
Maybe there will be a switch (checkbox) to change the render type for objects.
Title: Re: displacement on models not rendering when raytraced
Post by: dandelO on March 24, 2010, 11:12:48 AM
Not just displacement is affected, high/low mixing of colours of fractals don't show in the raytracer, you get a flat, single tone colour.

I think that I read that it's to be addressed for the next release.
Title: Re: displacement on models not rendering when raytraced
Post by: gregsandor on April 14, 2010, 10:08:21 AM
Matt, please restore the displacement for models in the next update.
Title: Re: displacement on models not rendering when raytraced
Post by: Oshyan on April 14, 2010, 05:53:46 PM
It's not likely that a fix for this will make it into the next update, but we certainly intend to address it in the future. What may come first is the ability to select which objects/populations are raytraced and which are rendered traditionally. This would allow you to specify a foreground object to use the normal renderer so it could have displacement, for example.

- Oshyan
Title: Re: displacement on models not rendering when raytraced
Post by: reck on April 16, 2010, 03:50:00 AM
I think that's a good workaround until displacement is brought back.
Title: Re: displacement on models not rendering when raytraced
Post by: gregsandor on April 16, 2010, 04:00:11 AM
I don't understand why it is disabled.  Raytracing does not preclude displacement.
Title: Re: displacement on models not rendering when raytraced
Post by: Oshyan on April 16, 2010, 03:09:58 PM
Not inherently, no. But it would have meant the 2.1 release would have been delayed in order to implement it.

- Oshyan