Planetside Software Forums

General => Terragen Discussion => Topic started by: james adamson on August 16, 2020, 09:22:32 AM

Title: editing materials very very slow
Post by: james adamson on August 16, 2020, 09:22:32 AM
High all.
I have some models with quite a few texture layers assigned to each model.
This one I am looking at has 16 layers. It is unworkably slow to change any of the settings and I have no idea why. It is fine on single layer models.
It is frustrating as I decided to render my final models in TG because it is so amazing with instances and I would avoid the hassle of a exporting a TG mesh and all the layers etc etc  but it seems what I gain there I loose on the ability to interactively edit my materials.
Has anyone got any tips that may speed this up. I was thinking of baking all the textures to one layer but I would then loose flexibility.
Cheers.
James.
Title: Re: editing materials very very slow
Post by: sboerner on August 16, 2020, 11:33:24 AM
That's frustrating. By texture layers, do you mean object parts? (I would call them shading groups, coming from Maya.)

What version of Terragen? Do you have RTP enabled while making changes? What happens if you close Terragen and start a new session?

16 is not very many. Have you tried editing one of your models in an otherwise empty default scene? Or try a low-poly model such as a soccer ball or simple sphere with the same number of object parts. To try to isolate the problem.
Title: Re: editing materials very very slow
Post by: james adamson on August 16, 2020, 06:15:06 PM
Hey. 
Thanks for responding.
Yes I guess in Modo they are material groups. I am using TG4 full version. And I have tried from a new default scene.
I have not tried a low poly model with many textures.
The model itself is pretty complex. Its an Evermotion building and is extremely detailed inside and out so I wonder if thats the problem. Although its not the poly count itself causing the problems because Tg only really slows down when attempting to edit the materials when in the internal shader nodes of the obj. I have had RTP off.
Cheers.
James.
Title: Re: editing materials very very slow
Post by: sboerner on August 16, 2020, 07:42:04 PM
Sometimes things slow down when I'm placing new objects in a big scene, but internal networks usually edit OK even with large models. Does the same thing happen with low-poly models?

Mac or PC?

I'm happy to take a look if you want to share the model via Dropbox or whatever.
Title: Re: editing materials very very slow
Post by: Matt on August 16, 2020, 08:45:51 PM
Hi James. If you wouldn't mind sending these files to me (either my PM or at our support email) we'll try to figure out what's causing the slowdown.
Title: Re: editing materials very very slow
Post by: james adamson on August 16, 2020, 09:20:44 PM
Great.
Will get those to you tomorrow.
Thanks.
Title: Re: editing materials very very slow
Post by: james adamson on August 16, 2020, 09:21:35 PM
Mac
Title: Re: editing materials very very slow
Post by: Dune on August 17, 2020, 02:04:30 AM
First of all I always combine parts in Poseray that call the same material, so you end up with as little as possible parts. Then I always open an empty version of TG and just have the node window open, no preview. I noticed that preview on takes  a bit of memory and indeed sometimes slows down working on the parts and shaders.
When all is filled in, I check with crop renders, if things need to change, I click away the preview. Works fine for me.
Title: Re: editing materials very very slow
Post by: jaf on August 17, 2020, 04:04:29 AM
Not sure if this helps, but I noticed if I have an object highlighted in the Objects tab and I'm editing materials for that object in the nodes, things are quite slow.  If I select some other object in the tab panel (like Planet 01), things are speedier back in the node edits.
Title: Re: editing materials very very slow
Post by: james adamson on August 17, 2020, 05:54:59 AM
Thanks all. I will try the de select option.
And I did not think poseray was available for mac.
Title: Re: editing materials very very slow
Post by: Dune on August 17, 2020, 06:07:57 AM
I don't know about that, but there might be other software that can combine mats/parts.
Title: Re: editing materials very very slow
Post by: james adamson on August 17, 2020, 07:15:21 AM
Yes. Or maybe I go in a streamline the models' myself.
I have 108 of them so I was hoping to avoid that but that's the bottleneck that needs sorting right now.
Will explore the internet for such a software.
Cheers.
James.
Title: Re: editing materials very very slow
Post by: james adamson on August 20, 2020, 02:59:48 PM
This is driving me nuts.
I have tried everything. I am in Terragen I have 56 gb of memory free yet editing materials is a nightmare. Every time I touch a slider I get the beachball gadget. I have simplified model as much as I can and removed some materials and have preview window
off. All have made zero difference. Weirdly I just loaded a setup and the sliders moved normally but soon reverted back to unhappy mode.
Any more ideas or suggestions would be great. 
Oh it happens on different models with different textures the only common thread is they are all Archmodels. I can also edit these materials with no problem in my 3d app.
Cheers.
James
Title: Re: editing materials very very slow
Post by: luvsmuzik on August 20, 2020, 03:35:41 PM
Are your textures 4K or 8K png type? For some reason my TG slows down using png or 4K  It could be texture bake is needed or perhaps cached?
Title: Re: editing materials very very slow
Post by: james adamson on August 20, 2020, 07:09:29 PM
Hi. It does not seem to discriminate! All shaders are slow to edit. 4k images down to 1024.
I have tried exporting out as a tgo to see if that sped things up but on reloading the tgo it said it could not find the images!
Arghhh!
Title: Re: editing materials very very slow
Post by: sboerner on August 20, 2020, 07:32:51 PM
If the TGO is saved to a different location you may need to relink the textures or move copies of the textures to the same folder.

