Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status:
Offline
Re: Modifier un modèle de porte ?
Essayez avec du verre normal, c'est-à-dire pas de texture mais une couleur blanche. Faites également pivoter votre vue 3D et voyez à quoi ressemble l'autre côté lors du rendu.
Try it with normal glass, i.e. not a texture but a white color. Also rotate your 3D view and see what the other side looks like when rendered.
Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status:
Offline
Re: Modifier un modèle de porte ?
Use a plain text editor that can do a replace_all. Most editors can do that.
Export the sill object to sill1.obj. Open the file and replace_all "g " with "g sweethome3d_rail_1_". Save and copy the file to sill2.obj, sill3.obj, etc. Edit sill2.obj and replace_all "sweethome3d_rail_1_" with "sweethome3d_rail_2_". Same for 3-9.
Use the same technique for the 9 doors: export a single door to door1.obj. Edit and replace_all "g " with "g sweethome3d_opening_on_rail_1_". Save and copy to door2.obj, door3.obj, etc. Edit each one and replace with the correct number.
Still a lot of work but at least you can see what you are doing.
Import the 18 objects to merge with the outer frame. Using the object names you can place the correct sill under the same numbered door.
Belgique
Joined: Aug 17, 2023
Post Count: 82
Status:
Offline
Re: Modifier un modèle de porte ?
Yes I thought about replacement but I need to keep my faces with right textures at top, right, bottom, etc. It is my fault as I like to make complicated things. Now I need another texture to test maybe. It would be simpler to replace only that than to re-export all files et to edit what I already made.
Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status:
Offline
Re: Modifier un modèle de porte ?
Si la texture d'une porte est correcte et exportée, l'orientation correcte de la texture sera préservée pour toutes les copies et autres textures. Les lignes v, vt et f de l'obj décrivent l'objet ainsi que la position et la direction de la texture. Ces lignes restent intactes. Le seul avantage de procéder porte par porte est qu'il est possible de décaler légèrement la texture afin d'obtenir une légère différence dans l'aspect d'une texture par ailleurs identique.
If the texture on one door is correct and exported than the correct texture orientation will be preserved for all copies and other textures. The v, vt, and f lines in the obj describe the object and the texture position and direction. Those lines remain untouched. The one advantage of doing it door-by-door is that you could shift the texture slightly so there's a little difference in the look of the otherwise same texture.
Belgique
Joined: Aug 17, 2023
Post Count: 82
Status:
Offline
Re: Modifier un modèle de porte ?
Oui, c'est ce que j'ai fait, en donnant de légers glissement de textures sur les plans x ou y selon les faces. Parfois, ça ne m'a pas semblé utile, comme pour les rails assez fins où on distinguera mal la texture et puis comme j'ai 9 portes on ne voit pas spécialement la similarité entre deux portes éloignées, ni entre deux pièces de bois éloignées. Mais ça me fait tout de même 90 faces différentes par porte, plus le verre d'une seule pièce par porte. Et c'est lui dont je me dis que si j'arrive à rendre correctement un rendu, je pourrais facilement renommer une autre image de texture pour que quand j'importe ma porte complète dans la bibliothèque, ce soit cette seconde texture qui sera prise en compte.
Yes, that's what I've done, with slight texture shifts on the x or y planes depending on the faces. Sometimes I didn't think it would be useful, like with the thin rails where you can't really see the texture, and as I've got 9 doors you can't really see the similarity between two doors that are a long way apart, or between two pieces of wood that are a long way apart. But that still gives me 90 different faces per door, plus the glass in one piece per door. And that's who I'm thinking that if I manage to render something correctly, I could easily rename another texture image so that when I import my complete door into the library, it's this second texture that will be taken into account.
Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status:
Offline
Re: Modifier un modèle de porte ?
Comme je l'ai expliqué, faites un replace_all pour remplacer "g" par "g <la chaîne dont vous avez besoin>". Vous pouvez faire cela pour chaque seuil/porte, donc pas 90 éditions par fichier mais une commande pour chaque fichier (2x9fichiers). Puisque vous devez faire chaque fichier de toute façon, il n'y a pas de problème à avoir des textures légèrement décalées, vous ne pouvez simplement pas copier le fichier mais vous devez exporter avec chaque texture décalée. Vous pouvez faire cela sur une porte, exporter, changer de texture, exporter, etc. Vous obtiendrez ainsi vos 9 fichiers de porte dans lesquels vous remplacerez toutes les chaînes "g". Même chose pour les seuils.
Chaque exportation préservera vos paramètres de texture, de sorte que si vous définissez une autre texture, ces fichiers auront toujours les décalages que vous avez définis.
Traduit avec www.DeepL.com/Translator (version gratuite)
Like I explained, do a replace_all to change "g " to "g <the string you need>". You can do that for each sill/door, so not 90 edits per file but one command for each file (2x9files). Since you have to do each file anyway there's no problem having slightly shifted textures, you just can't copy the file but have to export with each shifted texture. You can do that on one door, export, change texture, export, etc. That will result in your 9 door files where you replace_all the "g " strings. Same for the sills.
Each export will preserve your texture settings so if you set another texture those will still have the shifts you set.