Help needed with making an object transparent

Started by Anthony Appleyard, December 19, 2014, 05:51:03 AM

Previous topic - Next topic

Anthony Appleyard

I made a CGI model of a dredger-submarine using an .OBJ mesh editor that I wrote. Hereinunder is an image of the sub rendered in Poser, and an image of it rendered in Terragen.

Its bow labels are a sheet of polygons (material "label") placed about 0.1 inches out from the sub's hull. This material has a diffuse color texture map and a transparency texture map.

In Poser the bow label renders correctly, and where it is transparent, it lets the sub's hull's color show through. (But I must set the label's ambience and reflectivity to zero.)

But in Terragen for this material "label" I have tried many combinations of diffuse and translucency and opaqueness values and texture maps, and all that I can get is:-
(1) Label completely invisible and missing.
(2) As seen here, with the intended transparent parts only partly transparent.
(3) As (2) but without the text.

.OBJ file format was designed for an early CGI graphics program called Wavefront, which did not have transparency, so transparency cannot be passed on in an .OBJ file, but I must restore the transparency after the .OBJ object has been loaded into Terragen.

Dune

If you make an alpha layer in the texture file (say a TIFF), you can there set all that needs to be seen white, the rest black. In the default shader use the alpha channel for opacity. But it's either on or off, no greyscale transparency.

Anthony Appleyard

#2
But the Terragen render in the attached image shows that using a .BMP file as a transparency map does work in Terragen - partly, and with what should be fully transparent shown as about half transparent. And, what is the dffrerence between the two Terragen texture features "translucency" and "opacity"?


Anthony Appleyard

#3
I seem to have managed it. I set:-
Diffuse color to 1 & gdsl_bowlabels_rn_texc.bmp
Translucency to 1 & gdsl_bowlabels_rndrg_text.bmp
Luminosity to 0 & no map file
Opacity to 1 & gdsl_bowlabels_rndrg_text.bmp & do not use alpha channel & do not invert opacity image.
...... Here does "invert" mean "switch top and bottom" or "switch back and white"?
Images to unpremultiply colour but do not unpremultiply anything else.
...... Here what does "unpremultiply" mean? Presumably "reverse the effect of premultiplying a matrix by something", but what was premultiplied by what?

The shading on the sub's hull shows the polygons and is nothing like as good as Poser's rendering of shading on a curved surface. Can I do something in Terragen to improve this?

In Terragen how can I make the light diffuse, or somewhat diffuse, rather than all point-source sharp?

If Terragen when starting a job from a .tgd file can't find an object or graphic file needed, it merely errors.  It would be useful of instead it then asked the user where that file is :: Poser does that.

Dune

Translucency is not needed, had probably no effect at all. And if your colors in the bmp are above average grey (more light than dark), it will read it as white and you're fine, but if you have a bmp file with darker greys that you still want to show on the hull, you need an extra B&W file where the grey is white for the opacity.
I don't know exactly what unpremultiply is; the only thing I sometimes tick it off for is to get rid of the white edges along leaves.
You can make light diffuse by using soft shadows. It does increase rendertime, though.
Polygons: did you check 'use smooth normals' in the object's tabs? Otherwise it's just too low poly (for TG at least).
Invert means black to white and white to black, not upside down.

Anthony Appleyard

#5
Quote from: Dune on December 19, 2014, 09:21:47 AM
... Polygons: did you check 'use smooth normals' in the object's tabs? Otherwise it's just too low poly (for TG at least).

I used "smooth normals".
Uhh :: it looks like I will need to find or write a program that can subdivide big polygons including allowing for smoothing when adding the necessary many extra vertexes.

Quote from: Dune on December 19, 2014, 09:21:47 AM
Invert means black to white and white to black, not upside down.

Sorry: I am accustomed to Poser, which reverses texture maps in Y, and getting Poser texture maps the right way up is sometimes a problem.

bobbystahr

Anthony, some of us run our .obj/lwo/3ds  models through PoseRay a free app for making Poser model POV ray friendly but it does have a subdivision feature that may help with the poly count. I've smoothed a few models with it.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Anthony Appleyard

#7
I downloaded Poseray and used it to smooth the dredger-sub model to 1 degree maximum crease angle; that increased file size from 1502 kbytes to 8469 kbytes. It looks generally smoother, but notice the ring effect on the bows, and the distortion on the front of the deck and on the bow-label. And one of the propeller's blades shows strange rendering. (Examining the mesh of the smoothed version in my mesh-editor shows no distortion at the front of the deck where the rendering shows a sawtoothed effect.)

Kadri


You might not need to subdivide it maybe.
Try the "Recalculate normals" , "Smooth" options in the "Groups"  first.

Anthony Appleyard

#9
Quote from: Kadri on December 19, 2014, 01:36:00 PM

You might not need to subdivide it maybe.
Try the "Recalculate normals" , "Smooth" options in the "Groups"  first.

Done. The smoothing looks a bit better, but I can still see the polygons.


Kadri


If you don't want to share the model could you at least upload here the front part (for example) test it?

Anthony Appleyard

Quote from: Kadri on December 19, 2014, 04:05:07 PM

If you don't want to share the model could you at least upload here the front part (for example) test it?

Here is the sub model .obj & .mtl and its texture maps.

bobbystahr

Heh heh heh, you said the right words Kadri,. In my previous life as a Moderator of Freestuff at renderosity Anthony was a most generous member.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Anthony Appleyard

To make the bow label work OK, in the sub after loading it into Terragen, find its material "label" and set its texturing to:-

Diffuse color to 1 & gdsl_bowlabels_rn_texc.bmp
Translucency to 1 & gdsl_bowlabels_rndrg_text.bmp
Luminosity to 0 & no map file
Opacity to 1 & gdsl_bowlabels_rndrg_text.bmp & do not use alpha channel & do not invert opacity image.

I am still in Renderosity.