multiple objects; one parts shader?

Started by Dune, August 14, 2011, 03:35:43 AM

Previous topic - Next topic

Dune

I've been wondering how I would go about it when planning a large series of individual buildings, but with the same basic textures. I can make the buildings, assign wall and window textures to it, but how would I arrange things in TG2 to minimize memory use? I understand I should load only one wall surface, for instance.
I've tried loading a second object, assigned the parts shader of the first to its surface shader, but the parts shader of the second object can't be deleted. Only the default shaders can be deleted, but does this conserve memory?
Can anyone enlighten me on the best workflow? I might get a commission to do another medieval city with a hundred individual buildings or so, so I'm anxious to get to grips with this (or my machine can't handle it).

cyphyr

You may have better luck editing the tgd file manually in a text editor, just an early Sunday morning thought ...
:)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Henry Blewer

I don't think you would be able to use UV maps for this. You could set up a node group with the image maps/procedural textures preassigned. Then link these to the buildings as planar maps. So north and south walls may be able to use one node group, east and west walls the same group, but mapped to the appropriate axis. Anything not off these planes would have to be projected using cameras.

It might work better to export the heightfield into you modeling app. Build your city to fit the heightfield. Do the mapping. Then export the whole city into Terragen 2 as one object. This way UV maps would work. There would be a huge amount of material nodes in the parts shader. Grouping the buildings for export by UV maps might simplify this.

That's the best I can think of...
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Matt

#3
Quote from: Dune on August 14, 2011, 03:35:43 AM
I've been wondering how I would go about it when planning a large series of individual buildings, but with the same basic textures. I can make the buildings, assign wall and window textures to it, but how would I arrange things in TG2 to minimize memory use? I understand I should load only one wall surface, for instance.
I've tried loading a second object, assigned the parts shader of the first to its surface shader, but the parts shader of the second object can't be deleted. Only the default shaders can be deleted, but does this conserve memory?
Can anyone enlighten me on the best workflow? I might get a commission to do another medieval city with a hundred individual buildings or so, so I'm anxious to get to grips with this (or my machine can't handle it).

The memory needed for the Parts shader and Parts nodes is quite small, so don't worry about not being able to delete them. The Parts nodes don't contain object data, they only contain small amounts of shader assignment information. Deleting the Default Shaders will save memory if they use images. The shaders themselves don't use a lot of memory if they don't use any images. Image data and object nodes are the big things you need to care about.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Hetzen

I guess this scenario would be a good example to put forward the case of setting named variables.

If you are using the same texture for your models, it would be more efficient to set up a load of image shaders with your textures, and set their names to something like "00Texture_Wall" in your main node work area. So when you dip into your parts shader, you can 'Assign Shader' and find your texture at the top of the list of nodes. This means you can share the same texture across models.

gregsandor

I asked for the ability to delete the parts October 30, 2009.  http://forums.planetside.co.uk/index.php?topic=7895.0        I do not understand why it is disabled, nor why the argument is still being made that we really don't want to delete them.  I do.

Hetzen,  I use the method you describe, using the old setup; a few shaders re-used for multiple models.  Load TG, put a simple model in it, save the tgd.  Open in a text editor, cut out the parts shaders, resave.  Now you can copy and paste the model holder and use it for your models.


dandelO


Dune

Thank you very much, gentlemen, that answers my question.

Matt

#8
Hi Greg,

On a couple of occasions I've asked you to tell me what problems the Parts Shader causes if you leave it there but ignore it. I am still in the dark. I can't make this change until I hear a reason why it's important. Until someone can explain that to me, I'll keep saying that those nodes are there as slots to be assigned to. You do not have to use them. I just want to understand. Please? :)

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

#9
Let me add to that. I might be wrong to insist that you can't delete them, and I'll consider changing that. I would just like a bit more to go on. I understand that you don't want the nodes and you are assigning a completely different set of global shaders to lots of different objects. That's perfectly fine and it's important that you can do that. It's by design you can do that. But as for completely deleting the Parts Shader, there are reasons why I think it should stick around, just in case, because it's the only way to reconnect individual parts associated with specific objects, in general. (It's awkward that it's handled using "Parts" nodes in the first place, but don't have a better way of presenting dynamic arrays of connections yet.) Leaving the unused nodes around may be completely useless to you and other people in many cases, I understand that. The need to delete them, is it out of concern for efficiency, file size, general nagging feeling that they are sitting there for no reason, aesthetics, readability (if you're editing externally). Any of the above, or something else? Do the Parts Shader or the Part nodes prevent the old assignment method from working? If so, I didn't realise that, and I would have liked someone to tell me.

I might want to make the change if I know a bit more about your reasons, but I want to weight it against other considerations.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

gregsandor

Hi Matt,
Filesize isn't a concern, as you've said they don't cost a lot in that respect.  For me it is about keeping clean files, with only the nodes I need.  My projects get complicated on their own so I like to reduce clutter where I can.  It isn't a big deal as I can manually edit them out, and there are other things I'd rather you and Jo et al work on :)