Hello.
transparency and illumination of objects in TG2
This thread is a continuation of a previous thread; http://www.planetside.co.uk/forums/index.php?topic=14244.0 a general look at modeling for TG2. It contains a lot of helpful information on making models and getting them into TG2.
This new thread is about more specific projects and questions. Including subjects the last thread left off on.
Beginning with glass.
There are many threads on this subject. Most of them are pretty old but contain a lot of helpful information and some good .tgc(s) to download.
Here are a few as a shortcut.
http://www.planetside.co.uk/forums/index.php?topic=3977.msg41613#msg41613
http://www.planetside.co.uk/forums/index.php?topic=9922.0
http://www.planetside.co.uk/forums/index.php?topic=9954.msg103782#msg103782
http://forums.planetside.co.uk/index.php?topic=3997.0
Link one has a download from Cypher that looks very helpful. I will probably use it in the project I will use in this thread. To help illustrate a step by step. I my self have not done this before.
Here is a link to an image posted by Hannes, that proves what I'm trying to do in my project, is possible. And can look very good.
http://www.planetside.co.uk/forums/index.php?topic=14909.0
For the first part of this thread "transparency" and the first project "Glass"
I have made a House in Hexagon 3D.
For the 2nd part of transparency, I will use a 3D model of a plant.
Here is the house I will use for the glass project. It is the home of the main character from my mushroom forest project which began in the first thread. There are a total of three windows.
[attach=1]
The 2nd subject "illumination" refers to the use of objects as sources of light. And will build on transparency. For example; an object with a skin *like* texture that can *behave* as if SSS were applied. And from which light emits.
I hope this will be a useful thread to others.
[Edit]
There is a newly written explanation of how to get transparency of surfaces by dandelO in this thread: http://www.planetside.co.uk/forums/index.php?PHPSESSID=fdcc073f924ae32981fa0b1f088ebecd&topic=15018.0
Thanks to martin for witting it down.
Step 1
After looking at the other threads on glass, particularly link 1 by Cypher, I need to decide if I can apply the "glass effect'' to an object on my model. Or, apply Cypher's technique to an open space in my model.
If you look at the image of the house above, there are three windows. 2 have a paper thin object as glass. The upper window is an open hole in the geometry. I will try to work with both And post the results.
See ya in a few.
(EDIT) The two lower windows are also open holes in the geometry. But there is also a paper thin object in the windows that obstructs the view that the upper window does not have.
In addition to using a "Water Shader" to create glass, I found a tut in a Hexagon forum that shows how to use an Alpha image mapped to an object to create the look of a window. The window is then rendered in vue.
Here is the tut: http://www.geekatplay.com/flvplayer/player.php?pathinfo=gary/GrungyGlass
The part that talks about using photoshop to build the Alpha begins at 7:59 in. The part that shows how to use a alpha as glass in a render begins at 15:13 in.
I am still playing with a water shader. Can anyone tell me if the info in the tut above transfers to TG2?
(EDIT)
Ok, Im already running into serious problems. Half my geometry is completely disappearing during rendering. This is not like the previous issues with missing geometry, this is something worse. see attached.
[attach=1]
[attach=2]
(Edit again :-\) Sorry guys, the model is giving me trouble in Mudbox and Maya too. Ill rebuild the part that is affected and try again.
Ruff start. >:(
Not sure but look here:
http://support.turbosquid.com/entries/253954-ngons-multi-sided-polygons
One sided polygon looking at the wrong side can make this too. Make them two sided to see if this is the problem.
Or maybe your quads are non planar. Try to triple all your object and see.
But be careful and do not save over your original model Michael :)
All better now
[attach=1]
Thanks Kadri :) The link gave me some general help.
The specific issue was number of vertices and points. For example, the roof had only one line at the top making a sharp point " ^ ". I had to remove that line and just use the two sides of the cube. So now the top of the roof is flat rather than sharp. The other walls had similar issues.
Ok, back at it.
Hey Badger,
I took your advice with Hexagon and ended up with exactly the same problem with my first model. It must be a flaw with Hexagon. Theoretically, it should work but doesn't for some reason. My model was a sword and ended missing most of the blade. I was able to fix it with smoothing, however.
Quote from: UponInfinity on August 30, 2012, 05:30:28 PM
Hey Badger,
I took your advice with Hexagon and ended up with exactly the same problem with my first model. It must be a flaw with Hexagon. Theoretically, it should work but doesn't for some reason. My model was a sword and ended missing most of the blade. I was able to fix it with smoothing, however.
Hi UI
I am not sure it is a flaw. The problem can happen in mudbox and Maya too. Something about the number of vertices and points. I would have to create the problem again and load it into maya to get the exact wording.
Smoothing is not a real fix for your model. Though that may allow you to load the file in TG2, if thats what you mean by fix.
The important lesson I took away from this is to not try and cheat modeling fundamentals.
in the case of your sword... If you had a real sword and a magnifying glass, you would see that the sword tip is not a perfect point. At some level of magnification you will see that there is a flat part to the blade. Thus two vertices and not one. Smoothing almost certainly added faces to your model.
Smoothing is something you want to be very carful with. Smoothing always adds polygons to the model. In general the fewer polies the better. Try to get the look your after by creating as few faces as possible. And then only smooth when you really need it.
And don't think Hexagon is to much trouble. It really is the easiest way to learn basic modeling. Once you are sure you like doing it you can buy a package with fewer bugs and better support; Mudbox, zbrush, maya, 3dmax, and so on.
Acually I was pretty upset by my mistakes because hex2 is rather intolerant of mistakes. Wait till you spend 3 days working hard on something only to learn you did it badly and have to rebuild part of it. The thing about it is, you wont make that mistake again! And the fundamentals are what we need to master. Then we can use any program we like.
Also remember to unfold your primitives as soon as possible. It is easy to unwrap a cube. It is hard to unwrap a house. Know what I mean?
Unfold primitives? No, I have no idea what you mean.
While I know smoothing was essentially, a cheat, it did not really change the look of my object, so I have kept it for now. I may go back and remodel, but I'm still learning and working my way through the tuts.
Although now, I have another issue. I was attempting to sculpt out a building starting from a primitive and cutting sections away using the boolean function, but apparently the more I hack away at it with that particular function, the more unstable it becomes. Does this mean I should not sculpt in this fashion, or am I doing it wrong? For example, the house you constructed; Is is simply an extruded house? Is it hollow inside?
I know that these are not Terragen related issues, so I hope the moderators are a little lenient in this regard. Or should I just e-mail you directly?
Hi UI,
I have the answer for you. I just went through the same problem. I'll PM you the solution. As for this thread I want to get back to the OP subject.
Guys you might be talking about unrelated two things :
"Generally speaking "smoothing" is the act of shading (lighting) faces on a 3D model in such as way as to create the illusion of a much 'rounder' or 'fuller' structure; it should not be confused with a "smooth" sub-divided mesh (adding extra faces by sub-dividing the parent object) as both are functionally different in nature."
Quote from: Kadri on August 31, 2012, 06:24:57 AM
Guys you might be speaking about unrelated things :
"Generally speaking "smoothing" is the act of shading (lighting) faces on a 3D model in such as way as to create the illusion of a much 'rounder' or 'fuller' structure; it should not be confused with a "smooth" sub-divided mesh (adding extra faces by sub-dividing the parent object) as both are functionally different in nature."
Yes Kadri is correct.
I was referring to two things in Hex2 without being clear on the distinctions.
"increase smoothing" in hex will simply add faces by "rounding" the object. This is necessary for detailed sculpting. Once you begin sculpting, sculpting will add many thousands upon thousands of polygons to the mesh.
See here for a detailed example Via a comparison of hex2 and z-brush http://www.youtube.com/watch?v=mC7kKWR6Nws&feature=player_detailpage
Thanks Kadri. :)
:)
I think threads like these might be good for other model making enthusiastic Terragenners.
It is Planetside's forum of course but mostly we have to use objects in TG2 ,
so to a certain point i think they will not complain ; hopefully ;)
After seeing this thread I downloaded Hexagon again and was pleasantly surprised, however it is still buggy! I found that parts would not export as obj files and there was some messed up modelling from changed or aborted commands in the modelling process. It is on a par with Silo for bugginess but is free! Taking great care with the modelling process and saving every stage as a separate file will enable you to pinpoint problems and give you a better chance or correcting your model rather than rebuilding it. All in all though a worthwhile product with some useful tools, however, to get the best from it, I'd work through the tutorials above.
Make sure your polys are facing the right way, and don't use ngons.
You can check the first in PoseRay and get a better smoothing,
So, In a seperate forum TheBadger asked me to exlpain how I made the glowing globes in the attached image. I use Blender for modeling, so I can only vouch for these instructions where Terragen and Blender are used together. I also did not make the .tgd file - got that from someone here in the forums.
- First, load a sphere shape in blender. Under "materials" set its diffuse color to solid black (Otherwise this won't work).
- subdivide the heck out of the sphere!!!
- save the Sphere with a .obj extension, then import into terragen.
- under the 'surface shader' tab for the cone object, click on the green plus sign to open the 'go to parts shader' dialog
-in the parts shader dialog select 'edit internal network'.
- Now insert the .TGC file included here. ("File" > "Insert Clip File"...)
- Break the connection between the red material shader and the gray material box
- connect the output of the .tgc file to the gray material box
- now add a light source, color it , and position inside the sphere.
Not much more to it than that.
- Cam
Very Cool!
Yes looks interesting :)
Thanks Cam! Really cool.
More on all this to come soon!
Hello,
Thanks to Cam, DandelO, and UponInfinity.
I was able to get my objects illuminated! I was also able to make glass thanks to the links I posted in the OP.
I'm very close to getting a false SSS working. It will never be good enough for human skin. But A lot of cool effects can be had from it.
This image is for the glass and illuminating an object. My only problem on this is I can't seem to get the luminance bright enough to throw out a light on the ground. Anyone care to way in on this issue?
[attachimg=1]
False SSS:
As mentioned in the OP I had some ideas on how to get a pseudo SSS effect on objects. That is, allow objects to be penetrated by light, revealing depth and layers to an object. I am not sure at all how to light an object for this purpose from without. But from with-in, there are at least a few things that can be done.
Here is a focus on that aspect of what I am doing. I am not going for a be all end all on this. But I do have something very specific in mind that this should work for perfectly.
[attachimg=1]
[attachimg=2]
[attachimg=3]
Ok. I figured out why I was not casting light! ;D
I also did a test for cast shadows on/off. you can see that below. I see no effect for this use.
cast shadows on:
[attachimg=1]
Cast shadows off
[attachimg=2]
Fun!
Well, I think in this instance, the thing you want to cast your shadows is also your lightsource, so no, it would not work. But if there was an object beside it, then you could see the effect. In the instance I was using this feature, I didn't want my mapped plane to have shadows cast upon it from my sun or to cast any shadows on my scene with light from the sun.
Hi UI,
I understand:) I was just talking about it specifically with respect to this purpose.
I got what you told me to work perfectly now. So thank you!
In this case I do want cast shadows. And there is a positive effect. My first test above were not HDRs. But this new one is. And cast shadows helps with the SSS (sub surface scatter) *effect*.
I still have a bunch more to figure in, But it looks to me like this is going to workout!
Last simple luminance test.
Next up, multi layered luminance. I think the only real way to demonstrate it works is in an animation. So you can see the under layers better by there movement.
[attachimg=1]
P.S. I gave my left nut for this. It hurts.
First animation of this effort has failed https://vimeo.com/48963732
But I got some help in another thread and will post the info once it is working.
Ok, here is the step by step for glass that I wanted to put here the forum archive. I am just posting the steps to save time for new users. All the steps are from the conversations in the links from the OP on page one. Thanks to everyone who posted on this subject in the past.
To make glass in TG2
Steps:
1) import an appropriate object/model into TG2.
2) enter the internal node network of the object in the nod network window by clicking on the "+" sign of the node. Do this again on the resulting node.
3) Find the part shader that you want to appear as glass
4) Right click and select "create shader--> other surface shader--->Surface layer And again for water; "create shader--> other surface shader--->Water Shader And one more time for The image map "create shader--->color shader--->Image Map Shader
Now you have the required nodes. (NOTE!) You MUST choose an image at the time of selecting Image Map Shader. For this example make and select a pure white image.
5) Now, disconnect the Red part shader from the Grey shader of the original parts node.
6) Now connect all of the nodes we have just dealt with, in the following way:
[attach=1]
7) a.) Double click the "Water Shader" and in the waves tab set "roughness" to 0 (zero). b.) Now go to the "Reflections tab" and move the "Master Reflectivity" slider to some place between a value of 0 & 1. c.) Now go to the "Sub-Surface" tab and move the "transparency" slider to *about* .95
8) Double click the Image Map Shader node. Inside, select "Object UV, if available" in the "Projection type" field.
9) Find a view in the preview render window that shows where your glass should be, get rather close.
10) Test render!
11) Adjust values listed in step "7)" ad test render again. (Note) you should leave "roughness" at 0 in the waves tab until you have gotten the other setting to a place you like. Then you can play with "roughness" to see what happens.
(Final Note)
In step "4)" I told you you need to make a WHITE image to use in the "Image Map Shader". This will allow you to have crystal clear glass. if you want scratches or other details on your glass you will need to make a grey scale image of those details. SEE HERE: http://www.planetside.co.uk/forums/index.php?topic=15018.0 and look for the post by "DandelO".
The inside of your structure will be very VERY dark. Therefore, you will not likely be able to see in regardless of how low you set reflectivity. If you want to see into the room behind the glass you will need to add a light in the room. Do this by adding a "light source" to the main node network window. However, angle of light does play a factor, and it is *possible* to see into the room. But most likely you will want to add a light source.
Remember that in the OP on Page 1, there are links to related conversations in other threads.
[attach=2]
Thats it!
Good luck.
Now back to "SSS" ;D
Thanks TheBadger! That's great!
Please let us know when you get SS figured out. I have a special need for it!
- Cam
Hi cam,
did you see this thread http://www.planetside.co.uk/forums/index.php?topic=15056.0 ? If your waiting for a step by step, one is coming. But it will be a short while. To me its very complex. and in order to represent it correctly I have to understand it a little better. But I think it will be worth it, there are a lot of things you can do with it. Just like what DandelO and I have shown, but also how about a gas giant with a swirling atmo?! Lots of things. Just need a few more days because I am dividing my time between a few projects.
In the Meantime,
Can someone please explain why a light source appears green when viewed through a glass shader? What can I do *exactly* to correct this?
Quote from: TheBadger on September 10, 2012, 04:05:27 PM
In the Meantime,
Can someone please explain why a light source appears green when viewed through a glass shader? What can I do *exactly* to correct this?
It's probably the decay tint colour in the water shader. Try changing that to a neutral colour and see if that changes things (the default for water is green).
Quote from: TheBadger on September 10, 2012, 04:05:27 PM
did you see this thread http://www.planetside.co.uk/forums/index.php?topic=15056.0 ? If your waiting for a step by step, one is coming. But it will be a short while.
Thanks TheBadger! I think I'll play with this and see what I can make from it.
- Cam
Thanks UponInfinity,
that makes sense to me too. I am sure it will work.
By the way, I wanted to make sure you knew (because of our talks about Hex2), that just about every problem I was running into with Hex2 has been fixed by importing the Hex .obj to blender. And then simply exporting out a new .obj. I then place the new .obj into the original hex file with all of my mapped textures and when I open the .obj in TG2, everything works.
As for me, I think I have got everything out of Hex2 that I can, and will be moving up to a more complex, but I hope, more dependable software. But I would still like to see the images you are working on when you are ready!
Cam,
Let us know what you come up with!
QuoteThe inside of your structure will be very VERY dark.
If you increase the decay distance it'll get lighter inside.
Thanks Dune and UI. Good help!
I was wondering if anyone could explain this:
[attach=1]
The light is from the outside sun. There is one light source; The sun.
I am getting great light on the inside my first try, but why is the glass completely black? From the outside I can see in just fine.
(Edit) Sorry Guys Im a little more off than normal. There is a second light source in the room. :-\ Cant believe I both forgot I put it there, and did not see the little cross thingy.
As I see it, you've got two problems, one of which I think I can help with, the other I can speculate on. First off, I have no idea why you can only see through one side of the window. I think it could be the strength of the light. Because the light source you put in the house to see inside is comparatively lighter compared to the sun (perhaps, the window is really, really tinted). Not sure, you might have to experiment.
Secondly, the reason light is coming through the wall, I believe, is you need to check receive shadows from surfaces in your atmosphere tab under Quality. I had the same problem, but from the reverse when I was experimenting with some towers I modeled. It's either that (most likely), or you have to take glow in atmosphere out of your light source (less likely). I'm still learning a little bit from what you did to create your glass, so if I come across something, I'll let you know.
Maybe your glass isn't double sided?
Thanks guys thats good info again.
Dune,
How can I check that it is double sided? And, If you know about making things double sided in general, such as leafs and stuff, would you mind making a post or thread about it? The only reason I haven't made some real world plants is because I have no idea how to deal with leaves. Silly I know, but thats where I am on this.
Thanks again for the info UI and Dune.
When I build some object in Lightwave I can check whether it needs to be double sided, but in Tg there's also a tab for 2-sides. But I don't know if that's the problem here, just a guess. If you flip the normals of the object, and you can see through the window then, it may have to do with the doublesidedness. I think :-[
Thanks guys, I did both things and all is well.
Last thing from the glass part of this.
I think it works very well, and over all, is one of the simpler things that can be done in TG2.
Thanks everyone.
Well done. The process is transparent to me now. ;)
Cute :)
Hi.
Been learning Maya and mudbox in order to move forward on my projects you guys have been helping me with. I needed better control for making objects for one. Anyway, I'm still on this. Just have to ask a question...
Does anyone know for sure if Terragen 2 will accept Sub D models or is it prudent to always output for .obj in Polly? I know that nurbs don't fly in TG2. But nurbs can be converted to Polygons. What about Sub D?!
Any thoughts on this? Don't need to be maya specific, My reason for asking is importing to TG2. But if you use maya I'll take the advice.
Thanks for thinking on it.
Hi Badger,
If you are using maya, you can convert the subdiv to polygons, (under the modify menu)
Terragen cannot import a subdivision surface model.
Another method for this kind of subdivision modelling in maya is to build the mesh in polygons, but use the smooth mesh preview (by pressing 3 on the keyboard) you can also convert the smooth mesh preview (subdiv) to polygons from the same modify menu.
Hope that helps
Chris
Hi Badger,
I added a page about OBJ to the Import/Export reference (still very much a WIP) in the wiki a while back:
http://www.planetside.co.uk/wiki/index.php?title=Wavefront_OBJ_Import
As you can see TG imports a pretty limited subset of OBJ. More fundamental to your question though is that I don't believe OBJ supports subdiv surfaces anyway.
Regards,
Jo
Thanks Chris and jo,
I just thought that because Sub d was more like a polygon than a nurb, that it could some how fly without having to convert. I see now though.
Quote from: TheBadger on September 10, 2012, 12:07:09 PM
Ok, here is the step by step for glass that I wanted to put here the forum archive. I am just posting the steps to save time for new users. All the steps are from the conversations in the links from the OP on page one. Thanks to everyone who posted on this subject in the past.
To make glass in TG2
Steps:
1) import an appropriate object/model into TG2.
2) enter the internal node network of the object in the nod network window by clicking on the "+" sign of the node. Do this again on the resulting node.
3) Find the part shader that you want to appear as glass
4) Right click and select "create shader--> other surface shader--->Surface layer And again for water; "create shader--> other surface shader--->Water Shader And one more time for The image map "create shader--->color shader--->Image Map Shader
Now you have the required nodes. (NOTE!) You MUST choose an image at the time of selecting Image Map Shader. For this example make and select a pure white image.
5) Now, disconnect the Red part shader from the Grey shader of the original parts node.
6) Now connect all of the nodes we have just dealt with, in the following way:
[attach=1]
7) a.) Double click the "Water Shader" and in the waves tab set "roughness" to 0 (zero). b.) Now go to the "Reflections tab" and move the "Master Reflectivity" slider to some place between a value of 0 & 1. c.) Now go to the "Sub-Surface" tab and move the "transparency" slider to *about* .95
8) Double click the Image Map Shader node. Inside, select "Object UV, if available" in the "Projection type" field.
9) Find a view in the preview render window that shows where your glass should be, get rather close.
10) Test render!
11) Adjust values listed in step "7)" ad test render again. (Note) you should leave "roughness" at 0 in the waves tab until you have gotten the other setting to a place you like. Then you can play with "roughness" to see what happens.
(Final Note)
In step "4)" I told you you need to make a WHITE image to use in the "Image Map Shader". This will allow you to have crystal clear glass. if you want scratches or other details on your glass you will need to make a grey scale image of those details. SEE HERE: http://www.planetside.co.uk/forums/index.php?topic=15018.0 and look for the post by "DandelO".
The inside of your structure will be very VERY dark. Therefore, you will not likely be able to see in regardless of how low you set reflectivity. If you want to see into the room behind the glass you will need to add a light in the room. Do this by adding a "light source" to the main node network window. However, angle of light does play a factor, and it is *possible* to see into the room. But most likely you will want to add a light source.
Remember that in the OP on Page 1, there are links to related conversations in other threads.
[attach=2]
Thats it!
Good luck.
Now back to "SSS" ;D
could we maybe have a .tgc of this or is that not doable...or is it posted elsewhere?
If no one else does before I do, Ill try to put up a fresh file for you this week. Bit busy now.
Here you go.
1) A test scene.
2) A test object with related parts.
I went over everything.
The only thing I did different from my instructions is to increase decay distance (in the water shader) to a huge number like 2e+008 (info provided by Richard). Doing so will remove a bit of the black from the glass.
And changed color tint in the water shader to white.
So from this :
[attach=1]
To this:
[attach=2]
You can see that in the first image there is a lot of black. I think the only way to really get rid of this effect is if a actual glass shader is created by Planetside. Basically one shader that does what we have done here, but without that black effect stuff.
The scene is default except for the object nodes discussed here, and in my instructions.
The object is made of two parts and combined. The frame and the glass. In this test I made everything look like glass including the frame.
In this test object the "pane of glass" is a plain object. I would recommend that in some situations it would be better to use a 3d rectangle instead of a super thin plain object.
If anyone has any problem with the .7z Please let me know.
I couldn't open it, but never mind. Your glass looks very black still. Better set decay to a huge number as well, and change the refraction index to that of glass: 1.51714. Here's my version.
Hmmm just checked it opened fine for me. .7z made with "7zX"
Ill take a look at yours too ulco, thanks.
Well, I'm online now, and I don't have all this stuff installed on this partition. I can open it on my working partition though, I'm sure.
I've lately just started adding a Water shader adjusted for infinite decay in the Opacity function slot in the Opacity tab...seems to work well and I like the solution for a frosty white glass Ulco...never tried jacking up the tint to infinite but that works well.