3D Models and Terragen - Basics

Started by j meyer, July 03, 2015, 03:17:21 PM

Previous topic - Next topic

j meyer

#75
Now for the shader stuff.

This time it's about how to prepare your model inside your modeling application
in a way that TG creates all the Part nodes and their corresponding Shader nodes
you want your model to have.

It may be of help to know that the file format we are using (.obj) just saves the coordinates
of the vertices (points) of a model and - if -the vertex normals.And some other stuff that can
vary from app to app.No info as for separate geometry parts.That's done via materials.
The material/shading information is saved within the accompanying .mtl file.(put the mtl file
in another folder and load the obj without it and you'll see the difference.No greyPart node,
just the red Parts shader node.The model renders pure black unless you connect some Default or other shader to it.)
There are lots of parameters that won't be exported from your modeling app or imported by
your target app.A few are,but most of them not.
That goes for TG and other rendering software.

So I found it a good habit to make the final shader tuning in TG instead of trying to do as much
as possible beforehand,but that's just me.


A little visual aid as to what is what:

[attachimg=1]

The demo model is composed of 6 separate parts of geometry and has one shader/material
assigned.It's the material that's on every model by default.Here it's named default,too.
In your app it may be named differently.

[attachimg=2]

When exported like that your model will have one grey Part node and it's corresponding
Default shader.
The nodes inside the Parts shader node:

[attachimg=3]

Renders like this in TG

[attachimg=4]

So,what to do?
Back in your modeling app you select one of your model's parts and assign a new material/
shader to it.Name that material/shader properly.Avoid spaces,use underscores or hyphens.
For example: starting with the cube,assign a new material to it and name it cube.
You don't have to do anything else to this material now.Most of the settings won't export
anyway.
Do that for the other parts as well.
In the example I gave every material it's own color,but that's just for demo purposes,easier
to see what has been done.
You'll also notice that I've 'grouped' the spheres to show what's possible generally.
Now our model has still 6 parts,but this time three materials/shaders.

[attachimg=5]

The nodes

[attachimg=6]

Rendered

[attachimg=7]

That's better,we can have a different shading on the different elements now.
But it's still not enough! More shaders,gimme more shaders...aahrff.


to be continued in the next post.

j meyer

Back to the modeling app again.
There is something else we can do.We can assign a material to groups of polys,too.
It doesn't have to be separate geometry necessarily.
Like this for instance:

[attachimg=1]

The nodes

[attachimg=2]

And rendered

[attachimg=3]

Pretty easy.

The above tries to illustrate the general principle.
And the principle goes for both non UV-mapped models -like in the example - or models
that are UV-mapped.And of course combinations.


j meyer

Kadri - It was the free model from that guy who made a special sale some time ago.
          The alleged movie quality models.You posted in that community thread,too.
          Think I've got it on a stick still.
          Opened that in TG,full of missing geometry,opened it in wings same result.
          PoseRay triangulated it on loading and after that the geometry was ok.
          I've had that over the years many times especially with Lightwave models.
          There is a DS9 runabout out there that I remember for that very reason.
          No displacement involved as far as I recall.
          And no it was definitely not what you call a normal problem.
          Missing geometry means you see big holes in your model.
          Will try it again and post an example.

Kadri


I see. If i find time (before you) i will have a look too :)

j meyer

Here you go.
In Wings3D

[attach=1]

In TG

[attach=2]

Kadri


Without using Poseray it looks problematic yes.

Kadri


I looked at one problematic part.


[attachimg=1]



It is flat but it does have a hole in it.
Not sure if the others are all the same but Terragen can't triangle these kind of surfaces as it should maybe?

Kadri

#82

I looked  a little closer.
It gets a little more confusing for others maybe.

Not sure in what way you used the term ngon above Jochen but i mean both of them (planar-flat and non planar-flat).
In this example they are ngons but they look planar mostly

My own basic example does have a ngon surface but it is planar and doesn't have a hole in it.

The train parts that don't show up in your example are ngons but they have mostly holes in it.
Haven't looked at the others.

paq

Hi Kadri,