My offer stands on taking a look at one of the models if you want to send by PM. Or one of your simplified scenes with a placed object. My main workstation is a PC but I still have Terragen installed on my Mac Pro and can check it on both platforms.
Title: Re: editing materials very very slow
Post by: james adamson on August 20, 2020, 08:18:29 PM
Thanks. I appreciate the offer but I think I may have accidentally solved it. Its weird though, I brought an obj into default scene
spent ages with the slow editing nonsense getting my model to look decent, saved the tgd and moved on to the next one.
I reopened that first scene and all of a sudden editing was performing normally!! So I have imported three objs into default saved it and reopened and that seems to have sorted it out. It makes no sense to me. No files have moved or changed in any way. I have a feeling there is something I am missing and when I look at it tomorrow I will realise I was talking nonsense.
If thats the case and this weird fix was just me tripping out I may well send you what I have.
On the tgo front I made sure all the textures were in the same place when I imported the obj before converting. So the source OBJ
the textures and the exported TGO all live in the same place. Could it be the original mtl file from the OBJ? Alos is there much benefit
converting from OBJ to TGO? 
Cheers.
James.
Title: Re: editing materials very very slow
Post by: sboerner on August 20, 2020, 11:48:00 PM
Glad it seems to have sorted itself out. Hope it continues to work. Strange though.

Did you get the tgo to work as well? As far as I know tgo's don't reference mtl files, those are for obj files only. When you get errors like missing files when you load a scene you can select Project > Show Project Assets to find out exactly where the problems are. If the files are in the right place then maybe the shader is looking in the wrong place . . . in that case just fix the file paths and re-export the tgo. You can use relative paths, meaning that if the textures are in the same folder you just need the filename and extension. That way they'll always work even if you move the folder.

Saving out object references as tgo's is a good idea and worth the trouble. It eliminates the need for a sidecar file (mtl), and the shading network that you create in Terragen is saved along with the object. Plus it's compressed.

Unfortunately some third-party models can be the source of a lot of problems. Hope you're able to get all 108 of your models fine-tuned and placed successfully in your scene.

FYI in response to a previous question, check out MeshLab (https://www.meshlab.net/), which runs on all platforms. The interface can be a little daunting but it's a great tool for fixing bad meshes. Not sure if it can be used to merge material groups, but it might be worth a look either way.
Title: Re: editing materials very very slow
Post by: james adamson on August 21, 2020, 10:34:21 AM
Yep. I got the TGO to work thanks for your help. The reason I referred to the mtl is I thought that the TGO would locate the textures from the same location that the mtl pulled them in from. And thanks also for promPting me to go in this direction, I would not have gone there otherwise. Like I said I have a lot of space to fill in my scene so any space saving will help, it has also got me onto editing external materials and shaders in Terragen which is something I have been avoiding.
And yep this process of loading the obj with the slow editing glitch and then saving out as a new scene is repeatable and solves the problem. Very weird but it works so I am not complaining.
Cheers.
James.
I will take a look at meshlab. Not sure if I am up for a daunting interface right now my head hurts!