Yes from my test Terragen 'simply' delete or discard any n-gons.
So just select all n-gons in LW (I think there is a statistic panel in lw too right ? where you can select every poly with more than 4 vertex), and triple them.

@ j meyer,

What I was trying to explain, it's not because Terragen doesn't support n-gons that you have to avoid them during modeling task in you DCC.
The little train was a perfect example, sure you have to triple ngons, but only when you export your model for Terragen.

I just wan't to avoid people wasting modeling effort creating full quad topology when it's actually not needed, excpet like Kadri said, if you want to prepare the model for texture displacement.
Gameloft

Kadri

Quote from: paq on July 28, 2015, 06:13:45 PM
...
I just wan't to avoid people wasting modeling effort creating full quad topology when it's actually not needed, excpet like Kadri said, if you want to prepare the model for texture displacement.

I actually don't care for quads or triangles until i stumble in a problem.
I do mostly only hard modeling. Not that i am a good modeler anyway  :P
But except the shadow problem in Terragen i mostly don't have those kind of problems.
After a while you model in the way you should without much effort probably out of habit.

j meyer

paq -
Quote....The little train was a perfect example, sure you have to triple ngons, but only when you export your model for Terragen....
That's what this thread is about:modeling for use in Terragen,modeling to export your model
to Terragen.
And,please,triple means multiply by 3,triangulate is the word.
Just trying to avoid more confusion as we already have here.


Kadri - the term ngon in regard to modeling means any face with more then 4 edges.
and that's how I use it.Has nothing to do with non planar or planar.
Holes may make it worse,but I had these problems without holes also.


paq

Quote from: j meyer on July 29, 2015, 01:02:29 PM

That's what this thread is about:modeling for use in Terragen,modeling to export your model
to Terragen.
And,please,triple means multiply by 3,triangulate is the word.
Just trying to avoid more confusion as we already have here.

Thanks for the grammar lesson, but 'triple' is the command name to triangulate a mesh in Lw and Modo.
I have the feeling you are making the whole 'modeling for Terragen' idea over complicated, establishing modeling
rules when actually it's just a matter of export options.

As my limited english seems to add an other layer of confusion, I'll just stop posting  (but keep reading  ;))
Gameloft

j meyer

I don't see a reason for you to stop posting.
English is not my first language,too.We shouldn't press this issue too much,really,
at the end we are all using bad english even that native speakers. ;)

Didn't know about that LW command and I bet some others did not know also.
But still,if some call it triangulate here and others triple none of the guys reading
this will be able to follow without problems.
We should all use the same terms here that's all I'm asking for.
Your knowledge is still appreciated.

Kadri

Quote from: j meyer on July 29, 2015, 01:02:29 PM
...
the term ngon in regard to modeling means any face with more then 4 edges.
and that's how I use it.Has nothing to do with non planar or planar.
...

Yes but non planar ones makes them more problematic.
That is what i tried to say for my test file with the ngon surface.

I will have a look later with some other object.

j meyer

Curious to see what you'll find Kadri. :)



We were talking about non planar faces lately.Actually we are still on it.
What is a non planar face,you might ask.
A non planar face is a four or more sided face with one or more vertices not on the same
plane as the others.
Errh...What? ???
Take a triangle polygon.It has three vertices (points) connected by three straight edges.
It's flat or level.If you now take one vertex and move it up you still have a flat polygon.
No matter which vertex or how high above the other two it will always be a flat face.
Stretched maybe,but flat.
Now take a four sided polygon,a quad.That has four vertices connected by four straight edges.
Let's assume it is flat at this moment.Take a vertex and move it up as before and you don't have a flat surface anymore.It's a non planar face now.
You will see why that can be problematic further down below.

The first example deals with just slightly non planar faces on the side of a cube.
The image should illustrate what has been done to the cube.

[attachimg=1]

Now three images of the cube rendered in TG each with a different lighting angle.
Left them a bit bigger so you can see better.
[attach=2]

[attach=3]

[attach=4]

Depending on the light angle it can be problematic even with such a small amount of
'non planar-ness'.

But it can be much worse than this.
The second example will show.


to be continued in the next post